Sieve stopped working after updating cyrus-imapd to 3.0.5

rfk rfk at digitalstyle.de
Mon May 14 12:49:59 EDT 2018


Hello,

just for information, the update to version 3.0.6 did not fix the 
problem for me, I'm still having the same issue. I had to apply my 
workaround (create symbolic links) to make it work again.

Regards,
Ralf



Am 02.03.2018 um 20:11 schrieb rfk:
> Hi Ken,
> 
> my distribution is Gentoo and my previous cyrus version was 2.5.10. Then 
> I upgraded to 3.0.4 but this ebuild (though marked stable by the Gentoo 
> devs) was terminating "abnormally" all the time. Finally I upgraded to 
> 3.0.5 which is running fine until now - well, except for sieve.
> 
> Regards,
> Ralf
> 
> 
> 
> Am 02.03.2018 um 16:50 schrieb Ken Murchison:
>> I've done some investigating this morning and it appears that you are 
>> correct in that lmtpd and timsieved differ in how they handle the 
>> hierarchy separator.  But I'm not sure just yet when this split happened.
>>
>> Did you upgrade from 3.0.4 or from 2.x?
>>
>>
>> On 03/01/2018 03:36 PM, rfk wrote:
>>> Hey Sebastian,
>>>
>>> thanks a lot for your feedback, seems like we're coming closer. 
>>> Although I'm not sure what port 24 is supposed to be in your swaks 
>>> command I just sent myself an e-mail while strace was attached to 
>>> cyrusmaster.
>>>
>>> The log revealed the following:
>>> readlink("/var/imap/sieve/u/user^domain^de/defaultbc", 
>>> 0x7fff7fa31d00, 4096) = -1 ENOENT (No such file or directory)
>>>
>>> Then I recognized that the users in /var/imap/sieve/ are actually 
>>> separated by a dot ('.') instead of a caret ('^') as opposed to 
>>> /var/spool/imap/ where the users are separated by a caret. After 
>>> manually renaming the sieve directory of my user to the caret 
>>> notation the filtering was finally working.
>>>
>>> However Roundcube then tells me that no filters are available. Once I 
>>> used Roundcube (or sieveshell) my sieve user directory is existing 
>>> twice, once empty in dot notation and once with the filters in caret 
>>> notation.
>>>
>>> My conclusion:
>>> 1. lmtpd (?) is using the caret notation when looking up sieve scripts.
>>> 2. timsieved (?) is using the dot notation when creating sieve scripts.
>>>
>>> Which configuration parameters affect this behaviour?
>>>
>>> Regards,
>>> Ralf
>>>
>>>
>>>
>>> Am 01.03.2018 um 13:52 schrieb Sebastian Hagedorn:
>>>> 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 <rfk at digitalstyle.de> 
>>>> 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 <rfk at digitalstyle.de>:
>>>>>>>
>>>>>>>> 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:
>>>>>>> michael.menge at zdv.uni-tuebingen.de
>>>>>>> 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
>>> ----
>>> 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
>>


More information about the Info-cyrus mailing list