Sieve not working

J Pilfold-Bagwell jpilfold-bagwell at bordengrammar.kent.sch.uk
Fri Feb 15 06:32:39 EST 2019


Hi All,

I have a Centos 7 box running with the latest default cyrus install from 
the Centos 7 repo, i.e. cyrus-imapd-2.4.17-13.el7.x86_64 .

The problem I have is that sieve doesn't seem to pay any attention to 
the scripts.  I have sieve running, I can successfully log in to it 
using sieveshell, create, upload and activate scripts, but they don't 
seem to be applied to the incoming mail.  First I was trying the 
vacation and reject scripts so checked that the correct sendmail is in 
use but it fails on fileinto as well.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

imapd.conf looks like this:

[root at mail admin]# cat /etc/imapd.conf
configdirectory: /var/lib/imap
partition-default: /var/spool/imap
admins: cyradmin
sieve_admins: cyradmin
sievedir: /var/lib/imap/sieve
sendmail: /usr/sbin/sendmail
hashimapspool: true
sasl_pwcheck_method: auxprop
sasl_auxprop_plugin: sasldb
sasl_mech_list: PLAIN LOGIN CRAM-MD5 DIGEST-MD5
allowplaintext: yes
allowusermoves: yes
defaultdomain: mail
lmtp_downcase_rcpt: yes

tls_cert_file: /etc/ssl/certs/cyrus-imapd/newcert.pem
tls_key_file: /etc/ssl/certs/cyrus-imapd/newkey.pem
tls_ca_file: /etc/ssl/certs/cyrus-imapd/cacert.pem
tls_ca_path: /etc/ssl/certscyrus-imapd

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

cyrus.conf:

# standard standalone server implementation

START {
   # do not delete this entry!
   recover    cmd="ctl_cyrusdb -r"

   # this is only necessary if using idled for IMAP IDLE
   idled        cmd="idled"
}

# UNIX sockets start with a slash and are put into /var/lib/imap/sockets
SERVICES {
   # add or remove based on preferences
   imap        cmd="imapd" listen="imap" prefork=5
   imaps        cmd="imapd -s" listen="imaps" prefork=1
#  pop3        cmd="pop3d" listen="pop3" prefork=3
#  pop3s        cmd="pop3d -s" listen="pop3s" prefork=1
   sieve        cmd="timsieved" listen="0.0.0.0:2000" prefork=0
   sieve         cmd="timsieved" listen="0.0.0.0:4190" prefork=0
#  managesieve   cmd="timsieved" listen="localhost:4190" prefork=0

   # these are only necessary if receiving/exporting usenet via NNTP
#  nntp        cmd="nntpd" listen="nntp" prefork=3
#  nntps        cmd="nntpd -s" listen="nntps" prefork=1

   # at least one LMTP is required for delivery
#  lmtp        cmd="lmtpd" listen="lmtp" prefork=0
   lmtpunix    cmd="lmtpd" listen="/var/lib/imap/socket/lmtp" prefork=1

   # this is only necessary if using notifications
#  notify    cmd="notifyd" listen="/var/lib/imap/socket/notify" 
proto="udp" prefork=1
}

EVENTS {
   # this is required
   checkpoint    cmd="ctl_cyrusdb -c" period=30

   # this is only necessary if using duplicate delivery suppression,
   # Sieve or NNTP
   delprune    cmd="cyr_expire -E 3" at=0400

   # this is only necessary if caching TLS sessions
   tlsprune    cmd="tls_prune" at=0400

   # reindex changed mailboxes (fulltext) approximately every three hours
   squatter1       cmd="/usr/bin/ionice -c idle 
/usr/lib/cyrus/bin/squatter -s" period=180

   # reindex all mailboxes (fulltext) daily
   squattera       cmd="/usr/lib/cyrus/bin/squatter" at=0117
}

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

sieveshell logs in fine:

[root at mail admin]# sieveshell --authname=cyradmin --user=testuser1 localhost
connecting to localhost
Please enter your password:
 > list
mail
sieve-test  <- active script

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~telnet

Telnet login provides:

[root at mail admin]# telnet 192.168.0.6 4190
Trying 192.168.0.6...
Connected to 192.168.0.6.
Escape character is '^]'.
"IMPLEMENTATION" "Cyrus timsieved v2.4.17-Fedora-RPM-2.4.17-13.el7"
"SASL" "PLAIN LOGIN CRAM-MD5 DIGEST-MD5"
"SIEVE" "comparator-i;ascii-numeric fileinto reject vacation imapflags 
notify envelope relational regex subaddress copy"
"STARTTLS"
"UNAUTHENTICATE"
OK

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

And this works for both port 2000 and 4190 on all interfaces. LMTP is in 
use but somewhere, they aren't talking.

Does anyone have any troubleshooting tips they can feed me or, can 
anyone see a glaringly obvious error I've made because it's all gone a 
bit wood for the trees here.

The logs are huge but if you'd like to see the contents, let me know 
what you'd like it grep'd for and I'll provide.

Thanks,

Julian

-- 
This email is from Borden Grammar School Trust.

This email, together with any files transmitted with it, is confidential, and is intended solely for the use of the individual or entity to whom it is addressed. Any unauthorised dissemination or copying of this email or its attachments, and any use or disclosure of any information contained in them, is strictly prohibited, and may also be illegal. If you are not the intended recipient you may not use, disclose, distribute, copy, print or relay this email.

Please note that any views expressed by an individual within this email, do not necessarily reflect the views of the Borden Grammar School Trust.

Borden Grammar School Trust has taken reasonable precautions to ensure no viruses are present in this email.  The Academy cannot accept responsibility for any loss or damage arising from the use of this email and/or files attached.

Registered Office: Borden Grammar School, Avenue of Remembrance, Sittingbourne, Kent ME10 4DB

Registered in England: 07827591



More information about the Info-cyrus mailing list