Re: [exim] Automatically add CC address to mail marked as sp…

Pàgina inicial
Delete this message
Reply to this message
Autor: Will Smith
Data:  
A: Exim-users List
Assumpte: Re: [exim] Automatically add CC address to mail marked as spam
On Thu, Mar 27, 2014 at 11:25 AM, Will Smith <undertakingyou@???>wrote:

> On Tue, Mar 25, 2014 at 1:41 AM, Heiko Schlittermann <hs@???>wrote:
>
>> Hello Will,
>>
>> Will Smith <undertakingyou@???> (Di 25 Mär 2014 00:03:05 CET):
>> > I want to tune the Bayesian filter by training it using sa-learn. To do
>> > that I need emails that are valid and invalid. The way that I have it
>> set
>> > up now is that exim receives all emails for a specific domain. It then
>> > scans using clam-av and spamassassin. It then sends the email off to a
>> > corporate exchange box (via a transport rule).
>> >
>> > What I am hoping to do, is have a rule that if an email is marked as
>> spam
>> > that it cc's it to a local delivery box (I will make something like
>> > spam@???) and then I can run the sa-learn off of that box.
>> >
>> > So, questions are:
>> > Can I have adding a CC be part of a ACL rule when something is marked as
>> > spam?
>> > Is there a better way to do what I am looking for?
>> > Maybe I should BCC all email to an account, and then I get the ham and
>> > spam? Not sure.
>>
>>     your data acl:

>>
>>         ...

>>
>>         warn    spam = nobody:true

>>
>>
>>
>>     one of your first routers:

>>
>>         salearn:
>>             driver = redirect
>>             condition = ${if >{$spam_score_int}{50}}
>>             data = spam@???, $local_part@$domain
>>             repeat_use = no
>>             verify = no

>>
>>
>> If your spam@... is a local destination, you might check
>> the shadow_transport feature, about that way:
>>
>>     begin transports

>>
>>         local:
>>             driver = appendfile
>>             ...
>>             shadow_transport = salearn

>>
>>         remote_smtp:
>>             driver = smtp
>>             ...
>>             shadow_transport = salearn

>>
>>
>>         salearn:
>>             driver = pipe
>>             command = sa-learn ...

>>
>>
>>
>> Beware, I didn't cross check this with the documentation, it's completly
>> untested and might just be considered as a hint :)
>>
>>
>>
>>     Best regards from Dresden/Germany
>>     Viele Grüße aus Dresden
>>     Heiko Schlittermann
>> --
>>  SCHLITTERMANN.de ---------------------------- internet & unix support -
>>  Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
>>  gnupg encrypted messages are welcome --------------- key ID: 7CBF764A -
>>  gnupg fingerprint: 9288 F17D BBF9 9625 5ABC  285C 26A9 687E 7CBF 764A -
>> (gnupg fingerprint: 3061 CFBF 2D88 F034 E8D2  7E92 EE4E AC98 48D0 359B)-

>>
>>
> Heiko,
>
> Thanks for your input. I have decided that my problem is not an issue of
> having all spam go into a special folder, because the spam is already set
> correctly. What I really need is to teach it what is spam that is not
> getting marked right. To do that I think I will need to just BCC or CC all
> email, and then I can create groups of spam and ham to teach spamassassin
> with.
>
> Right now i have this special router set up:
> # Route for TLPA forwarding
> special:
> driver = manualroute
> transport = remote_smtp
> route_list = thelivingplanet.com 10.10.12.11
>
>
> Can I just do something similar there so that all mail to
> thelivingplanet.com domain will also forward to spam@??? for local
> delivery?
>
> Will--
>


Another thought would be can I have it be part of my data-acl? So right now
as the spam-check I have this:
# SpamAssassin
  warn
    spam = Debian-exim:true
    add_header = X-Spam-Score: $spam_score ($spam_bar)\n\
              X-Spam-report: $spam_report


  warn
    spam = Debian-exim
    add_header = X-Spam-Status: Yes, $spam_score
    condition = ${if >{$spam_score_int}{50}{1}{0}}


 # # add second subject line with *SPAM* marker when message
 # # is over threshold
 # warn  message = Subject: *SPAM* $h_Subject:
 #       spam = nobody


  # reject spam at high scores (> 10)
  deny   message = This message scored $spam_score spam points.
         spam = nobody:true
         condition = ${if >{$spam_score_int}{100}{1}{0}}


In the first condition could I add a bcc address, so that all mail coming
in gets a BCC added as part of the spam check. That makes a little more
sense to me because here, it at least shows why I am doing it (in a way).

Will--