sieve filter not working

Stephan Bosch stephan at
Wed Feb 20 13:50:02 EET 2019

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 "subbs at <mailto:subbs at>";
> }
> 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 "subbs at <mailto:subbs at>";



More information about the dovecot mailing list