Re: [exim] Get spamassassin to deliver spam to a special mai…

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Exim User's Mailing List
Data:  
Para: exim-users
Asunto: Re: [exim] Get spamassassin to deliver spam to a special mailbox?
Coach-X wrote:
> Joe Kocsis wrote:
>>I am Is there a way through a special router to get exim to deliver spam
>>to a special local email address for logging and verification?
>>
>>ex:  I want all messages marked SPAM deliever to spam@???, but
>>also delivered to the user.. This way I can have a log of messages
>>marked spam, and tighten up my spam controls..
>>    I am running exim 4.5 with spamassassin called via a router, not
>>exiscan...

>
> Using the system filter:
>
> ## Spam Collector ##
>          if $h_subject: contains "*****SPAM*****"
>          then
>            unseen deliver spam_collector
>          endif

>
> You will need to enable system_filter in your config file.
>


Or without the system_filter and using control=fakereject
In data_acl:

  accept  message       = Spam score too high still
          condition     = ${if <{$message_size}{80k}{1}{0}}
          spam          = spamc:true/defer_ok
          condition     = ${if >{$spam_score_int}{100}{1}{0}}
          set acl_c0    = spamtrap
          control       = fakereject/Spam score too high


In router acl (at start):

# catch those "special" messages that everyone loves to hate
spamtraps:
driver = accept
condition = ${if eq{$acl_c0}{spamtrap}{1}{0}}
transport = spamtrap

In transports (anywhere):
# For delivering spamtrap'd messages to my "special" folder
spamtrap:
driver = appendfile
directory = /home/spamc/SPAMTRAP
maildir_tag = ,S=$message_size
maildir_format
delivery_date_add
envelope_to_add
return_path_add
create_directory
user = spamc

I also use a similar system to this to catch all the viruses that come in and
also any known spamtraps (such as my old email addresses to this list!!). The
spam is thrown into sa-learn every once in a while.

Ted.