[Dovecot] Problems with dovecot 2.0, sieve and mdbox
Hi guys,
I tried to use a global sieve skript to sort spam mails into a subfolder of INBOX. I´m using mdbox.
The log shows that the script is called and executed but it is not able to find or create the mailbox:
Sep 4 15:18:55 mercury dovecot: lmtp(6237, mail@steulerfliesen.de): Debug: Namespace : Permission lookup failed from /var/mail/steulerfliesen.de/mail/mdbox/mailboxes/Spamverdacht Sep 4 15:18:55 mercury dovecot: lmtp(6237, mail@steulerfliesen.de): Debug: Namespace : Using permissions from /var/mail/steulerfliesen.de/mail/mdbox: mode=0700 gid=-1
Sep 4 15:22:37 mercury dovecot: lmtp(6261, mail@steulerfliesen.de): Debug: Namespace : Permission lookup failed from /var/mail/steulerfliesen.de/mail/mdbox/mailboxes/INBOX.Spamverdacht Sep 4 15:22:37 mercury dovecot: lmtp(6261, mail@steulerfliesen.de): Debug: Namespace : Using permissions from /var/mail/steulerfliesen.de/mail/mdbox: mode=0700 gid=-1
My skript looks like this:
require "fileinto"; if header :contains "X-Spam-Flag" "YES" { fileinto "Spamverdacht"; }
I also tried:
require "fileinto"; if header :contains "X-Spam-Flag" "YES" { fileinto "INBOX.Spamverdacht"; }
How can I fix this?
Regards Patrick
On 04/09/2010 14:27, Patrick Westenberg wrote:
The log shows that the script is called and executed but it is not able to find or create the mailbox:
Hello Patrick,
I probably can't help you with this problem, but I can mention that oftentimes if you ask about a problem on this list you may be asked to provide the output of "dovecot -n".
Bill
William Blunn schrieb:
I probably can't help you with this problem, but I can mention that oftentimes if you ask about a problem on this list you may be asked to provide the output of "dovecot -n".
True words.
# 2.0.1: /usr/local/etc/dovecot/dovecot.conf # OS: Linux 2.6.26-2-amd64 x86_64 Debian 5.0.5 auth_debug = yes auth_debug_passwords = yes auth_verbose = yes mail_debug = yes mail_gid = vmail mail_location = mdbox:~/mdbox mail_plugins = quota mail_uid = vmail managesieve_notify_capability = mailto managesieve_sieve_capability = comparator-i;octet comparator-i;ascii-casemap fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date passdb { args = /usr/local/etc/dovecot/dovecot-sql.conf.ext driver = sql } plugin { quota = maildir:User quota quota_rule2 = Trash:storage=+50M sieve = ~/.dovecot.sieve sieve_global_path = /usr/local/etc/dovecot/sieve/default.sieve } protocols = lmtp service auth { unix_listener /var/spool/postfix/private/auth { mode = 0666 } } service lmtp { unix_listener /var/spool/postfix/private/dovecot-lmtp { group = postfix mode = 0660 user = postfix } } ssl = no userdb { args = /usr/local/etc/dovecot/dovecot-sql.conf.ext driver = sql } protocol lmtp { mail_plugins = $mail_plugins sieve } protocol lda { mail_plugins = $mail_plugins sieve }
On Sat, 04 Sep 2010 15:27:26 +0200 Patrick Westenberg pw@wk-serv.de articulated:
I tried to use a global sieve skript to sort spam mails into a subfolder of INBOX. I´m using mdbox.
The log shows that the script is called and executed but it is not able to find or create the mailbox:
Sep 4 15:18:55 mercury dovecot: lmtp(6237, mail@steulerfliesen.de): Debug: Namespace : Permission lookup failed from /var/mail/steulerfliesen.de/mail/mdbox/mailboxes/Spamverdacht Sep 4 15:18:55 mercury dovecot: lmtp(6237, mail@steulerfliesen.de): Debug: Namespace : Using permissions from /var/mail/steulerfliesen.de/mail/mdbox: mode=0700 gid=-1
Sep 4 15:22:37 mercury dovecot: lmtp(6261, mail@steulerfliesen.de): Debug: Namespace : Permission lookup failed from /var/mail/steulerfliesen.de/mail/mdbox/mailboxes/INBOX.Spamverdacht Sep 4 15:22:37 mercury dovecot: lmtp(6261, mail@steulerfliesen.de): Debug: Namespace : Using permissions from /var/mail/steulerfliesen.de/mail/mdbox: mode=0700 gid=-1
My skript looks like this:
require "fileinto"; if header :contains "X-Spam-Flag" "YES" { fileinto "Spamverdacht"; }
I also tried:
require "fileinto"; if header :contains "X-Spam-Flag" "YES" { fileinto "INBOX.Spamverdacht"; }
How can I fix this?
This looks very much like a permissions problem. Please post the output of 'dovecot -n' and the "user/group" & modes set on "/var/mail/steulerfliesen.de/mail/mdbox/mailboxes/Spamverdacht" & "/var/mail/steulerfliesen.de/mail/mdbox/mailboxes/INBOX.Spamverdacht".
-- Jerry ✌ Dovecot.user@seibercom.net
Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore the Reply-To header.
To get something clean, one has to get something dirty. To get something dirty, one does not have to get anything clean.
Jerry schrieb:
This looks very much like a permissions problem. Please post the output of 'dovecot -n' and the "user/group"& modes set on "/var/mail/steulerfliesen.de/mail/mdbox/mailboxes/Spamverdacht"& "/var/mail/steulerfliesen.de/mail/mdbox/mailboxes/INBOX.Spamverdacht".
I posted dovecot -n in my previous post.
user and group settings look like this:
mercury:/var/mail/steulerfliesen.de/mail/mdbox# ls -l drwx--S--- 3 vmail vmail 4096 4. Sep 13:52 mailboxes drwx--S--- 2 vmail vmail 4096 4. Sep 14:07 storage
mercury:/var/mail/steulerfliesen.de/mail/mdbox/mailboxes# ls -l drwx--S--- 3 vmail vmail 4096 4. Sep 13:52 INBOX
I expect(ed) the folder Spamverdacht to be created automatically by dovecot like Dovecot 1.x does.
Patrick
On Sat, 04 Sep 2010 15:27:26 +0200, Patrick Westenberg pw@wk-serv.de wrote:
Hi guys,
I tried to use a global sieve skript to sort spam mails into a subfolder of INBOX. I´m using mdbox.
The log shows that the script is called and executed but it is not able to find or create the mailbox:
Sep 4 15:18:55 mercury dovecot: lmtp(6237, mail@steulerfliesen.de): Debug: Namespace : Permission lookup failed from /var/mail/steulerfliesen.de/mail/mdbox/mailboxes/Spamverdacht Sep 4 15:18:55 mercury dovecot: lmtp(6237, mail@steulerfliesen.de): Debug: Namespace : Using permissions from /var/mail/steulerfliesen.de/mail/mdbox: mode=0700 gid=-1
Sep 4 15:22:37 mercury dovecot: lmtp(6261, mail@steulerfliesen.de): Debug: Namespace : Permission lookup failed from /var/mail/steulerfliesen.de/mail/mdbox/mailboxes/INBOX.Spamverdacht Sep 4 15:22:37 mercury dovecot: lmtp(6261, mail@steulerfliesen.de): Debug: Namespace : Using permissions from /var/mail/steulerfliesen.de/mail/mdbox: mode=0700 gid=-1
My skript looks like this:
require "fileinto"; if header :contains "X-Spam-Flag" "YES" { fileinto "Spamverdacht"; }
I also tried:
require "fileinto"; if header :contains "X-Spam-Flag" "YES" { fileinto "INBOX.Spamverdacht"; }
How can I fix this?
Regards Patrick
the script should be
require ["fileinto","regex","comparator-i;ascii-numeric","reject","relational"]; # rule:[spammanage-before] if header :value "ge" :comparator "i;ascii-numeric" ["X-Spam-score"] ["500"] { discard; stop; } if header :value "ge" :comparator "i;ascii-numeric" ["X-Spam-score"] ["100"] { fileinto "Junk.spam"; stop; } if header :value "ge" :comparator "i;ascii-numeric" ["X-Spam-score"] ["10"] { fileinto "Junk"; }
elsif anyof ( header :contains "Received" [ "[4.63. "[218.160.", "[218.242.]" ] ) { fileinto "Junk"; } elsif anyof ( header :contains ["SPAM", "X-Spam-hits"] ["ADDRESSES_ON_CD", "X_OSIRU_DUL", "X_OSIRU_SPAMWARE_SITE", "X_OSIRU_SPAM_SRC" ] ) { fileinto "Junk"; }
Hi again,
FYI: this is the way it works for me:
require ["fileinto", "mailbox"]; if header :contains "X-Spam-Flag" "YES" { fileinto :create "Spamverdacht"; }
If the specified mailbox does not exist, it will be created.
Regards Patrick
Patrick Westenberg
Hi Patrick,
Hi again,
FYI: this is the way it works for me:
require ["fileinto", "mailbox"];
you mean the really name "mailbox" or?
if header :contains "X-Spam-Flag" "YES" { fileinto :create "Spamverdacht"; }
If the specified mailbox does not exist, it will be created.
cu Jim
participants (5)
-
fakessh
-
Jerry
-
Jim
-
Patrick Westenberg
-
William Blunn