Sławomir Dworaczek via Exim-users wrote on 23.02.2025 2:06:
> You're right, only 256 bytes can be in a file
> Unfortunately, condition behaves as if it didn't work at all, all
> emails, even those tagged spam, fall into inboxes
> Regardless of whether they come from external or local domains
> 
> This is a fragment of the SPAM header:
> X-Bogofilterd: true
> X-Bogosity: Spam, tests=bogofilter, spamicity=1.000000, version=1.2.5
> and this is a fragment of the HAM header:
> X-Bogofilterd: true
> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.5

to exclude by sender address domain:

${if and{\
    {match{$h_X-Bogosity:}{\N(?i)^\s*Spam\N}}\

{bool{${lookup{$sender_address_domain}wildlsearch{/etc/exim/listy_acl/bogo_list}{false}{true}}}}\
}{true}{false}}


to exclude by sender address domain and domain from From: header (does
not work for multiple addresses in From: header):

${if and{\
    {match{$h_X-Bogosity:}{\N(?i)^\s*Spam\N}}\

{bool{${lookup{$sender_address_domain}wildlsearch{/etc/exim/listy_acl/bogo_list}{false}{true}}}}\

{bool{${lookup{${domain:${sg{${sg{$rh_From:}{:}{\\\\:}}}{\N^\s*\S+@\S+\s*(<\S+@\S+>)\N}{\$4}}}}wildlsearch{/etc/exim/listy_acl/bogo_list}{false}{true}}}}\
}{true}{false}}



> If I change "if and" to "if or" it seems that searching in the domain
> file works, but only searching, recognizing the header does not
> 
> ${if or{\
> {eqi{$h_X-Bogosity:}{Spam}}\
> {bool{${lookup{$sender_address_domain}lsearch{/tmp/x.bogook}\{false}{true}}}}\
> }\ {yes it it spam}{no it is not spam}\}Greetings from Silesia-----
> Original Message -----From: "Heiko Schlittermann via Exim-users"
> <exim-users@lists.exim.org>To: "Sławomir Dworaczek"
> <sla...@dworaczek.info>Sent: Saturday, February 22, 2025 11:09
> PMSubject: [exim] Re: please check the condition>> --> ## subscription
> configuration (requires account):>
> ##https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/>
> ## unsubscribe (doesn't require an account):> ##  
> exim-users-unsubscr...@lists.exim.org> ## Exim details at
> http://www.exim.org/> ## Please use the Wiki with this list -
> http://wiki.exim.org/>
> 


-- 
Best wishes Viktor Ustiuhov
mailto:vic...@corvax.kiev.ua
public GnuPG/PGP key: https://victor.corvax.kiev.ua/corvax.asc

-- 
## subscription configuration (requires account):
##   https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
##   exim-users-unsubscr...@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to