ac239c2b83
* Add LICENSE section * Add CONFLICTS with japanese/mailman * Make use of SUB_FILES * Make use of PORTDOCS * Apply simple use of OPTIONS * Add WITHOUT_NLS knob to make portlint happier * Append "MTA = 'Postfix'" to mm_cfg.py.dist.in when defined both WITH_POSTFIX and WITH_INTEGRATION at the same time [3] * Bump PORTREVISION - japanese/mailman [2] * Switch to Japanized mailman 2.1.14+j7 based on mail/mailman * Take maintainership * Add CONFLICTS with mail/mailman * Update pkg-descr * Set PORTEPOCH because 2.1.14.j7 is less than 2.1.14_6 PR: ports/165404 (based on) [1], ports/165403 [2] Submitted by: tota (myself) [1] [2] Suggested by: Yoshito Takeuchi [3] Approved by: Sunagawa Koji (maintainer) [2] Dedicated to: Tokio Kikuchi
44 lines
2.1 KiB
Diff
44 lines
2.1 KiB
Diff
--- Mailman/Handlers/SMTPDirect.py.orig 2011-12-11 16:56:23.000000000 +0900
|
|
+++ Mailman/Handlers/SMTPDirect.py 2012-02-15 15:50:47.000000000 +0900
|
|
@@ -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)
|