-1

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.
mardon
  • 243
  • 1
  • 5
  • 17

1 Answers1

1

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.

skohrs
  • 1,520
  • 11
  • 23
Manuel Sousa
  • 496
  • 2
  • 2