[Dovecot] Expire plugin not executing for sieve plugin?
Running dovecot 1.2.12 on ubuntu 10.10. Here is the problem: I have mysql backend for expire. I am using the dovecot-postfix package which creates /etc/dovecot/conf.d/01-mail-stack-delivery.conf which looks like this:
# Some general options protocols = imap imaps managesieve disable_plaintext_auth = no ssl = yes ssl_cert_file = /etc/ssl/certs/ssl-mail.pem ssl_key_file = /etc/ssl/private/ssl-mail.key ssl_cipher_list = ALL:!LOW:!SSLv2:ALL:!aNULL:!ADH:!eNULL:!EXP:RC4+RSA:+HIGH:+MEDIUM mail_location = maildir:~/Maildir auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@
# IMAP configuration protocol imap { mail_max_userip_connections = 10 imap_client_workarounds = outlook-idle delay-newmail mail_plugins = expire }
# LDA configuration protocol lda { postmaster_address = postmaster mail_plugins = sieve expire quota_full_tempfail = yes deliver_log_format = msgid=%m: %$ rejection_reason = Your message to <%t> was automatically rejected:%n%r }
# Plugins configuration plugin { sieve=~/.dovecot.sieve sieve_dir=~/sieve # If the user has no personal active script (i.e. if the file # indicated in sieve= does not exist), use this one: sieve_global_path = /var/lib/dovecot/sieve/default.sieve }
The sieve is:
require "fileinto"; require "imap4flags"; if header :contains "X-Spam-Flag" "YES" { setflag "\\Seen"; fileinto "SPAM"; stop; }
Originally, this did not have the setflag or stop - I added them hoping to fix the problem, but no luck. The problem is this: when spam assassin has flagged a message as spam, the sieve runs and the message is in fact filed into the SPAM folder, but no expire entry is added to the database. If I move such a message from the SPAM folder to the Inbox and then back to SPAM, voila, I *do* get the entry created. Here is the mysql table before and after I did the move/move:
mysql> select * from expires; +----------+---------------+--------------+ | username | mailbox | expire_stamp | +----------+---------------+--------------+ | dswartz | Deleted Items | 1319720163 | | dswartz | Sent | 1319120165 | | denise | Trash | 1319139920 | | samantha | Trash | 1319136146 | | denise | Sent | 1319655872 | | danielle | Sent | 1319192230 | | samantha | Sent | 1319268855 | | dswartz | Trash | 1319725884 | | samantha | SPAM | 1321504531 | +----------+---------------+--------------+ 9 rows in set (0.00 sec)
mysql> select * from expires; +----------+---------------+--------------+ | username | mailbox | expire_stamp | +----------+---------------+--------------+ | dswartz | Deleted Items | 1319720163 | | dswartz | Sent | 1319120165 | | denise | Trash | 1319139920 | | samantha | Trash | 1319136146 | | denise | Sent | 1319655872 | | danielle | Sent | 1319192230 | | samantha | Sent | 1319268855 | | dswartz | Trash | 1319725884 | | samantha | SPAM | 1321504531 | | dswartz | SPAM | 1321714666 | +----------+---------------+--------------+ 10 rows in set (0.00 sec)
It's almost like the fileinto stuff is not running the plugin code at all, or am I totally on drugs? If I can't get a fix for this, I at least now can think of a hack to "fix" it. e.g. every night, run a script that adds a "now" timestamp for everyone's SPAM folder to trick the periodic expire tool code into checking that folder, but obviously I'd rather have a real fix :) If this is just 'how it works', is it better in 2.0?
No ideas? I googled some more and eventually turned up this posting:
http://www.mailinglistarchive.com/html/dovecot@dovecot.org/2011-01/msg00716....
guy seems to be having the exact problem I am, unfortunately, no-one replied to his post either :(
On 10/24/2011 7:52 PM, Dan Swartzendruber wrote:
No ideas? I googled some more and eventually turned up this posting:
http://www.mailinglistarchive.com/html/dovecot@dovecot.org/2011-01/msg00716....
guy seems to be having the exact problem I am, unfortunately, no-one replied to his post either :(
Hmm, wonder why no one answered that one. In theory, those plugins should interact gracefully. However, if something is wrong, I cannot test this right now, since I've not installed expire so far. I'll ask Timo if he can take a look at this. Otherwise, I'll have to build a small test setup first, which may take some time.
Regards,
Stephan.
On Tue, 2011-10-25 at 00:25 +0200, Stephan Bosch wrote:
On 10/24/2011 7:52 PM, Dan Swartzendruber wrote:
No ideas? I googled some more and eventually turned up this posting:
http://www.mailinglistarchive.com/html/dovecot@dovecot.org/2011-01/msg00716....
guy seems to be having the exact problem I am, unfortunately, no-one replied to his post either :(
Hmm, wonder why no one answered that one. In theory, those plugins should interact gracefully.
Right. There shouldn't be anything special with expire plugin and Sieve.
Running dovecot 1.2.12 on ubuntu 10.10.
This very likely works fine with v2.0 though, and I don't really have time to debug noncritical v1.x bugs anymore.
participants (3)
-
Dan Swartzendruber
-
Stephan Bosch
-
Timo Sirainen