diff --git a/Milter/utils.py b/Milter/utils.py index 4ae09dfa2a68483d5bd0ad9e1dfb598566b7b649..b9c4a41b04b213fa7e7212d00ca5aaef167f2c2f 100644 --- a/Milter/utils.py +++ b/Milter/utils.py @@ -49,10 +49,14 @@ def parseaddr(t): ('', 'user@example.com') >>> parseaddr('"Full Name" <foo@example.com>') ('Full Name', 'foo@example.com') - >>> parseaddr('spam@viagra.com <foo@example.com>') - ('spam@viagra.com', 'foo@example.com') + >>> parseaddr('spam@spammer.com <foo@example.com>') + ('spam@spammer.com', 'foo@example.com') >>> parseaddr('God@heaven <@hop1.org,@hop2.net:jeff@spec.org>') ('God@heaven', 'jeff@spec.org') + >>> parseaddr('Real Name ((comment)) <addr...@example.com>') + ('Real Name', 'addr...@example.com') + >>> parseaddr('a(WRONG)@b') + ('WRONG', 'a@b') """ #return email.Utils.parseaddr(t) res = rfc822.parseaddr(t) diff --git a/bms.py b/bms.py index 6795520098f6a53a2503564cd86603359c52abce..2a0105e40b7224491b25c9694486b0ecec83a61f 100644 --- a/bms.py +++ b/bms.py @@ -1,6 +1,9 @@ #!/usr/bin/env python # A simple milter that has grown quite a bit. # $Log$ +# Revision 1.119 2008/04/01 00:13:10 customdesigned +# Do not CBV whitelisted addresses. We already know they are good. +# # Revision 1.118 2008/01/09 20:15:49 customdesigned # Handle unquoted fullname when parsing email. # @@ -838,7 +841,8 @@ class bmsMilter(Milter.Milter): else: self.dspam = False self.log("PROBATION",self.canon_from) - self.cbv_needed = None + if res not in ('permerror','softfail'): + self.cbv_needed = None elif cbv_cache.has_key(self.canon_from) and cbv_cache[self.canon_from] \ or domain in blacklist: if not self.internal_connection: diff --git a/milter.cfg b/milter.cfg index fd9a35e38dce4fdad7b45d265f5d0aaafe242490..60a1e80a7edf315901868d1fe9009dadb984c7f5 100644 --- a/milter.cfg +++ b/milter.cfg @@ -26,7 +26,10 @@ internal_connect = 192.168.0.0/16,127.* ;trusted_relay = 1.2.3.4, 66.12.34.56 # Relaying to these domains is allowed from internal connections only. -;private_relay = mycorp.com +# You might want to restrict aol.com, for instance, so that stupid +# users don't forward their spam to aol for filtering and get your MTA +# blacklisted by aol. +;private_relay = aol.com, yahoo.com # Reject external senders with hello names no legit external sender would use. # SPF will do this also, but listing your own domain and mailserver here diff --git a/milter.rc b/milter.rc index 133d68e980b877a92ba8f022114ae869fa85bf03..10903e3ef6e1301a81c5bff6e0a0564ebc06416f 100755 --- a/milter.rc +++ b/milter.rc @@ -46,7 +46,7 @@ start() { stop() { # Stop daemons. echo -n "Shutting down $prog: " - killproc -d 5 milter + killproc -d 9 milter RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/milter diff --git a/pymilter.spec b/pymilter.spec index cc24627105404ba2d3f775d6ff1a6a8e05d14f34..3baf416802a2e7484dec8cee9daff07b99070c5e 100644 --- a/pymilter.spec +++ b/pymilter.spec @@ -90,7 +90,7 @@ cat >$RPM_BUILD_ROOT/etc/logrotate.d/milter <<'EOF' compress } /var/log/milter/banned_ips { - rotate 3 + rotate 7 daily copytruncate } @@ -274,6 +274,13 @@ grep '.pyc$' INSTALLED_FILES | sed -e 's/c$/o/' >>INSTALLED_FILES rm -rf $RPM_BUILD_ROOT %changelog +* Mon Sep 24 2007 Stuart Gathman <stuart@bmsi.com> 0.8.10-1 +- improved parsing into email and fullname +- implement no-DSN CBV +- check for porn words in MAIL FROM fullname +- ban IP for too many bad MAIL FROMs +- temperror policy in access +- no CBV for whitelisted MAIL FROM except permerror, softfail * Mon Sep 24 2007 Stuart Gathman <stuart@bmsi.com> 0.8.9-1 - Use %ifarch hack to build milter and milter-spf packages as noarch - Remove spf dependency from dsn.py, add dns.py @@ -292,6 +299,7 @@ rm -rf $RPM_BUILD_ROOT - SPF moved to pyspf RPM - wiretap archive option - Do plain CBV if missing template +- SMTP AUTH policy in access * Tue May 23 2006 Stuart Gathman <stuart@bmsi.com> 0.8.6-2 - Support CBV timeout - Support fail template, headers in templates diff --git a/quarantine.txt b/quarantine.txt index cdf3f7354c2b5d83e76123ba7c987fa2d2619984..b060d75cd5b3d7aeb9027f26f32b2528e96d7fd7 100644 --- a/quarantine.txt +++ b/quarantine.txt @@ -22,19 +22,6 @@ their quarantined mail and may notice your message. If your message is important, please contact them via other means. You may also try sending them a simple plain text message. -If you never sent the above message, then your domain, %(sender_domain)s, -was forged - i.e. used without your knowlege or authorization by -someone attempting to steal your mail identity. This is a very -serious problem, and you need to provide authentication for your -SMTP (email) servers to prevent criminals from forging your -domain. The simplest step is usually to publish an SPF record -with your Sender Policy. - -For more information, see: http://www.openspf.org - -Your mail admin needs to publish a strict SPF record so that I can reject -those forgeries instead of bugging you with them. - If you need further assistance, please do not hesitate to contact me. Kind regards, diff --git a/setup.py b/setup.py index 43ef1cd676e775d7814c35275a49ef283c280f58..2f78b552ac78b76b5d61cd258c6feed4ffe6e546 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ if sys.version < '2.2.3': DistributionMetadata.download_url = None # NOTE: importing Milter to obtain version fails when milter.so not built -setup(name = "pymilter", version = '0.8.9', +setup(name = "pymilter", version = '0.8.10', description="Python interface to sendmail milter API", long_description="""\ This is a python extension module to enable python scripts to