-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, Feb 24, 2004 at 04:36:52PM +0000, kevin lyda wrote:

[...]
>i watched my (maildir formatted) ~/Mail/sa/ folder for a while but there
>were no positives.  my only complaint is that i wish that tmda tagged
>addresses could be delivered w/o being seen by spam assassin. [...]

My TMDA+SA solution (which I'd like to put on the Wiki RSN) takes care of
that.  I run SA from .procmailrc (before TMDA):

# If it's not going to a TMDA tagged address,
# and it's not already tagged as spam (a wacky local thing),
# and it's not already been to see TMDA (because it's a confirmed message),
# then run it through spamassassin

:0 fw
* !^To: .*kyle-(exp|expires|dated|d|key|keyword|kw|cnf|confirm|c|snd|src|sender|s)-.*@
* !^X-Spam-Status: Yes
* !^X-TMDA-
| spamassassin

# If it's to a dated address, I want to give it a chance to deliver even if
# TMDA considers the address expired.  If it's still valid, don't spam check
# it.  TMDA may act on the SA headers before it realizes it's a valid dated
# address.  That is, I want valid dated addresses to deliver even if SA thinks
# they're spam.

:0 fw
* !^X-Spam-Status: Yes
* !^X-TMDA-
* ^To: .*\/kyle-(exp|expires|dated|d)-.*@
* $!? /usr/bin/tmda-check-address '$MATCH' | grep -q '^STATUS: VALID'
| spamassassin

# There's no point in letting TMDA see these now.
:0
* ^X-Spam-Status: No
$DEFAULT

Then at the end of filters/incoming, I have this:

#
# At this point, we know the message is NOT on my whitelist,
# and it's also not on any blacklist.  Procmail is set up to
# filter the message through SpamAssassin only when it's not
# to a tagged address.  Therefore, the following rules will not
# match a tagged addressed mail, and those will be evaluated
# based on their tags.
#

#                       1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
headers 'X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*' hold
headers 'X-Spam-Status: No' ok

So:

* Email to TMDA tagged addresses does NOT go to SA.
* Email to invalid (typically expired) dated addresses DOES go to SA.
* Anything that goes to SA can be delivered directly if SA loves it
  (this is based on the required_hits parameter in the SA config).
* TMDA's whitelist, etc., in filters/incoming takes precedence over SA.
* Anything that goes to SA can be held without challenge if SA hates it
  (based on the X-Spam-Level that filters/incoming sees).
* Email that does not go to SA is treated however TMDA wants to treat it.

Ultimately, TMDA gets the mail meant for it (tagged addresses) and treats
it on its terms.  Email that SA loves (scores under required_hits) bypasses
TMDA.  Everything else is subject to TMDA's white/black lists and then
either held or challenged based on how much SA hated it (X-Spam-Level).

Does that all make sense?
- -- 
Kyle Hasselbacher | One of the most striking differences between a cat and a
[EMAIL PROTECTED]  | lie is that a cat has only nine lives. -- Mark Twain
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAO4yV10sofiqUxIQRAoXnAJsFC67OUB30qoq1NfoekANWtDzyGwCfXGJI
gOxul3qDLDC5PYzxUkjW2kA=
=cd3f
-----END PGP SIGNATURE-----
_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users

Reply via email to