sieve filter not working

Michael Williamson michael.h.williamson at gmail.com
Thu Jan 22 19:11:51 UTC 2015


Hi,

I have a question.

I have dovecot 2.0.9 running on a CentOS 6.6 email server for a small
department, ~15 users.
amavis and postfix are also enabled.

It appears that amavis invokes spamassassin, which tags incoming spam
email. All email is then put into users local inbox directory,
regardless of spam tag X-Spam_Flag value of YES or NO. I want instead
to redirect spam to a special directory.

I put a sieve filter in users home directory, "/home/user/.dovecot.sieve":

require ["fileinto"];
# Move spam to spam folder
if header :contains "X-Spam-Flag" ["YES"] {
  fileinto "Maildir/.SPAM";
  stop;
}

I try different target directory for fileinto, ".SPAM",
"/home/user/Maildir/.SPAM/cur", etc.. I know that those directories
exist.

The configure file "/etc/dovecot/dovecot.conf" is in original state.

I changed one line in configure file "/etc/dovecot/conf.d/15-lda.conf":

protocol lda {
  # Space separated list of plugins to load (default is global mail_plugins).
  mail_plugins = sieve $mail_plugins
}

I changed one line in configure file "/etc/dovecot/conf.d/20-lmtp.conf":

 protocol lmtp {
  # Space separated list of plugins to load (default is global mail_plugins).
  mail_plugins = sieve $mail_plugins
}

The configure file "/etc/dovecot/conf.d/90-sieve.conf" is unchanged,
the relevant part is:

plugin {
  # The path to the user's main active script.
  sieve = ~/.dovecot.sieve
  ...

I restarted dovecot. I checked that it is running. The configuration command

 # doveconf -a

output is attached.

It is not working. How do I diagnose the problem?

Thanks,
-Mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t
Type: application/octet-stream
Size: 12633 bytes
Desc: not available
URL: <http://dovecot.org/pipermail/dovecot/attachments/20150122/89890ee2/attachment.obj>


More information about the dovecot mailing list