<html><head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head><body bgcolor="#FFFFFF" text="#000000">In theory delivery (for
Maildir) should be to 'new' directory <br>
<br>
ie: /var/vmail/domain/user/Maildir/.Spam/new/<br>
<br>
only when a message is read/downloaded should it migrate to <br>
<br>
/var/vmail/domain/user/Maildir/.Spam/cur/<br>
<br>
upping the mail_debug setting to true should give you more information
around what sieve is doing and what path mail stored in.<br>
<br>
rgds<br>
<br>
Matt<br>
<span>
</span><br>
<blockquote style="border: 0px none;"
cite="mid:38cd82f0-eb77-a587-a701-2e8054f518af@gmail.com" type="cite">
<div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div
style="width:100%;border-top:2px solid #EDF1F4;padding-top:10px;"> <div
style="display:inline-block;white-space:nowrap;vertical-align:middle;width:49%;">
<a moz-do-not-send="true" href="mailto:message4kris@gmail.com"
style="color:#485664
!important;padding-right:6px;font-weight:500;text-decoration:none
!important;">Kris</a></div> <div
style="display:inline-block;white-space:nowrap;vertical-align:middle;width:48%;text-align:
right;"> <font color="#909AA4"><span style="padding-left:6px">18
February 2018 at 4:49 pm</span></font></div> </div></div>
<div style="color:#909AA4;margin-left:24px;margin-right:24px;"
__pbrmquotes="true" class="__pbConvBody">
<meta content="text/html; charset=UTF-8" http-equiv="content-type">
<p>Hi,</p>
<p>I have a problem with storing messages into a Spam folder by
dovecot. Log says that message was stored into Spam mailbox but
when I check there is no message in users's Spam mailbox.</p>
<p>cat /var/log/mail.log | grep sieve | grep Spam : </p>
<p><b>Feb 17 05:09:11 mailserver dovecot: lda(user@domain): sieve:
msgid=<a moz-do-not-send="true"
href="mailto:b599df639ffa4d20f6e8d2bcff791286@somedomain.pl"
class="moz-txt-link-rfc2396E"><b599df639ffa4d20f6e8d2bcff791286@somedomain.pl></a>:
stored mail into mailbox 'Spam'</b><br>
</p>
<p> <br>
</p>
<p>Where are these messages if not in the Spam folder where they
should be? /var/vmail/domain/user/Maildir/.Spam/cur/</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><b> dovecot -n</b><br>
# 2.2.22 (fe789d2): /etc/dovecot/dovecot.conf<br>
# Pigeonhole version 0.4.13 (7b14904)<br>
# OS: Linux 4.4.0-104-generic x86_64 Ubuntu 16.04.3 LTS ext4<br>
auth_gssapi_hostname = mailserver.belpol.local<br>
auth_krb5_keytab = /etc/dovecot/dovecot.keytab<br>
auth_mechanisms = gssapi plain<br>
first_valid_gid = 117<br>
first_valid_uid = 111<br>
listen = *<br>
log_timestamp = "%Y-%m-%d %H:%M:%S "<br>
mail_gid = ebox<br>
mail_home = /var/vmail/%d/%u<br>
mail_location = maildir:/var/vmail/%d/%u/Maildir<br>
mail_uid = ebox<br>
managesieve_notify_capability = mailto<br>
managesieve_sieve_capability = fileinto reject envelope
encoded-character vacation subaddress comparator-i;ascii-numeric
relational regex imap4flags copy include variables body enotify
environment mailbox date index ihave duplicate mime foreverypart
extracttext<br>
namespace inbox {<br>
inbox = yes<br>
location =<br>
mailbox Drafts {<br>
auto = subscribe<br>
special_use = \Drafts<br>
}<br>
mailbox Sent {<br>
auto = subscribe<br>
special_use = \Sent<br>
}<br>
mailbox "Sent Messages" {<br>
auto = no<br>
special_use = \Sent<br>
}<br>
mailbox Spam {<br>
auto = create<br>
special_use = \Junk<br>
}<br>
mailbox Trash {<br>
auto = subscribe<br>
special_use = \Trash<br>
}<br>
prefix =<br>
separator = /<br>
subscriptions = yes<br>
}<br>
passdb {<br>
args = /etc/dovecot/dovecot-ldap.conf<br>
driver = ldap<br>
}<br>
plugin {<br>
quota = maildir:User quota<br>
quota_rule = *:storage=0<br>
sieve = /var/vmail/%Ld/%Ln/sieve-script<br>
sieve_before = /var/vmail/sieve/default.sieve<br>
sieve_default = /var/vmail/sieve/default.sieve<br>
sieve_dir = /var/vmail/%Ld/%Ln<br>
sieve_global_path = /var/vmail/sieve/default.sieve<br>
sieve_storage = /var/vmail/%Ld/%Ln<br>
}<br>
protocols = pop3 imap sieve<br>
service auth {<br>
executable = /usr/lib/dovecot/auth<br>
unix_listener /var/spool/postfix/private/auth {<br>
group = postfix<br>
mode = 0660<br>
user = postfix<br>
}<br>
unix_listener auth-master {<br>
group = ebox<br>
mode = 0600<br>
user = ebox<br>
}<br>
}<br>
service imap-login {<br>
inet_listener imap {<br>
address = *<br>
port = 143<br>
}<br>
inet_listener imaps {<br>
address = *<br>
port = 993<br>
}<br>
}<br>
service lmtp {<br>
unix_listener /var/spool/postfix/private/dovecot-lmtp {<br>
group = postfix<br>
mode = 0666<br>
user = postfix<br>
}<br>
}<br>
service managesieve-login {<br>
inet_listener sieve {<br>
port = 4190<br>
}<br>
}<br>
service pop3-login {<br>
inet_listener pop3 {<br>
port = 110<br>
}<br>
inet_listener pop3s {<br>
port = 995<br>
}<br>
}<br>
ssl_cert = </etc/dovecot/private/dovecot.pem<br>
ssl_key = </etc/dovecot/private/dovecot.pem<br>
userdb {<br>
args = /etc/dovecot/dovecot-ldap.conf<br>
default_fields = uid=111 gid=117<br>
driver = ldap<br>
}<br>
protocol imap {<br>
mail_max_userip_connections = 20<br>
mail_plugins = quota imap_quota<br>
}<br>
protocol pop3 {<br>
mail_plugins = quota<br>
}<br>
protocol lda {<br>
auth_socket_path = /var/run/dovecot/auth-master<br>
mail_plugins = sieve quota<br>
postmaster_address = postmaster<br>
}<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><b>default.sieve:</b></p>
<p>require ["fileinto"];<br>
# rule:[SPAM]<br>
if header :contains "X-Spam-Flag" "YES" {<br>
fileinto "Spam";<br>
}<br>
if header :contains "subject" ["***UNCHECKED***", "SPAM"] {<br>
fileinto "Spam";<br>
}<br>
<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
</div>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<div><a
href="https://www.postbox-inc.com/?utm_source=email&utm_medium=siglink&utm_campaign=reach"><span
style="color: rgb(51, 102, 153);"><br>
</span></a></div>
</div>
</body></html>