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

Do not CBV whitelisted addresses. We already know they are good.

parent 017784b5
No related branches found
No related tags found
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.118 2008/01/09 20:15:49 customdesigned
# Handle unquoted fullname when parsing email.
#
# Revision 1.117 2007/11/29 14:35:17 customdesigned # Revision 1.117 2007/11/29 14:35:17 customdesigned
# Packaging tweaks. # Packaging tweaks.
# #
...@@ -835,6 +838,7 @@ class bmsMilter(Milter.Milter): ...@@ -835,6 +838,7 @@ class bmsMilter(Milter.Milter):
else: else:
self.dspam = False self.dspam = False
self.log("PROBATION",self.canon_from) self.log("PROBATION",self.canon_from)
self.cbv_needed = None
elif cbv_cache.has_key(self.canon_from) and cbv_cache[self.canon_from] \ elif cbv_cache.has_key(self.canon_from) and cbv_cache[self.canon_from] \
or domain in blacklist: or domain in blacklist:
if not self.internal_connection: if not self.internal_connection:
...@@ -986,7 +990,7 @@ class bmsMilter(Milter.Milter): ...@@ -986,7 +990,7 @@ class bmsMilter(Milter.Milter):
"that contain your IP don't count), an invalid or dynamic HELO, ", "that contain your IP don't count), an invalid or dynamic HELO, ",
"and no SPF record." "and no SPF record."
) )
return Milter.REJECT return self.offense() # ban ip if too many bad MFROMs
if res in ('deny', 'fail'): if res in ('deny', 'fail'):
policy = p.getFailPolicy() policy = p.getFailPolicy()
if policy == 'CBV': if policy == 'CBV':
...@@ -1720,7 +1724,7 @@ class bmsMilter(Milter.Milter): ...@@ -1720,7 +1724,7 @@ class bmsMilter(Milter.Milter):
# the "Fraudulent MX" error). Whitelisted senders clearly do not # the "Fraudulent MX" error). Whitelisted senders clearly do not
# need CBV. However, whitelisted domains might (to discover # need CBV. However, whitelisted domains might (to discover
# bogus localparts). Need a way to tell the difference. # bogus localparts). Need a way to tell the difference.
if self.cbv_needed and not self.internal_domain and not self.whitelist: if self.cbv_needed and not self.internal_domain:
q,res = self.cbv_needed q,res = self.cbv_needed
if res == 'softfail': if res == 'softfail':
template_name = 'softfail' template_name = 'softfail'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment