updated on Mon Jan 16 00:01:41 UTC 2012
[aur-mirror.git] / qmail / qmail-1.03-doublebounce-trim.patch
blob1a4192694f84fe46876cea673944d6517a5d348c
1 If you don't want doublebounces to hit your queue a second time
2 (because you have, say, ten million mailboxes and as much legitimate
3 email traffic and more spam), the following patch will immediately
4 discard bouncing bounces. Note that doublebounceto must start with a
5 blank line; that is, it must have one newline in it. A totally empty
6 file means "use the default of 'posthamster'".
8 This version was rewritten by Charles Cazabon from my original patch
9 to include a man page, turn the patch around in the right direction,
10 and emit its own message for the logfile.
12 Apply this patch as so:
14 cd /usr/local/src/qmail-1.03
15 patch <doublebounce-trim.patch
17 diff -urN qmail-1.03.orig/qmail-send.9 qmail-1.03.nodoublebounce/qmail-send.9
18 --- qmail-1.03.orig/qmail-send.9 Mon Jun 15 04:53:16 1998
19 +++ qmail-1.03.nodoublebounce/qmail-send.9 Tue Sep 9 12:59:04 2003
20 @@ -115,6 +115,10 @@
21 (If that bounces,
22 .B qmail-send
23 gives up.)
24 +As a special case, if the first line of
25 +.IR doublebounceto
26 +is blank (contains a single linefeed), qmail-send will not queue
27 +the double-bounce at all.
28 .TP 5
29 .I envnoathost
30 Presumed domain name for addresses without @ signs.
31 diff -urN qmail-1.03.orig/qmail-send.c qmail-1.03.nodoublebounce/qmail-send.c
32 --- qmail-1.03.orig/qmail-send.c Mon Jun 15 04:53:16 1998
33 +++ qmail-1.03.nodoublebounce/qmail-send.c Tue Sep 9 13:02:43 2003
34 @@ -683,6 +683,8 @@
36 if (str_equal(sender.s,"#@[]"))
37 log3("triple bounce: discarding ",fn2.s,"\n");
38 + else if (!*sender.s && *doublebounceto.s == '@')
39 + log3("double bounce: discarding ",fn2.s,"\n");
40 else
42 if (qmail_open(&qqt) == -1)
44 --9jxsPFA5p3P2qPhR--