CVS: tmda/contrib smtp-check-sender,1.1,1.2

"Jason R. Mastaler" <[email protected]>
Newsgroups gmane.mail.spam.tmda.cvs
Message-ID <[email protected]>
Update of /cvsroot/tmda/tmda/contrib
In directory sc8-pr-cvs1:/tmp/cvs-serv22016/contrib

Modified Files:
	smtp-check-sender 
Log Message:
smtp-check-sender had a small bug that causes a broken pipe when
$SENDER is empty.


Index: smtp-check-sender
===================================================================
RCS file: /cvsroot/tmda/tmda/contrib/smtp-check-sender,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- smtp-check-sender	9 Apr 2003 01:26:01 -0000	1.1
+++ smtp-check-sender	26 Aug 2003 20:03:47 -0000	1.2
@@ -69,11 +69,16 @@
 import socket
 import sys
 
+# we read stdin, but don't actually use it
+data = sys.stdin.read()
+
+# bail out here if no address is specified
+if len(sys.argv) < 2:
+    sys.exit(1)
+
 mail_from_address = '[email protected]'
 address_to_verify = sys.argv[1]
 verify_hostname = address_to_verify.split('@', 1)[1]
-# we read stdin, but don't actually use it
-data = sys.stdin.read()
 
 DNS.DiscoverNameServers()
 

_______________________________________
tmda-cvs mailing list
http://tmda.net/lists/listinfo/tmda-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.