Re: [Exim] Spamtrap, one copy for recipient, just one needed

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Odhiambo G. Washington
Fecha:  
A: exim-users
Asunto: Re: [Exim] Spamtrap, one copy for recipient, just one needed
* Maykel Moya <maykel.moya@???> [20040609 06:44]: wrote:
> I have set up a router+transport to move spam to an account for further
> review.
>
> at data acl
>
> ...
>
>   warn   message = X-Spam-Flagged: true
>          spam = nobody
>          log_message = spam score="$spam_score" rcpts="$recipients" > subject="$h_Subject:"
>          hosts = ! +relay_from_hosts
>          control = fakereject

>
> ...
>
> the router (i have placed it as first)
>
> spamtrap:
> driver = redirect
> condition = ${if def:h_X-Spam-Flagged: {1}{0}}
> file_transport = spamtrap_delivery
> data = /home/vmail/mydomain.com/spamtrap/Maildir
>
>
> the transport
>
> spamtrap_delivery:
> driver = appendfile
> envelope_to_add
> return_path_add
> mode = 0600
> maildir_format = true
> create_directory = true
> directory = /home/vmail/mydomain.com/spamtrap/Maildir
> user = foo
> group = bar
>
> 1. If someone send spam to multiple recipients, I got in spamtrap one
> mail per recipient, is it possible to get just one copy per spam
> message?


Yes, use the system filter. It is run once per message.

PS: If you want to use maildir with system filter:
(a) duplicate the address_directory transport, call it address_directory2.
(b) on address_directory2, add maildir_format.
(c) specify that transport in your system filter config:
    system_filter_directory_transport = address_directory2



Your filter should then look something like:

if ${if def:h_X-Spam-Flagged: true} is true then
unseen save /home/vmail/mydomain.com/spamtrap/Maildir//
endif

!!! WARNING !!! Untested! Rule may be incorrect, but other details
                are correct ;)



> 2. Can I use the value of router data option in the transport to avoid
> the repetition of the path of the mailbox in directory?


Not sure about that ;)


        cheers
       - wash
+----------------------------------+-----------------------------------------+
Odhiambo Washington                     . WANANCHI ONLINE LTD (Nairobi, KE)  |
<wash at wananchi dot com>              . 1ere Etage, Loita Hse, Loita St.,  |
GSM: (+254) 722 743 223                 . # 10286, 00100 NAIROBI             |
GSM: (+254) 733 744 121                 . (+254) 020 313 985 - 9             |
+---------------------------------+------------------------------------------+
"Oh My God! They killed init! You Bastards!"
                         --from a /. post