On 2019-02-13, Adam Nielsen via Exim-users <exim-users@???> wrote:
> Hi all,
>
> I am using this ACL to block addresses/domains repeatedly used by
> spammers, by looking them up in a file:
>
> deny
> senders = @@partial-lsearch;/srv/mail/config/sender_blacklist
> add_header = X-Spam-Report: Sender in blacklist, message rejected
>
> However I still have some messages make it through, and I suspect the
> issue could be that the "senders" condition only checks the envelope
> sender, and not the 'From' header in the message itself.
>
> Is there any way to make 'senders' also look in the 'From' header?
no.
> I have looked through the docs but can't figure out how to write a
> fresh condition that uses 'partial-lsearch' with $h_from: as that was
> my other idea for a workaround. I can't even find where
> 'partial-lsearch' is documented!
"file and database lookups"
http://www.exim.org/exim-html-current/doc/html/spec_html/ch-file_and_database_lookups.html
something like
deny
condition=${lookup{foo@${address:$h_from }}\
partial-lsearch{/srv/mail/config/sender_blacklist}\
{yes}{no}}
From: may have zero or more email addresses the above only works if
there is exactly one.
--
When I tried casting out nines I made a hash of it.