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

Do not send quarantine DSN when sender is DSN.

parent aaf23f35
Branches
Tags
No related merge requests found
#!/usr/bin/env python #!/usr/bin/env python
# A simple milter that has grown quite a bit. # A simple milter that has grown quite a bit.
# $Log$ # $Log$
# Revision 1.36 2005/10/23 16:01:29 customdesigned
# Consider MAIL FROM a match for supply_sender when a subdomain of From or Sender
#
# Revision 1.35 2005/10/20 18:47:27 customdesigned # Revision 1.35 2005/10/20 18:47:27 customdesigned
# Configure auto_whitelist senders. # Configure auto_whitelist senders.
# #
...@@ -1374,7 +1377,7 @@ class bmsMilter(Milter.Milter): ...@@ -1374,7 +1377,7 @@ class bmsMilter(Milter.Milter):
if self.whitelist: if self.whitelist:
# don't train when recipients includes honeypot # don't train when recipients includes honeypot
return False return False
if self.spf: if self.spf and self.mailfrom != '<>'
# check that sender accepts quarantine DSN # check that sender accepts quarantine DSN
msg = mime.message_from_file(StringIO.StringIO(txt)) msg = mime.message_from_file(StringIO.StringIO(txt))
rc = self.send_dsn(self.spf,msg,'quarantine.txt') rc = self.send_dsn(self.spf,msg,'quarantine.txt')
...@@ -1432,7 +1435,7 @@ class bmsMilter(Milter.Milter): ...@@ -1432,7 +1435,7 @@ class bmsMilter(Milter.Milter):
self.fp = None self.fp = None
return Milter.REJECT return Milter.REJECT
self.log("DSPAM:",screener,"SCREENED") self.log("DSPAM:",screener,"SCREENED")
if self.spf: if self.spf and self.mailfrom != '<>':
# check that sender accepts quarantine DSN # check that sender accepts quarantine DSN
self.fp.seek(0) self.fp.seek(0)
msg = mime.message_from_file(self.fp) msg = mime.message_from_file(self.fp)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment