[Dovecot] How do I use sieve to move bounces?

Jef Driesen jefdriesen at hotmail.com
Thu Sep 6 11:48:24 EEST 2007


Jef Driesen wrote:
> How can I use sieve to move bounces and non delivery reports (i.e. 
> anything with an empty envelope from) to a special mailbox? I placed 
> this snippet at the start of my sieve script
> 
> require ["envelope", "fileinto"];
> if envelope :is "from" "" {
>      fileinto "INBOX.Reports";
>      stop;
> }
> 
> But mails are not moved to the reports mailbox, and they are still 
> processed by the rest of the script.

To answer my own question, this script seems to work for me:

if header :is "Return-Path" "<>" {
    fileinto "INBOX.Reports";
    stop;
}



More information about the dovecot mailing list