Hi,I think that the test "if not duplicate" could not work for our case, as the out of office should answer everytime, we only wants the redirect to not be sent as a duplicate for the users of the alias LIST.
In other words we would like:1) To redirect the e-mail directed to a single user (with out of office active) to [email protected], so that every user of the LIST receives one copy;
2) To delete one copy for the e-mail directed to [email protected], otherwise every user of the LIST will receive two e-mail, one directed to the LIST and one generated from the redirect of the sieve script by the user with out of office in active state.
So we're considering to add this part to the users sieve scripts: /# rule:[RemoveMail]//if allof (header :contains "X-Sieve" "Pigeonhole Sieve", header :contains "X-Sieve-Redirected-From" "domain.tld", header :contains ["to", "cc"] "[email protected]")//
//{//
// fileinto "Trash";//
//}/
So the script become:
/require ["fileinto","vacation-seconds"];/
/# rule:[RemoveDuplicateMail]/
///if allof (header :contains "X-Sieve" "Pigeonhole Sieve", header
:contains "X-Sieve-Redirected-From" "domain.tld", header :contains
["to", "cc"] "[email protected]")
{
fileinto "Trash";
/
/}/
/# rule:[Outofoffice] if true { vacation :addresses "//xxxxxxx at domain.tld <https://dovecot.org/mailman/listinfo/dovecot>//" :subject "Automatic Reply" text: <Text here> . ; fileinto
"INBOX"; redirect "//LIST at domain.tld <https://dovecot.org/mailman/listinfo/dovecot>//"; }/
In this way, the duplicate e-mail generated from the redirect to [email protected] should be moved into Trash.
Just one problem remaining: the e-mail that have [email protected] in BCC could not be intercepted by the sieve filter as in the header is not present any reference to [email protected]; am I missing something or this cannot be fixed?
Thanks Claudio
smime.p7s
Description: S/MIME Cryptographic Signature
