On Mon, 25 Mar 2002, Greg Webster wrote:
> none of the actual questions in my post were ever answered,
Fishing in the archive (I'd not replied because others done so, and I
don't want to spend all my time answering the list), I find this:
> What I'd like to see is a director (?) that uses a file:
>
> ~/.spamkill (or similar)
>
> ...containing lines that are regexp matches and directives on how to handle the spam. The lines would look like this:
>
> subject:^*MAKE MONEY*$:delete
> subject:^*[teen|sex]*$:redirect myenemy@???
> subject:^* \[*\]$:bounce
> from:*@*.spammerdomain.com:bounce
> body:*invest in our fund*make millions*:delete
>
> This, in combination with the RBL that I use, would give me near complete control over the spam I receive and how I handle it.
>
> Is this even possible? Is anyone willing to do this/point me to a very clear resource on writing such a director?
It should be possible to do something like this fairly easily in Exim 4,
but you will have to write (or persuade somebody to write) some C code.
In Exim 4, you can link in your own function called local_scan(), which
gets to look at a message just before it is finally accepted. It can
tell Exim to bounce the message, or accept it, and it can manipulate the
list of recipients. Deleting all the recipients blackholes the message.
Since Exim is lined with PCRE, you have access to a regex library, so
writing something to your spec doesn't look very hard.
Philip
--
Philip Hazel University of Cambridge Computing Service,
ph10@??? Cambridge, England. Phone: +44 1223 334714.