[exim] Spam Block Idea Implementation.

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Sherwood Botsford
Date:  
À: exim-users
Sujet: [exim] Spam Block Idea Implementation.

As you may remember in the last episode, I was looking for a way to
create a spamtrap by salting false addresses for web harvesters,
then rejecting out of hand any message that contained the false recipient.

This is what I did:

In acl_check_rcpt: (acl_smtp_rcpt)

 accept domains = +local_domains
          recipients = /opt/exim/spamtrap
          set acl_m0 = "SpamTrap"


... rest of content

in acl_check_content: (acl_smtp_data)
acl_check_content:

  deny message = "Addressed to non-existent recipient"
       condition = ${if  match \
                        {$acl_m0} \
                        {"SpamTrap"} \
                        {1}{0}}


... rest of content.


This works.

However I would like to do something less severe than denying it.
Say, perhaps save a copy of it to a file, so that I can check through it and see if it
is doing what I think it is.

I haven't been able to configure a router to deal with a message. Routers, by their nature
seem to deal with addresses.

So, for example, this router does not do what I want:
spamtrap_router:
driver = accept
domains = +local_domains
condition = { match {$acl_m0}{"SpamTrap"}}
transport = spamtrap_transport

If this is called with exim -bv spienko@???,sbotsford@??? it is run separately
for each address. This puts one copy on the spamtrap_transport for every receiving user.


How do I perform an action just once for a message, as opposed to doing it once for each recipient?

At present the only option that occurs to me is adding a header in the rcpt acl, then testing for this
header in a system filter. This is clunky. (It also means I have to upgrade. Compile is in progress.)







--
Sherwood Botsford
St. John's School of Alberta