Handle missing HELO.

This commit is contained in:
Stuart Gathman
2007-02-21 22:14:41 +00:00
parent 20612240f3
commit e84a803cc1
+4
View File
@@ -110,6 +110,10 @@ class spfMilter(Milter.Milter):
# of each message. # of each message.
def envfrom(self,f,*str): def envfrom(self,f,*str):
self.log("mail from",f,str) self.log("mail from",f,str)
if not self.hello_name:
self.log('REJECT: SPF %s %i %s' % (res,code,txt))
self.setreply('550','5.7.1',"It's polite to say helo first.")
return Milter.REJECT
self.mailfrom = f self.mailfrom = f
self.new_headers = [] self.new_headers = []
t = parse_addr(f) t = parse_addr(f)