Re: Sieve stopped working after updating cyrus-imapd to 3.0.5

Sebastian Hagedorn <[email protected]>
Newsgroups gmane.mail.imap.cyrus
Message-ID <[email protected]>
Not really. My best suggestion would be to strace the lmtp process to see 
if the sieve scripts are even found and opened. On a test system I did it 
like this:

strace -f -ff -o /tmp/lmtptrace -p <PID of cyrus-master>

It might be better to prefork an lmtpd and to specifically strace that pid, 
but in my case it didn't matter.

Then I ran swaks:

swaks --protocol lmtp -t name-of-a-user-with-sieve -s localhost -p 24

In the resulting files I could see the script being accessed:

lmtptrace.43344:open("/lib64/libcyrus_sieve.so.0", O_RDONLY|O_CLOEXEC) = 5
lmtptrace.43344:readlink("/var/lib/imap/sieve/E/xxx/defaultbc", 
"smartsieve.bc", 4096) = 13
lmtptrace.43344:open("/var/lib/imap/sieve/E/xxx/smartsieve.script", O_RDWR) 
= 12
lmtptrace.43344:stat("/var/lib/imap/sieve/E/xxx/smartsieve.bc", 
{st_mode=S_IFREG|0600, st_size=604, ...}) = 0
lmtptrace.43344:stat("/var/lib/imap/sieve/E/xxx/smartsieve.bc", 
{st_mode=S_IFREG|0600, st_size=604, ...}) = 0
lmtptrace.43344:open("/var/lib/imap/sieve/E/xxx/smartsieve.bc", O_RDONLY) = 
13
lmtptrace.43344:stat("/var/lib/imap/sieve/E/xxx/defaultbc", 
{st_mode=S_IFREG|0600, st_size=604, ...}) = 0
lmtptrace.43344:open("/var/lib/imap/sieve/E/xxx/defaultbc", O_RDONLY) = 12

Maybe try that and report back what happens on your system.

--On 28. Februar 2018 um 19:18:55 +0100 rfk <[email protected]> wrote:

> Hello,
>
> still no other ideas?
>
> Ralf
>
>
> Am 15.02.2018 um 19:37 schrieb rfk:
>> Hi,
>>
>> I'm so sorry, don't know how this could happen, but the last line of my
>> configuration was lost during copy and paste:
>>
>> altnamespace: 0
>>
>> So it is already disabled.
>>
>> Ralf
>>
>>
>>
>> Am 15.02.2018 um 19:32 schrieb Michael Menge:
>>> Hi,
>>>
>>>
>>> Quoting rfk <[email protected]>:
>>>
>>>> Hi,
>>>>
>>>> thanks for your feedback. Unfortunately sievec reports nothing:
>>>>
>>>> # grep -v ^# roundcube.script
>>>> require ["imapflags","fileinto"];
>>>>
>>>> if anyof (header :contains "Subject" "test")
>>>> {
>>>>         setflag "\\Seen";
>>>>         fileinto "INBOX/Trash";
>>>>         stop;
>>>> }
>>>>
>>>> # sievec roundcube.script test
>>>> #
>>>>
>>>>
>>>> Here's my configuration in case it helps:
>>>>
>>>> # grep -vE "^#|^$" /etc/imapd.conf
>>>> admins: cyrus
>>>> configdirectory: /var/imap
>>>> proc_path: /run/cyrus/proc
>>>> mboxname_lockpath: /run/cyrus/lock
>>>> duplicate_db_path: /run/cyrus/deliver.db
>>>> ptscache_db_path:  /run/cyrus/ptscache.db
>>>> statuscache_db_path: /run/cyrus/statuscache.db
>>>> tls_sessions_db_path: /run/cyrus/tls_sessions.db
>>>> defaultpartition: default
>>>> partition-default: /var/spool/imap
>>>> sievedir: /var/imap/sieve
>>>> lmtpsocket: /var/imap/socket/lmtp
>>>> idlesocket: /var/imap/socket/idle
>>>> notifysocket: /var/imap/socket/notify
>>>> syslog_prefix: cyrus
>>>> httpmodules: caldav carddav
>>>> hashimapspool: true
>>>> virtdomains: no
>>>> defaultdomain: localhost
>>>> popminpoll: 1
>>>> allowplaintext: yes
>>>> sasl_pwcheck_method: saslauthd
>>>> sasl_mech_list: PLAIN LOGIN
>>>> sasl_auto_transition: no
>>>> sieve_extensions: fileinto reject vacation imapflags notify include
>>>> envelope body relational regex subaddress copy
>>>> tls_session_timeout: 1440
>>>> tls_client_ca_file:     /.../ca_file.pem
>>>> tls_server_cert:        /.../cert.pem
>>>> tls_server_key:         /.../key.pem
>>>>
>>>>
>>>> Any other ideas?
>>>>
>>>
>>> the altnamespace default cahnged in 3.0. so you should disable it in
>>> imapd.conf or change the fileinto to "Trash"
>>>
>>> Quoting imapd.conf manpage
>>> ====================
>>> altnamespace: 1
>>>
>>>    Use the alternate IMAP namespace, where personal folders reside at
>>> the same level in the hierarchy as INBOX.
>>>    This option ONLY applies where interaction takes place with the
>>> client/user. Currently this is limited to
>>>    the IMAP protocol (imapd) and Sieve scripts (lmtpd). This option
>>> does NOT apply to admin tools such as
>>>    cyradm (admins ONLY), reconstruct, quota, etc., NOR does it affect
>>> LMTP delivery of messages directly to
>>>    mailboxes via plus-addressing. The default changed in 3.0 from off
>>> to on.
>>> ===================
>>>
>>>> Ralf
>>>>
>>>>
>>>> Am 15.02.2018 um 03:39 schrieb ellie timoney:
>>>>> Hi,
>>>>>
>>>>> Does the "sievec" compiler report any errors if you try to compile
>>>>> your sieve scripts by hand?
>>>>>
>>>>> Its manpage is here:
>>>>> https://www.cyrusimap.org/imap/reference/manpages/systemcommands/siev
>>>>> ec.html
>>>>>
>>>>>
>>>>> Cheers,
>>>>>
>>>>> ellie
>>>>>
>>>>> On Thu, Feb 15, 2018, at 5:28 AM, rfk wrote:
>>>>>> Hello,
>>>>>>
>>>>>> recently I updated my cyrus-imapd installation from verion 2.5.10 to
>>>>>> version 3.0.5. Unfortunately the sieve filters stopped working since
>>>>>> then. The rest is working fine.
>>>>>>
>>>>>> The filters are listed in the sieveshell and all incoming mails get
>>>>>> tagged with "X-Sieve: CMU Sieve 3.0". However even the simplest rules
>>>>>> are just getting ignored. In the logs I cannot find any related
>>>>>> entries.
>>>>>>
>>>>>> My configuration settings regarding "unixhierarchysep" (on) and
>>>>>> "altnamespace" (off) have not changed since version 2.5.10 (I
>>>>>> configured
>>>>>> them accordingly in version 3.0.5). I followed the entire upgrade
>>>>>> guide
>>>>>> by the way.
>>>>>>
>>>>>> Furthermore I also tried adding a completely new account with a very
>>>>>> simple new sieve script (mark as seen and move to folder; created by
>>>>>> Roundcube) but nothing happens to incoming mails.
>>>>>>
>>>>>> Is there anything else I can check? Is it possible to raise the log
>>>>>> level for sieve?
>>>>>>
>>>>>> Thanks in advance.
>>>>>>
>>>>>> Ralf
>>>>>> ----
>>>>>> Cyrus Home Page: http://www.cyrusimap.org/
>>>>>> List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
>>>>>> To Unsubscribe:
>>>>>> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
>>>>> ----
>>>>> Cyrus Home Page: http://www.cyrusimap.org/
>>>>> List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
>>>>> To Unsubscribe:
>>>>> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
>>>>>
>>>> ----
>>>> Cyrus Home Page: http://www.cyrusimap.org/
>>>> List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
>>>> To Unsubscribe:
>>>> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
>>>
>>>
>>>
>>> -----------------------------------------------------------------------
>>> ---------
>>>
>>> M.Menge                               
>>> Tel.: (49) 7071/29-70316 Universität
>>> Tübingen                   Fax.: (49) 7071/29-5912
>>> Zentrum für Datenverarbeitung          mail:
>>> [email protected]
>>> Wächterstraße 76
>>> 72074 Tübingen
>>>
>>> ----
>>> Cyrus Home Page: http://www.cyrusimap.org/
>>> List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
>>> To Unsubscribe:
>>> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
> ----
> Cyrus Home Page: http://www.cyrusimap.org/
> List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
> To Unsubscribe:
> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus



Mit freundlichen Grüßen

Sebastian Hagedorn
-- 
    .:.Sebastian Hagedorn - Weyertal 121 (Gebäude 133), Zimmer 2.02.:.
                 .:.Regionales Rechenzentrum (RRZK).:.
   .:.Universität zu Köln / Cologne University - ✆ +49-221-470-89578.:.

----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
signature.asc (application/pgp-signature, 191 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0

iEYEARECAAYFAlqX938ACgkQGXsGmU0QW0USsgCgnDDIbWkbEOylwYJgbOs9ybFW
qxwAn0/IL0ABfXG5PXBt2xfGSZx5kTX7
=bmAy
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.