CVS: tmda/bin tmda-address,1.12,1.13 tmda-inject,1.91,1.92 tmda-rfilter,1.104,1.105
"Jason R. Mastaler" <[email protected]>
| Newsgroups | gmane.mail.spam.tmda.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/tmda/tmda/bin In directory sc8-pr-cvs1:/tmp/cvs-serv569/bin Modified Files: tmda-address tmda-inject tmda-rfilter Log Message: New feature from Ed Blackman. 'sender' style tagged addresses have been enhanced to check entire domains instead of just a full e-mail address. Thus, you can generate a tagged address that will accept mail from [email protected], [email protected], or even anyone@tld. You can generate such tagged addresses using tmda-address, the new 'domain' action in your FILTER_OUTGOING file, or 'X-TMDA: domain'. See http://us.tmda.net/config-filter.html for more info. Also see http://mla.libertine.org/tmda-workers/2003-08/msg00145.html for a detailed description of how this new feature works. Index: tmda-address =================================================================== RCS file: /cvsroot/tmda/tmda/bin/tmda-address,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- tmda-address 15 May 2003 21:11:35 -0000 1.12 +++ tmda-address 2 Sep 2003 03:53:52 -0000 1.13 @@ -52,7 +52,7 @@ -s <address> --sender <address> Generate a sender-style tagged address. address is - a required sender e-mail address. + a required sender e-mail address or domain name. -d [timeout] --dated [timeout] Index: tmda-inject =================================================================== RCS file: /cvsroot/tmda/tmda/bin/tmda-inject,v retrieving revision 1.91 retrieving revision 1.92 diff -u -r1.91 -r1.92 --- tmda-inject 11 Jul 2003 23:02:59 -0000 1.91 +++ tmda-inject 2 Sep 2003 03:53:52 -0000 1.92 @@ -186,6 +186,11 @@ # Send a message with a tagged (sender) address sender_cookie_address = cookie_option or to_address field = Cookie.make_sender_address (from_address, sender_cookie_address) + elif cookie_type == 'domain': + # Send a message with a tagged (sender) address using only the + # domain portion of the address + domain_cookie_address = (cookie_option or to_address).split('@')[-1] + field = Cookie.make_sender_address (from_address, domain_cookie_address) elif cookie_type in ('as','exp','explicit') and cookie_option: # Send a message with an explicitly defined address. field = cookie_option Index: tmda-rfilter =================================================================== RCS file: /cvsroot/tmda/tmda/bin/tmda-rfilter,v retrieving revision 1.104 retrieving revision 1.105 diff -u -r1.104 -r1.105 --- tmda-rfilter 20 Aug 2003 23:47:55 -0000 1.104 +++ tmda-rfilter 2 Sep 2003 03:53:52 -0000 1.105 @@ -173,6 +173,7 @@ from TMDA import Defaults +from TMDA import Address from TMDA import Cookie from TMDA import Errors from TMDA import FilterParser @@ -636,12 +637,12 @@ def verify_sender_cookie(sender_address,sender_cookie): """Verify a sender cookie.""" - sender_address_cookie = Cookie.make_sender_cookie(sender_address) - # Accept the message only if the HMAC can be verified. - if (sender_cookie == sender_address_cookie): + try: + addr = Address.Factory(envelope_recipient) + addr.verify(sender_address) logit("OK", "good_sender_cookie") mta.deliver(msgin) - else: + except Address.AddressError, msg: defact = Defaults.ACTION_FAIL_SENDER.lower() bouncetext = Defaults.BOUNCE_TEXT_FAIL_SENDER do_default_action(defact, 'action_fail_sender', bouncetext) _______________________________________ tmda-cvs mailing list http://tmda.net/lists/listinfo/tmda-cvs