summaryrefslogtreecommitdiffstats
path: root/realrcptto.c
diff options
context:
space:
mode:
Diffstat (limited to 'realrcptto.c')
-rw-r--r--realrcptto.c8
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};
28static stralloc percenthack = {0}; 28static stralloc percenthack = {0};
29static stralloc locals = {0}; 29static stralloc locals = {0};
30static stralloc vdoms = {0}; 30static stralloc vdoms = {0};
31static stralloc smtproutes = {0};
31static struct constmap mappercenthack; 32static struct constmap mappercenthack;
32static struct constmap maplocals; 33static struct constmap maplocals;
33static struct constmap mapvdoms; 34static struct constmap mapvdoms;
35static struct constmap mapsmtproutes;
34 36
35static char *dash; 37static char *dash;
36static char *extension; 38static 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;