diff options
Diffstat (limited to 'mail/mailman')
-rw-r--r-- | mail/mailman/Makefile | 3 | ||||
-rw-r--r-- | mail/mailman/files/patch-Mailman::Defaults.py.in | 23 | ||||
-rw-r--r-- | mail/mailman/files/postfix-verp.diff | 51 |
3 files changed, 71 insertions, 6 deletions
diff --git a/mail/mailman/Makefile b/mail/mailman/Makefile index c378cb54c4b6..fd471d0ddeb0 100644 --- a/mail/mailman/Makefile +++ b/mail/mailman/Makefile @@ -7,7 +7,7 @@ PORTNAME= mailman DISTVERSION= 2.1.9 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES?= mail MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \ http://www.list.org/ @@ -95,6 +95,7 @@ defined(WITH_COURIER) BROKEN= choose only one MTA integration .endif MAIL_GID?= mailman +EXTRA_PATCHES+= ${FILESDIR}/postfix-verp.diff .endif .if defined(WITH_COURIER) diff --git a/mail/mailman/files/patch-Mailman::Defaults.py.in b/mail/mailman/files/patch-Mailman::Defaults.py.in index aef93e86a856..cf83b064af95 100644 --- a/mail/mailman/files/patch-Mailman::Defaults.py.in +++ b/mail/mailman/files/patch-Mailman::Defaults.py.in @@ -1,6 +1,6 @@ ---- Mailman/Defaults.py.in.orig Thu Dec 26 21:48:41 2002 -+++ Mailman/Defaults.py.in Mon Jan 20 14:07:05 2003 -@@ -97,7 +97,7 @@ +--- Mailman/Defaults.py.in.orig 2006-08-04 20:20:33.000000000 +0800 ++++ Mailman/Defaults.py.in 2007-10-03 08:09:00.678284951 +0800 +@@ -107,7 +107,7 @@ # Command that is used to convert text/html parts into plain text. This # should output results to standard output. %(filename)s will contain the # name of the temporary file that the program should operate on. @@ -9,7 +9,7 @@ -@@ -356,8 +356,8 @@ +@@ -392,8 +392,8 @@ # and virtual-mailman.db files, respectively, from the associated plain text # files. The file being updated will be appended to this string (with a # separating space), so it must be appropriate for os.system(). @@ -20,7 +20,7 @@ # Ceiling on the number of recipients that can be specified in a single SMTP # transaction. Set to 0 to submit the entire recipient list in one -@@ -391,7 +391,7 @@ +@@ -427,7 +427,7 @@ # Command for direct command pipe delivery to sendmail compatible program, # when DELIVERY_MODULE is 'Sendmail'. @@ -29,3 +29,16 @@ # Set these variables if you need to authenticate to your NNTP server for # Usenet posting or reading. If no authentication is necessary, specify None +@@ -661,6 +661,12 @@ + # debugging). + MAX_AUTORESPONSES_PER_DAY = 10 + ++# This FreeBSD port of Mailman can utilize Postfix SMTP server's VERP ability. ++# You may set VERP_STYLE = 'Postfix' to enable it. ++VERP_STYLE = 'Manual' ++ ++# When using Postfix style VERP you will need the following setting. ++POSTFIX_XVERP_OPTS = '+=' + + + ##### diff --git a/mail/mailman/files/postfix-verp.diff b/mail/mailman/files/postfix-verp.diff new file mode 100644 index 000000000000..af07cf36086e --- /dev/null +++ b/mail/mailman/files/postfix-verp.diff @@ -0,0 +1,51 @@ +--- Mailman/Handlers/SMTPDirect.py.orig 2005-12-31 02:50:08.000000000 +0800 ++++ Mailman/Handlers/SMTPDirect.py 2007-10-03 08:12:39.402049123 +0800 +@@ -64,11 +64,11 @@ + self.__conn.connect(mm_cfg.SMTPHOST, mm_cfg.SMTPPORT) + self.__numsessions = mm_cfg.SMTP_MAX_SESSIONS_PER_CONNECTION + +- def sendmail(self, envsender, recips, msgtext): ++ def sendmail(self, envsender, recips, msgtext, mailopts=[]): + if self.__conn is None: + self.__connect() + try: +- results = self.__conn.sendmail(envsender, recips, msgtext) ++ results = self.__conn.sendmail(envsender, recips, msgtext, mailopts) + except smtplib.SMTPException: + # For safety, close this connection. The next send attempt will + # automatically re-open it. Pass the exception on up. +@@ -114,7 +114,7 @@ + # recipients they'll swallow in a single transaction. + deliveryfunc = None + if (not msgdata.has_key('personalize') or msgdata['personalize']) and ( +- msgdata.get('verp') or mlist.personalize): ++ (msgdata.get('verp') and mm_cfg.VERP_STYLE == 'Manual') or mlist.personalize): + chunks = [[recip] for recip in recips] + msgdata['personalize'] = 1 + deliveryfunc = verpdeliver +@@ -357,8 +357,14 @@ + # Errors-To while new ones will at worst ignore the header. + del msg['sender'] + del msg['errors-to'] +- msg['Sender'] = envsender +- msg['Errors-To'] = envsender ++ mailopts=[] ++ if msgdata.get('verp') and mm_cfg.VERP_STYLE == 'Postfix': ++ mailopts.append('XVERP=' + mm_cfg.POSTFIX_XVERP_OPTS) ++ else: ++ # these get left out of VERPed messages so they don't accidently ++ # override the VERP header. ++ msg['Sender'] = envsender ++ msg['Errors-To'] = envsender + # Get the plain, flattened text of the message, sans unixfrom + msgtext = msg.as_string() + refused = {} +@@ -366,7 +372,7 @@ + msgid = msg['message-id'] + try: + # Send the message +- refused = conn.sendmail(envsender, recips, msgtext) ++ refused = conn.sendmail(envsender, recips, msgtext, mailopts) + except smtplib.SMTPRecipientsRefused, e: + syslog('smtp-failure', 'All recipients refused: %s, msgid: %s', + e, msgid) |