diff options
| author | manuel <manuel@mausz.at> | 2014-01-27 14:30:00 +0100 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2014-01-27 14:30:00 +0100 |
| commit | 74d7704b2f1c42d891c013f5ef3ec9dea380851e (patch) | |
| tree | fed7e0f389d7a4536a1726c085412ed71b6f680b /realrcptto.c | |
| parent | b4dd366f73fad1feb55d027a552b764043165edc (diff) | |
| download | qmail-74d7704b2f1c42d891c013f5ef3ec9dea380851e.tar.gz qmail-74d7704b2f1c42d891c013f5ef3ec9dea380851e.tar.bz2 qmail-74d7704b2f1c42d891c013f5ef3ec9dea380851e.zip | |
check for possible smtproutes in realrcptto
Diffstat (limited to 'realrcptto.c')
| -rw-r--r-- | realrcptto.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/realrcptto.c b/realrcptto.c index 98dc6e6..b419847 100644 --- a/realrcptto.c +++ b/realrcptto.c | |||
| @@ -28,9 +28,11 @@ static stralloc envnoathost = {0}; | |||
| 28 | static stralloc percenthack = {0}; | 28 | static stralloc percenthack = {0}; |
| 29 | static stralloc locals = {0}; | 29 | static stralloc locals = {0}; |
| 30 | static stralloc vdoms = {0}; | 30 | static stralloc vdoms = {0}; |
| 31 | static stralloc smtproutes = {0}; | ||
| 31 | static struct constmap mappercenthack; | 32 | static struct constmap mappercenthack; |
| 32 | static struct constmap maplocals; | 33 | static struct constmap maplocals; |
| 33 | static struct constmap mapvdoms; | 34 | static struct constmap mapvdoms; |
| 35 | static struct constmap mapsmtproutes; | ||
| 34 | 36 | ||
| 35 | static char *dash; | 37 | static char *dash; |
| 36 | static char *extension; | 38 | static char *extension; |
| @@ -67,6 +69,11 @@ void realrcptto_init() | |||
| 67 | case 0: if (!constmap_init(&mapvdoms,"",0,1)) die_nomem(); | 69 | case 0: if (!constmap_init(&mapvdoms,"",0,1)) die_nomem(); |
| 68 | case 1: if (!constmap_init(&mapvdoms,vdoms.s,vdoms.len,1)) die_nomem(); | 70 | case 1: if (!constmap_init(&mapvdoms,vdoms.s,vdoms.len,1)) die_nomem(); |
| 69 | } | 71 | } |
| 72 | switch(control_readfile(&smtproutes,"control/smtproutes",0)) { | ||
| 73 | case -1: die_control(); | ||
| 74 | case 0: if (!constmap_init(&mapsmtproutes,"",0,1)) die_nomem(); | ||
| 75 | case 1: if (!constmap_init(&mapsmtproutes,smtproutes.s,smtproutes.len,1)) die_nomem(); | ||
| 76 | } | ||
| 70 | 77 | ||
| 71 | str_copy(pidbuf + fmt_ulong(pidbuf,getpid())," "); | 78 | str_copy(pidbuf + fmt_ulong(pidbuf,getpid())," "); |
| 72 | x=env_get("PROTO"); | 79 | x=env_get("PROTO"); |
| @@ -273,6 +280,7 @@ int depth; | |||
| 273 | } | 280 | } |
| 274 | } | 281 | } |
| 275 | if (x) break; | 282 | if (x) break; |
| 283 | if (constmap(&mapsmtproutes,localpart.s + i,localpart.len - i)) return 1; | ||
| 276 | } | 284 | } |
| 277 | } | 285 | } |
| 278 | if (!*x) return 1; | 286 | if (!*x) return 1; |
