<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-2">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>I have an <b>Ubuntu 16.04</b> mail server with
postfix/spamassassin/<b>dovecot-2.2.2</b><b>2</b> with virtual
mailboxes in maildir format. The whole process is working
excellently since a year. Spams are marked with "*****SPAM*****"
in subject and with "X-Spam-Flag: YES" in email header.<br>
<br>
I tried now to add sieve to dovecot to move the SPAM messages into
the Junk folder without any success, I don't see any sign that
sieve does something at all. The output of "dovecot -n":</p>
<p># 2.2.22 (fe789d2): /etc/dovecot/dovecot.conf<br>
# Pigeonhole version 0.4.13 (7b14904)<br>
# OS: Linux 4.4.0-72-generic x86_64 Ubuntu 16.04.2 LTS ext4<br>
auth_mechanisms = cram-md5<br>
auth_verbose = yes<br>
base_dir = /var/run/dovecot/<br>
info_log_path = /var/log/dovecot.info<br>
log_path = /var/log/dovecot<br>
log_timestamp = "%Y-%m-%d %H:%M:%S "<br>
mail_location = maildir:/home/vmail/%d/%n<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 {<br>
inbox = yes<br>
location =<br>
prefix =<br>
separator = /<br>
}<br>
passdb {<br>
args = /etc/dovecot/passwd<br>
driver = passwd-file<br>
}<br>
plugin {<br>
sieve = /etc/dovecot/sieve/default.sieve<br>
}<br>
protocols = imap pop3<br>
service auth {<br>
executable = /usr/lib/dovecot/auth<br>
unix_listener /var/spool/postfix/private/auth {<br>
group = postfix<br>
mode = 0666<br>
user = postfix<br>
}<br>
user = root<br>
}<br>
service imap-login {<br>
chroot = login<br>
executable = /usr/lib/dovecot/imap-login<br>
inet_listener imap {<br>
port = 0<br>
}<br>
user = dovecot<br>
}<br>
service imap {<br>
executable = /usr/lib/dovecot/imap<br>
}<br>
service pop3-login {<br>
chroot = login<br>
executable = /usr/lib/dovecot/pop3-login<br>
inet_listener pop3 {<br>
port = 0<br>
}<br>
inet_listener pop3s {<br>
port = 0<br>
}<br>
user = dovecot<br>
}<br>
service pop3 {<br>
executable = /usr/lib/dovecot/pop3<br>
}<br>
ssl_cert = </etc/ssl/certs/dovecot.pem<br>
ssl_key = </etc/ssl/private/dovecot.pem<br>
userdb {<br>
args = /etc/dovecot/users<br>
driver = passwd-file<br>
}<br>
valid_chroot_dirs = /var/spool/vmail<br>
protocol pop3 {<br>
pop3_uidl_format = %08Xu%08Xv<br>
}<br>
protocol lda {<br>
mail_plugins = " sieve"<br>
}</p>
<p>I've added only plugin and protocol lda now. The content of the
file default.sieve:</p>
<p>require "fileinto";<br>
if header :contains "X-Spam-Flag" "YES" {<br>
fileinto "Junk";<br>
}</p>
<p>The test SPAM message is marked as SPAM, but not moved to the
folder Junk. I don't see anything in mail.log that is associated
to sieve.:</p>
<p>ul 30 20:05:12 zg-3 postfix/smtpd[4446]: connect from
smtp4.enternet.hu[62.112.192.37] <br>
Jul 30 20:05:13 zg-3 postfix/smtpd[4446]: 3C4CC9F570:
client=smtp4.enternet.hu[62.112.192.37] <br>
Jul 30 20:05:13 zg-3 postfix/cleanup[4450]: 3C4CC9F570:
message-id=<a class="moz-txt-link-rfc2396E" href="mailto:c6b3bca5-ece3-9e69-8e30-28173abc2ec6@hu.inter.net"><c6b3bca5-ece3-9e69-8e30-28173abc2ec6@hu.inter.net></a>
<br>
Jul 30 20:05:13 zg-3 postfix/qmgr[1557]: 3C4CC9F570:
from=<a class="moz-txt-link-rfc2396E" href="mailto:nagyt@hu.inter.net"><nagyt@hu.inter.net></a>, size=918, nrcpt=1 (queue active)
<br>
Jul 30 20:05:13 zg-3 postfix/smtpd[4446]: disconnect from
smtp4.enternet.hu[62.112.192.37] ehlo=2 starttls=1 mail=1 rcpt=1
data=1 quit=1 commands=7 <br>
Jul 30 20:05:13 zg-3 postfix/pickup[3949]: 5F7FEA3CBC: uid=1003
from=<a class="moz-txt-link-rfc2396E" href="mailto:nagyt@hu.inter.net"><nagyt@hu.inter.net></a> <br>
Jul 30 20:05:13 zg-3 postfix/pipe[4451]: 3C4CC9F570:
to=<a class="moz-txt-link-rfc2396E" href="mailto:tibor@softxs.ch"><tibor@softxs.ch></a>, relay=spamassassin, delay=0.15,
delays=0.05/0.01/0/0.1, dsn=2.0.0, status=sent (delivered via
spamassassin service) <br>
Jul 30 20:05:13 zg-3 postfix/qmgr[1557]: 3C4CC9F570: removed <br>
Jul 30 20:05:13 zg-3 postfix/cleanup[4450]: 5F7FEA3CBC:
message-id=<a class="moz-txt-link-rfc2396E" href="mailto:c6b3bca5-ece3-9e69-8e30-28173abc2ec6@hu.inter.net"><c6b3bca5-ece3-9e69-8e30-28173abc2ec6@hu.inter.net></a>
<br>
Jul 30 20:05:13 zg-3 postfix/qmgr[1557]: 5F7FEA3CBC:
from=<a class="moz-txt-link-rfc2396E" href="mailto:nagyt@hu.inter.net"><nagyt@hu.inter.net></a>, size=3304, nrcpt=1 (queue active)
<br>
Jul 30 20:05:13 zg-3 postfix/virtual[4455]: 5F7FEA3CBC:
to=<a class="moz-txt-link-rfc2396E" href="mailto:tibor@softxs.ch"><tibor@softxs.ch></a>, relay=virtual, delay=0.02,
delays=0.01/0.01/0/0, dsn=2.0.0, status=sent (delivered to
maildir) <br>
Jul 30 20:05:13 zg-3 postfix/qmgr[1557]: 5F7FEA3CBC: removed <br>
</p>
<p>What can be wrong?<br>
</p>
</body>
</html>