Re: sa-exim and temp reject...

Marc MERLIN <[email protected]>
Newsgroups gmane.mail.exim.spamassassin
Message-ID <[email protected]>
[Cc sa-exim, since both the question and answer should be interesting]

On Thu, Aug 21, 2003 at 03:10:06PM +0100, David Woodhouse wrote:
> Feature request... I'd like to temporarily reject mail with a medium
> SpamAssassin score, but keep a week's worth of message-ids of mails
> which were temporarily rejected, and _allow_ the same mail if it's
> retried.

I see what you're trying to do.
BTW, I heard from a friend in the anti-spam field that this scheme doesn't
work nearily as well as it used to, but it's still ok.

Let's look at implementations.
1) Lower your sa-exim tempreject score to let's say 2 or 3

2a) modify SA to touch /var/spool/samesgid/<mesgid>
    (done in /usr/share/perl5/Mail/SpamAssassin.pm, see my timelog function
    there and steal from it)
3a) Add a simple SA check to stat /var/spool/samesgid/<mesgid>
    and add a score of -5 or such if it's there.

2b) modify sa-exim to touch /var/spool/samesgid/<mesgid> before issuing
    a tempreject (this is effectively already done if you use the save
    temp rejected messages feature)
3b) for each message, before running SA, stat /var/spool/samesgid/<mesgid>
    if the stat succeeds, add a X-SA-Exim-Already-Seen: secret value header
4b) write a trivial SA rule to lower score by 5 if X-SA-Exim-Already-Seen
    is there with the right value
5b) strip X-SA-Exim-Already-Seen in system_filter

Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/   |   Finger [email protected] for PGP key
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.