[Dovecot] sieve.before script is taking preceedence over user defined rules

Stephan Bosch stephan at rename-it.nl
Thu Mar 15 16:17:55 EET 2012


On 3/15/2012 12:42 PM, Alexis Lelion wrote:
> Hello Stephan,
>
> Thanks for your answer, and sorry for forgetting to specify which
> dovecot version I was using :-/
> I'm using Dovecot 2.0.15, with PigeonHole.
>
> The syntax issues are some typos I made while writing this email, I
> double checked, and indeed, my production script was slightly
> different from what I wrote in the first place. I can confirm that the
> scripts compile properly with sievec, and also that the folder does
> exist, but just to be sure this is not an issue, I added the ":create"
> option  to the user's fileinto.
>
> I have no errors in my logs, the only thing displayed is
> tThbJ1myYU+ZPwAA6RJXdw: sieve: msgid=unspecified: stored mail into
> mailbox 'INBOX'
>
> Is there any way to increase verbosity for sieve only?

You can test Sieve outside normal delivery using the sieve-test tool; 
include the global sieve_before script using a -s argument.

Alternatively, you can use the vnd.dovecot.debug extension as follows:

require ["fileinto", "mailbox", "vnd.dovecot.debug"];

if address :domain "From" "trusted.tld" {
   fileinto :create "trusted";
   debug_log "Tried to save in \"trusted\"";
}

You need to add the vnd.dovecot.debug extension to sieve_extensions in your 90-sieve.conf, e.g.:

sieve_extensions = +vnd.dovecot.debug

This will produce the following output in the user's personal sieve log (typically ~/.dovecot.sieve.log):

sieve: info: started log at Mar 15 15:13:29.
main_script: line 5: info: DEBUG: Tried to save in "trusted".
info: msgid=unspecified: stored mail into mailbox 'trusted'.

If the DEBUG line is missing at your end, the fileinto is not executed at all. If it is, and things are still delivered in INBOX, something else is going on.

Regards,

Stephan.




More information about the dovecot mailing list