Consider MAIL FROM a match for supply_sender when a subdomain of From or Sender
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
Here is a history of user visible changes to Python milter.
|
Here is a history of user visible changes to Python milter.
|
||||||
|
|
||||||
0.8.4 Auto-whitelist recipients of outgoing email.
|
0.8.4 Auto-whitelist recipients of outgoing email.
|
||||||
|
Fix SPF policy via sendmail access map (case insensitive keys).
|
||||||
|
Train screener on whitelisted messages
|
||||||
|
Optional idx parameter to addheader to invoke smfi_insheader
|
||||||
|
Activate progress API when SMFIR_PROGRESS defined
|
||||||
0.8.3 Keep screened honeypot mail, but optionally discard honeypot only mail.
|
0.8.3 Keep screened honeypot mail, but optionally discard honeypot only mail.
|
||||||
spf_accept_fail option for braindead SPF senders
|
spf_accept_fail option for braindead SPF senders
|
||||||
(treats fail like softfail)
|
(treats fail like softfail)
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
#!/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.35 2005/10/20 18:47:27 customdesigned
|
||||||
|
# Configure auto_whitelist senders.
|
||||||
|
#
|
||||||
# Revision 1.34 2005/10/19 21:07:49 customdesigned
|
# Revision 1.34 2005/10/19 21:07:49 customdesigned
|
||||||
# access.db stores keys in lower case
|
# access.db stores keys in lower case
|
||||||
#
|
#
|
||||||
@@ -1233,8 +1236,9 @@ class bmsMilter(Milter.Milter):
|
|||||||
msg = rfc822.Message(self.fp)
|
msg = rfc822.Message(self.fp)
|
||||||
for rn,hf in msg.getaddrlist('from')+msg.getaddrlist('sender'):
|
for rn,hf in msg.getaddrlist('from')+msg.getaddrlist('sender'):
|
||||||
t = parse_addr(hf)
|
t = parse_addr(hf)
|
||||||
if len(t) == 2 and t[1].lower() == mf_domain:
|
if len(t) == 2:
|
||||||
break
|
hd = t[1].lower()
|
||||||
|
if hd == mf_domain or mf_domain.endswith('.'+hd): break
|
||||||
else:
|
else:
|
||||||
for f in msg.getallmatchingheaders('from'):
|
for f in msg.getallmatchingheaders('from'):
|
||||||
self.log(f)
|
self.log(f)
|
||||||
|
|||||||
+8
-1
@@ -24,7 +24,7 @@ ALT="Viewable With Any Browser" BORDER="0"></A>
|
|||||||
Stuart D. Gathman</a><br>
|
Stuart D. Gathman</a><br>
|
||||||
This web page is written by Stuart D. Gathman<br>and<br>sponsored by
|
This web page is written by Stuart D. Gathman<br>and<br>sponsored by
|
||||||
<a href="http://www.bmsi.com">Business Management Systems, Inc.</a> <br>
|
<a href="http://www.bmsi.com">Business Management Systems, Inc.</a> <br>
|
||||||
Last updated Oct 12, 2005</h4>
|
Last updated Oct 20, 2005</h4>
|
||||||
|
|
||||||
See the <a href="faq.html">FAQ</a> | <a href="http://sourceforge.net/project/showfiles.php?group_id=139894">Download now</a> |
|
See the <a href="faq.html">FAQ</a> | <a href="http://sourceforge.net/project/showfiles.php?group_id=139894">Download now</a> |
|
||||||
<a href="/mailman/listinfo/pymilter">Subscribe to mailing list</a> |
|
<a href="/mailman/listinfo/pymilter">Subscribe to mailing list</a> |
|
||||||
@@ -51,6 +51,13 @@ Python milter has been moved to
|
|||||||
<a href="http://sourceforge.net/projects/pymilter/">pymilter Sourceforge
|
<a href="http://sourceforge.net/projects/pymilter/">pymilter Sourceforge
|
||||||
project</a> for development and release downloads.
|
project</a> for development and release downloads.
|
||||||
<p>
|
<p>
|
||||||
|
Release 0.8.4 makes configuring SPF policy via access.db actually work.
|
||||||
|
The honeypot idea is enhanced by auto-whitelisting recipients of
|
||||||
|
email sent from selected domains. Whitelisted messages are then used
|
||||||
|
to train the honeypot. This makes the honeypot screener entirely self
|
||||||
|
training. The smfi_progress() API is now automatically supported when present.
|
||||||
|
An optional idx parameter to milter.addheader() invokes smfi_insheader().
|
||||||
|
<p>
|
||||||
Release 0.8.3 uses the standard logging module, and supports configuring
|
Release 0.8.3 uses the standard logging module, and supports configuring
|
||||||
more detailed SPF policy via the sendmail access map. SMTP AUTH connections
|
more detailed SPF policy via the sendmail access map. SMTP AUTH connections
|
||||||
are considered INTERNAL. Preventing forgery between internal domains is
|
are considered INTERNAL. Preventing forgery between internal domains is
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
# chkconfig: 2345 80 30
|
# chkconfig: 2345 80 30
|
||||||
# description: Milter is a process that filters messages sent through sendmail.
|
# description: Milter is a process that filters messages sent through sendmail.
|
||||||
# processname: milter
|
# processname: milter
|
||||||
# config: /var/log/milter/bms.py
|
# config: /etc/mail/pymilter.cfg
|
||||||
# pidfile: /var/run/milter/milter.pid
|
# pidfile: /var/run/milter/milter.pid
|
||||||
|
|
||||||
python="python2.3"
|
python="python2.3"
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
# chkconfig: 2345 80 30
|
# chkconfig: 2345 80 30
|
||||||
# description: Milter is a process that filters messages sent through sendmail.
|
# description: Milter is a process that filters messages sent through sendmail.
|
||||||
# processname: milter
|
# processname: milter
|
||||||
# config: /var/log/milter/bms.py
|
# config: /etc/mail/pymilter.cfg
|
||||||
# pidfile: /var/run/milter/milter.pid
|
# pidfile: /var/run/milter/milter.pid
|
||||||
|
|
||||||
python="python2.3"
|
python="python2.3"
|
||||||
|
|||||||
+3
-1
@@ -55,7 +55,7 @@ modules provide for navigating and modifying MIME parts.
|
|||||||
#%patch -p1
|
#%patch -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
env CFLAGS="$RPM_OPT_FLAGS" %{python} setup.py build
|
env CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" %{python} setup.py build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
@@ -169,6 +169,8 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
/usr/share/sendmail-cf/hack/rhsbl.m4
|
/usr/share/sendmail-cf/hack/rhsbl.m4
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Oct 21 2005 Stuart Gathman <stuart@bmsi.com> 0.8.4-2
|
||||||
|
- Don't supply sender when MFROM is subdomain of header from/sender.
|
||||||
* Thu Oct 20 2005 Stuart Gathman <stuart@bmsi.com> 0.8.4-1
|
* Thu Oct 20 2005 Stuart Gathman <stuart@bmsi.com> 0.8.4-1
|
||||||
- Fix SPF policy via sendmail access map (case insensitive keys).
|
- Fix SPF policy via sendmail access map (case insensitive keys).
|
||||||
- Auto whitelist senders, train screener on whitelisted messages
|
- Auto whitelist senders, train screener on whitelisted messages
|
||||||
|
|||||||
Reference in New Issue
Block a user