Re: [exim] $message_size and spamassissin

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Odhiambo Washington
Datum:  
To: Johann Spies, exim-users
Betreff: Re: [exim] $message_size and spamassissin
On Mon, Mar 10, 2008 at 3:15 PM, Johann Spies <jspies@???> wrote:

> I have the following in the exim configuration:
>
> warn message = X-Spam-Score: $spam_score ($spam_bar)
>          condition = ${if <{$message_size}{100k}{1}{0}}
>          hosts = ! +relay_from_hosts
>          spam = spamd:true

>
> warn message = X-Spam-Status: YES
>          hosts = ! +relay_from_hosts
>          condition = ${if <{$message_size}{100k}{1}{0}}
>          condition = ${if >{$spam_score_int}{80}{1}{0}}
>          spam = spamd:true

>
> warn message = X-Spam-Status: NO
>          hosts = ! +relay_from_hosts
>          condition = ${if <{$message_size}{100k}{1}{0}}
>          condition = ${if <{$spam_score_int}{80}{1}{0}}
>          spam = spamd:true

>
> warn message = X-Spam-Report: \n $spam_report
>          hosts = ! +relay_from_hosts
>          condition = ${if <{$message_size}{100k}{1}{0}}
>          spam = spamd:true

>
>
> # reject messages that score more than 8
>   deny message = Message viewed as spam....
> #                 (snipped)
>          hosts = ! +relay_from_hosts
>         spam = spamd:true
>          condition = ${if eq{$acl_m0}{t}{yes}{no}}
>          condition = ${if <{$message_size}{100k}{1}{0}}
>          condition = ${if >{$spam_score_int}{80}{1}{0}}
>          log_message = SPAM: Message viewed as spam. (scored $spam_score)

>
> As I understand this configuration, messages should not be handed over
> to spamd if the $message_size is 100k or more.
>
> However when I sort the entries in /var/log/mail.info according to
> size, I see the following:
>
> $ grep result /var/log/mail.info | grep -o 'size=[0-9]\+' | awk -F=
> '{print $2}' | sort -nr | head -n 10
> 9982961
> 7566296
> 7489098
> 7488938
> 7358283
> 6617611
> 6187988
> 6093274
> 5743015
> 5658670
>
> and with a 'tail -n 10':
>
> 835
> 821
> 817
> 803
> 801
> 799
> 759
> 759
> 721
> 662
>
> Apparently my configuration does not prevent large emails to be
> scanned by spamassassin. What is wrong with my configuration?
>
> Regards
> Johann
> --
> Johann Spies          Telefoon: 021-808 4036
> Informasietegnologie, Universiteit van Stellenbosch



Does mail.info as a log file only contain details of e-mails that were
scanned by SpamAssassin? That is what you are trying to say since you have
not showed us any other details.
Anyway, to cut the long story short, the easiest way around this is to add:

accept     condition  = ${if >{$message_size}{100k}{yes}{no}}


.. just above those spam analysis rules. It means all mail above 100k will
be accepted without being subjected to those rules.


--
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254733744121/+254722743223
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

"Oh My God! They killed init! You Bastards!"
                       --from a /. post