0
votes

According to documentations,

if header :contains "To" "[email protected]" {
    fileinto "archive/user_domain_net";
    stop;
}

this would work. The intention would be saving a mail into a hardcoded path if the mail comes to a specific hardcoded address. Any ideas?

1

1 Answers

0
votes

Found it, had to use regex and brackets:

if header :regex    ["To"] ["^user@domain\.net$"] {
    fileinto "archive.user_domain_net";
    stop;
}