14 Mar
2024
14 Mar
'24
12:27 a.m.
On 13-03-2024 17:36, Ralph Seichter via dovecot wrote:
- Lev Serebryakov:
I need to match all messages sent from some specific domain and all its sub-domains.
I prefer using regular expressions for this kind of tests:
if address :regex "From" "[@.]example\.(com|org)$" {...}
This will match all addresses for example.com, example.org and their respective subdomains.
Or in readable sieve:
if anyof ( address :domain :is "From" "example.org", address :domain :contains "From" ".example.org" ) { keep; }
Which might match "subdomain.example.org.gotcha.com", but how often would that happen?
Kind regards,
Tom