[Dovecot] sieve vs deliver -m

Stephan Bosch stephan at rename-it.nl
Mon Dec 28 21:30:11 EET 2009


Frank Cusack wrote:
> I'm invoking deliver through postfix with a dovecot transport in master.cf,
> using the -m ${extension} argument.  If I have no sieve script, or a
> sieve script with an implicit keep, the mail gets correctly filed into
> the -m mailbox.
> 
> However if the sieve script has an explicit discard, this gets honored
> if it doesn't match another sieve action.
> 
> Shouldn't -m take precedence?  I would say that if an extension is present
> any other sieve action should be ignored, perhaps just sieve_before should
> be run then the message filed per the extension.
> 
Currently, deliver's -m parameter value is used by the Sieve plugin as 
the 'default folder', which is where a keep action should store the 
message (which is normally "INBOX"). If no implicit or explicit keep is 
executed in the Sieve script, e.g. because discard is executed, the 
message will not be stored in that default folder.

What exactly are you trying to achieve here? Do you want to execute the 
Sieve script only when no -m parameter is specified for deliver? Why? 
You can also use the subaddress extension in Sieve and get rid of the -m 
parameter altogether.

Regards,

-- 
Stephan Bosch
stephan at rename-it.nl


More information about the dovecot mailing list