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:
To redirect the e-mail directed to a single user (with out of office active) to LIST@domain.tld, so that every user of the LIST receives one copy;
To delete one copy for the e-mail directed to LIST@domain.tld, 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"] "LIST@domain.tld")// //{// // 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"] "LIST@domain.tld") { 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 LIST@domain.tld should be moved into Trash.
Just one problem remaining: the e-mail that have LIST@domain.tld in BCC could not be intercepted by the sieve filter as in the header is not present any reference to LIST@domain.tld; am I missing something or this cannot be fixed?
Thanks
Claudio