Re: [exim] Eximfilter rule delivery

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Andrew C Aitchison
Data:  
Para: Sławomir Dworaczek
CC: 'Mailing List'
Asunto: Re: [exim] Eximfilter rule delivery
On Mon, 18 Jul 2022, Sławomir Dworaczek via Exim-users wrote:

> tries to make a rule to bypass the filtering of specific messages containing $ h_X-Bogosity: MATCH "Spam" to deliver messages to recipients follow my rule. what should I put for "deliver ??????????????"
>
> if $h_X-Bogosity: MATCH "Spam" and $h_from: contains "email@???" or $h_from: contains "email2@???"
> then
> deliver ??????????????
> elif
> $h_X-Bogosity: MATCH "Spam" or
>    $header_subject: contains "VIAGRA" or
>    $message_body: contains "Bitcoin?"
> then
>    logfile /var/log/exim/spam.log
>    logwrite "$header_subject /  $sender_host_address / $sender_address / $local_part / $reply_address"
>    deliver allspam@???
>    seen finish
> endif


I would use a "not" and nested "if"s to avoid the issue:

if not ($h_X-Bogosity: MATCH "Spam" and $h_from: contains "email@???" or $h_from: contains "email2@???" )
then
     if
        $h_X-Bogosity: MATCH "Spam" or
        $header_subject: contains "VIAGRA" or
        $message_body: contains "Bitcoin?"
     then
         logfile /var/log/exim/spam.log
         logwrite "$header_subject /  $sender_host_address / $sender_address / $local_part / $reply_address"
         deliver allspam@???
         seen finish
     endif
endif



-- 
Andrew C. Aitchison                      Kendal, UK
                    andrew@???