Tom Allison <[EMAIL PROTECTED]> writes: > I was hoping that there would be some way to put tmda-filter into the > middle of a procmail set of recipes for the following reasons:
This is difficult as you've phrased it, but can be worked around. Keep reading. :) > I want to be able to filter some mail (spam tests mostly) before it > gets to tmda-filter so I dont' have to even bother with it at all. At > least I would like the option of putting really high scoring email > into /dev/null This is no trouble. Filter and deliver all you want before running TMDA. Obviously, anything that's delivered by procmail won't be seen by TMDA, but that's usually what you want. > I would also like to be able to filter the email after it's been > received by tmda-filter into mailboxes other than the default. How is > this done? The problem here is that, in the case where TMDA tucks the message away in pending/ and sends the confirmation request, mail processing is finished, at least logically. You could then go on and deliver what is likely spam, but why? What's missing at this point is a way to determine what tmda-filter did with the message. So, further procmail rules would be unable to distinguish between valid mail and mail for which TMDA has sent a request for confirmation. The workaround for this is to have two procmailrc files. The first is your normal ~/.procmailrc. The second needs to have a different name; I'll call it ~/.post-tmda-rc. Place the rules you want handled before TMDA runs in ~/.procmailrc. Then call tmda-filter at the end like the config-server.html page shows. Second, set DELIVERY in your TMDA config file to this (adjust path to taste): DELIVERY = "/usr/local/bin/procmail -p ~/.post-tmda-rc" Finally, in the ~/.post-tmda-rc file, do all the filtering and deliveries you want to do after TMDA has processed the message. This solves the problem because tmda-filter will only call this second copy of procmail for messages that pass through the incoming filter successfully. It will not get called for messages that get placed in pending/ and have a confirmation sent. All you have to worry about in ~/.post-tmda-rc are valid messages. > Similarly, how is something like Debian-users handled? > From: contains a specific name > Reply-To: contains the list name > Am I sending out a lot of confirmation requests??? Most likely not, since TMDA recognizes a number of headers that indicate the message is from a list and does not auto-reply with a confirmation. > (My initial thought was to have procmail exclude FROM_DAEMON matches > from getting to tmda-filter) This would work fine. There's not much point in filtering mailing lists with TMDA, so you could do all mailing list delivery from procmail *before* running tmda-filter. If you want TMDA to do the delivery to different mailboxes/maildirs, then you would set this up in your incoming filter instead of in your .procmailrc. Tim _____________________________________________ tmda-users mailing list ([EMAIL PROTECTED]) http://tmda.net/lists/listinfo/tmda-users
