Sieve problem with duplicate and fileinto in the same set of rules

Alessio Cecchi alessio at
Mon Jul 15 16:04:22 EEST 2019

Il 15/07/19 14:34, Gianluca Scaglia via dovecot ha scritto:
> Hi there,
> on my mail server (postfix, dovecot 2.2.27 in Debian 9) I have an 
> automatic forwarding (with sender_bcc_maps in Postfix) for all the 
> emails sent in smtp from the same server, that are then put in the 
> Sent folder with a sieve rule.
> In this way, however, when a user sends an e-mail to himself, both 
> copies end up in the Sent folder and it's not good.
> To resolve, I tried using the Sieve “duplicate” extension along with 
> “fileinto” but I can't get it to work.
I solved the problem of duplicated email with this Sieve rule:

require ["duplicate", "fileinto", "mailbox"];

if duplicate :seconds 60 {
     fileinto "Trash";

Hope this can hel you.


Alessio Cecchi
Postmaster @

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the dovecot mailing list