path: root/qmail-send.c
diff options
authorJohn Denker <>2012-06-03 23:16:05 (GMT)
committerJohn Denker <>2012-07-14 01:39:07 (GMT)
commit9c26652d660cd4cc91be1e24f94a9aaf708bb99b (patch)
tree56905ff77e0ca9c589919ed8ce140c9340847756 /qmail-send.c
parentc29249ffc37f23433fd99df19029adfdb1bfb4ea (diff)
Blank line in control/doublebounce ==> discard double bounces.
If you don't want doublebounces to hit your queue a second time (because you have, say, ten million mailboxes and as much legitimate email traffic and more spam), the following patch will immediately discard bouncing bounces. Note that doublebounceto must start with a blank line; that is, it must have one newline in it. A totally empty file means "use the default of 'posthamster'". Credit: Nasim Mansurov; rewritten by Charles Cazabon
Diffstat (limited to 'qmail-send.c')
1 files changed, 2 insertions, 0 deletions
diff --git a/qmail-send.c b/qmail-send.c
index c31b522..0ea44a1 100644
--- a/qmail-send.c
+++ b/qmail-send.c
@@ -683,6 +683,8 @@ unsigned long id;
if (str_equal(sender.s,"#@[]"))
log3("triple bounce: discarding ",fn2.s,"\n");
+ else if (!*sender.s && *doublebounceto.s == '@')
+ log3("double bounce: discarding ",fn2.s,"\n");
if (qmail_open(&qqt) == -1)