Skip to content
Snippets Groups Projects
Commit e84a803c authored by Stuart Gathman's avatar Stuart Gathman
Browse files

Handle missing HELO.

parent 20612240
No related branches found
No related tags found
No related merge requests found
...@@ -110,6 +110,10 @@ class spfMilter(Milter.Milter): ...@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment