Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In Centos 6.4 i use postfix with LDA Dovecot and webmail squiremail, amavis-new with spamassassin. Spam is marked with subject Spam. I want in my squirelmail to filter spam messages an move in to folder spam. I use sieve script /var/lib/dovecot/sieve/default.sieve

 require "fileinto";
  if exists "X-Spam-Flag" {
          if header :contains "X-Spam-Flag" "NO" {
          } else {
          fileinto "Spam";
          stop;
          }
  }
  if header :contains "subject" ["***Spam***"] {
    fileinto "Spam";
    stop;
  }

but still i have spam in my INBOX folder besides the Spam folder

commandline sievec otuput

 #sievec /var/lib/dovecot/sieve/default.sieve
    sievec(root): Error: user root: Initialization failed: Initializing mail storage from environment MAIL failed: Ambiguous mail location setting, don't know what to do with it: /var/spool/mail/root (try prefixing it with mbox: or maildir:)
    sievec(root): Fatal: Invalid user settings. Refer to server log for more information.
share|improve this question
    
You saying the sieved messages are still not being filtered, or that it isn't retroactively applying the filter? –  NickW Aug 15 '13 at 12:41
    
Still I have new messages marked as spam in my inbox –  mardon Aug 15 '13 at 16:18
    
Any errors in the dovecot log file? –  NickW Aug 15 '13 at 16:19
    
In my configuation dovecot.log no exists –  mardon Aug 15 '13 at 16:31
    
in /var/log/maillog isnt any error –  mardon Aug 15 '13 at 19:06
show 1 more comment

1 Answer

I had a similar problem and in my case the mail_location variable wasn't being auto detected correctly.

At /etc/dovecot/conf.d/10-mail.conf.erb set:

mail_location = maildir:~/Maildir

This will replace the default which is auto-detect.

You can see a further explanation at the comments at the same file.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.