Op 20-2-2019 om 9:30 schreef subin ks via dovecot:
I've Dovecot and dovecot-sieve v 2.2.27 installed on a Debian 9.6. I'm trying to set a Sieve filter which will redirect all emails from `info` (i.e. .info) TLD to another email. This is the filter:

require ["regex"];
# rule:[test]
if header :regex "from" "info$"
{
redirect "su...@domain.com <mailto:su...@domain.com>";
}

It's not being honored; all emails from .info TLD ends up in the inbox and none are redirected. Let me know what I'm doing wrong.

You should use the "address" test instead. This parses the header for addresses. Using the "header" test this way is unreliable. For example, an address wrapped in <...> is not handled well by your attempt.

So, this is better:

if address :matches :domain "from" "*.info" {
redirect "su...@domain.com <mailto:su...@domain.com>";
}

Regards,

Stephan.

Reply via email to