From d50215d0ba1801e32e37f5522f7fec2bae668c40 Mon Sep 17 00:00:00 2001 From: Stuart Gathman Date: Wed, 21 Jun 2006 21:07:11 +0000 Subject: [PATCH] Include header fields in DSN template. --- Milter/dsn.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Milter/dsn.py b/Milter/dsn.py index 158b687..76e2a1e 100644 --- a/Milter/dsn.py +++ b/Milter/dsn.py @@ -5,6 +5,9 @@ # Send DSNs, do call back verification, # and generate DSN messages from a template # $Log$ +# Revision 1.10 2006/05/24 20:56:35 customdesigned +# Remove default templates. Scrub test. +# import smtplib import spf @@ -91,7 +94,7 @@ def create_msg(q,rcptlist,origmsg=None,template=None): template = softfail_msg else: template = nospf_msg - hdrs,body = template.split('\n',1) + hdrs,body = template.split('\n\n',1) for ln in hdrs.splitlines(): name,val = ln.split(':',1) msg.add_header(name,(val % locals()).strip()) @@ -103,7 +106,6 @@ def create_msg(q,rcptlist,origmsg=None,template=None): msg.add_header('From','postmaster@%s'%receiver) if 'auto-submitted' not in msg: msg.add_header('Auto-Submitted','auto-generated') - return msg if __name__ == '__main__':