bernhard: utils/testing send_filtertest_emails.py,1.4,1.5

cvs at intevation.de cvs at intevation.de
Tue Jun 7 12:45:28 CEST 2005


Author: bernhard

Update of /kolabrepository/utils/testing
In directory doto:/tmp/cvs-serv17366

Modified Files:
	send_filtertest_emails.py 
Log Message:
Added sanity check that the username does not contain an @.
Added test for issue783.


Index: send_filtertest_emails.py
===================================================================
RCS file: /kolabrepository/utils/testing/send_filtertest_emails.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- send_filtertest_emails.py	1 Jun 2005 13:38:16 -0000	1.4
+++ send_filtertest_emails.py	7 Jun 2005 10:45:26 -0000	1.5
@@ -116,6 +116,10 @@
         print >>sys.stderr, "--smtp-host missing"
         error = True
 
+    if '@' in username:
+        print >>sys.stderr, "error: \"@\" in username!"
+        error = True
+
     if error:
         sys.exit(1)
 
@@ -145,6 +149,12 @@
     # 3: delivered, no mailer-daemon in kolabfilter log: 
     #                    issue774 (null senders not handled by kolabfilter...)
     send_mail("<>", envelope_to, "some at non-existing.local", header_to, 3,
+              smtp_host = smtp_host, smtp_port = smtp_port)
+
+    # 4: delivered, no Invalid From: header in postfix log:
+    # issue783 (envelope header from check has problems with mailinglists)
+    send_mail("x-commits-bounces-+y=malinglist.org at big.local", envelope_to, 
+              header_from, header_to, 4,
               smtp_host = smtp_host, smtp_port = smtp_port)
 
 if __name__=="__main__":





More information about the commits mailing list