1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-26 00:55:14 +00:00
freebsd-ports/mail/mailman/files/postfix-verp.diff
Matthias Andree 854b45ea77 Note that I could not fully test all integrations yet. If integrations are
failing, please add detailed information how you set up your MTA, and
Mailman, what user/group IDs are, how list aliases are managed, and
thereabouts.

- Update to 2.1.15. [2] Changes: click View the full Changelog on
  https://launchpad.net/mailman/2.1/2.1.15
- Fix without-NLS install: Install at least English template. [1]
- Drop EXIM3 option, we don't have an Exim 3 port any more.
- Drop INTEGRATION option, which would at best be confusing.
- Reformat COMMENT to fit into common limits.
- Fix typo in COURIER_DESC.
- When Postfix integration is chosen, add BUILD and RUN_DEPENDS on
  Postfix because we need the postconf program.
- Use htdig patches for Mailman version 2.1.12 and remove BROKEN tag,
  in an experimental attempt to revive htdig support.
- Fix a few minor glitches in FreeBSD-post-install-notes.
- Drop files/patch-Mailman__Cgi__confirm.py, integrated in upstream tarball.
- Add launchpad.net to MASTER_SITES.
- Update files/postfix-verp.diff.
- Install a dummy one-line text file into PYTHON_SITELIBDIR so that
  Python's upgrade-site-packages would reinstall Mailman. [1]
- Add "status" support for rc.d script. [3]
- Change pre-fetch: to pre-everything::
- Revise formatting of pre-everything text to make clear it displays
  default values, not current values. To avoid ports/170280.

PR:		ports/135503 [1]
PR:		ports/170280 [2]
PR:		ports/170285 [2]
PR:		ports/176180 [1]
PR:		ports/181298 [3]
Submitted by:	Lowell Gilbert [1]
Submitted by:	Stefan Lasiewski [2]
Submitted by:	Oliver Fromme [3]
2013-08-29 22:58:07 +00:00

45 lines
2.1 KiB
Diff

--- Mailman/Handlers/SMTPDirect.py.orig 2012-06-13 15:35:54.000000000 +0200
+++ Mailman/Handlers/SMTPDirect.py 2013-08-22 14:26:22.000000000 +0200
@@ -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
@@ -376,6 +376,9 @@
if mlist.include_sender_header:
del msg['sender']
msg['Sender'] = '"%s" <%s>' % (mlist.real_name, envsender)
+ mailopts=[]
+ if msgdata.get('verp') and mm_cfg.VERP_STYLE == 'Postfix':
+ mailopts.append('XVERP=' + mm_cfg.POSTFIX_XVERP_OPTS)
# Get the plain, flattened text of the message, sans unixfrom
# using our as_string() method to not mangle From_ and not fold
# sub-part headers possibly breaking signatures.
@@ -385,7 +388,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)