From cee6bc3bea570c210b263d2d1192b15de950cbcf Mon Sep 17 00:00:00 2001 From: Stuart Gathman <stuart@gathman.org> Date: Wed, 2 Apr 2008 18:59:14 +0000 Subject: [PATCH] Release 0.8.10 --- Milter/utils.py | 8 ++++++-- bms.py | 6 +++++- milter.cfg | 5 ++++- milter.rc | 2 +- pymilter.spec | 10 +++++++++- quarantine.txt | 13 ------------- setup.py | 2 +- 7 files changed, 26 insertions(+), 20 deletions(-) diff --git a/Milter/utils.py b/Milter/utils.py index 4ae09df..b9c4a41 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 6795520..2a0105e 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 fd9a35e..60a1e80 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 133d68e..10903e3 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 cc24627..3baf416 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 cdf3f73..b060d75 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 43ef1cd..2f78b55 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 -- GitLab