Ralph Seichter
2010-Aug-24 18:18 UTC
[Dovecot] When should dictionary entries for the expire plugin be added/updated?
I've set up Dovecot 2.0 with the expire plugin using an SQLite DB, and when mail is delivered via dovecto-lda, the DB gets updated as expected. However, when I use Thunderbird 3.1.2 for Mac OS X to move a message to any of the folders known to the expire plugin (e.g. the 'tmp' folder), the SQLite DB is not updated. Here is an excerpt of my current configuration: # /etc/dovecot/dovecot.conf dict { expire = sqlite:/etc/dovecot/dict-expire.conf } plugin { expire = Junk expire2 = Trash expire3 = tmp expire4 = *.News expire5 = *.Reports expire_dict = proxy::expire sieve = /etc/dovecot/sieve/%u.sieve } service dict { unix_listener dict { # Ensure that there is no permission-related problem mode = 0666 } } protocol lda { mail_plugins = expire sieve postmaster_address = postmaster at domain.tld sendmail_path = /usr/sbin/sendmail } # /etc/dovecot/dict-expire.conf connect = /var/lib/dovecot/expires.sqlite map { pattern = shared/expire/$user/$mailbox table = expires value_field = expire fields { username = $user mailbox = $mailbox } } # Schema dump of /var/lib/dovecot/expires.sqlite PRAGMA foreign_keys=OFF; BEGIN TRANSACTION; CREATE TABLE expires ( username VARCHAR(75) NOT NULL, mailbox VARCHAR(255) NOT NULL, expire integer NOT NULL, PRIMARY KEY (username, mailbox) ); CREATE TRIGGER mergeexpire BEFORE INSERT ON expires FOR EACH ROW BEGIN UPDATE expires SET expire=NEW.expire WHERE username=NEW.username AND mailbox=NEW.mailbox; SELECT RAISE(IGNORE) WHERE (SELECT 1 FROM expires WHERE username=NEW.username AND mailbox=NEW.mailbox) IS NOT NULL; END; COMMIT; With these settings, rows will be inserted to (or updated within) expires.sqlite when dovecot-lda stores messages to any of my "Reports" folders using sieve rules. When I manually move messages to "tmp" or "Junk", the database remains unchanged. Also, when I delete messages in Thunderbird, I'd expect database additions for the folder "Trash", but this does not happen either. What am I doing wrong here? -Ralph
Timo Sirainen
2010-Aug-24 18:27 UTC
[Dovecot] When should dictionary entries for the expire plugin be added/updated?
On Tue, 2010-08-24 at 20:18 +0200, Ralph Seichter wrote:> Here is an excerpt of my current configuration:..> protocol lda { > mail_plugins = expire sieveYour excerpt shows that expire plugin is enabled for lda, but doesn't show if it's enabled for imap.
Ralph Seichter
2010-Aug-24 21:04 UTC
[Dovecot] When should dictionary entries for the expire plugin be added/updated?
On 24.08.10 20:18, Ralph Seichter wrote:> service dict { > unix_listener dict { > # Ensure that there is no permission-related problem > mode = 0666 > } > }I forgot to ask: what mode setting would you suggest in the scenario I described? Would it be sufficient if only the user "dovecot" had write permissions to the dict socket, or does every mail user need to be able to write to the socket when using his/her IMAP client to move or delete messages? -Ralph
Jerry
2010-Aug-24 23:51 UTC
[Dovecot] When should dictionary entries for the expire plugin be added/updated?
On Tue, 24 Aug 2010 23:04:06 +0200 Ralph Seichter <dovecot-ml at seichter.de> articulated:> On 24.08.10 20:18, Ralph Seichter wrote: > > > service dict { > > unix_listener dict { > > # Ensure that there is no permission-related problem > > mode = 0666 > > } > > } > > I forgot to ask: what mode setting would you suggest in the scenario I > described? Would it be sufficient if only the user "dovecot" had write > permissions to the dict socket, or does every mail user need to be > able to write to the socket when using his/her IMAP client to move or > delete messages?Timo, are the mode settings "decimal" or "octal" in the config file? I thought once upon a time that someone stated that they were octal. -- Jerry ? Dovecot.user at seibercom.net Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore the Reply-To header. __________________________________________________________________ What this country needs is a dime that will buy a good five-cent bagel.
Timo Sirainen
2010-Aug-24 23:52 UTC
[Dovecot] When should dictionary entries for the expire plugin be added/updated?
On 24.8.2010, at 22.04, Ralph Seichter wrote:> On 24.08.10 20:18, Ralph Seichter wrote: > >> service dict { >> unix_listener dict { >> # Ensure that there is no permission-related problem >> mode = 0666 >> } >> } > > I forgot to ask: what mode setting would you suggest in the scenario I > described? Would it be sufficient if only the user "dovecot" had write > permissions to the dict socket, or does every mail user need to be able > to write to the socket when using his/her IMAP client to move or delete > messages?Mail processes connect to dict socket, so all mail users executing mail processes need to have access to it. Or you could use mail_access_groups as described by http://wiki2.dovecot.org/Dict
Ralph Seichter
2010-Aug-25 11:00 UTC
[Dovecot] When should dictionary entries for the expire plugin be added/updated?
On 25.08.10 01:52, Timo Sirainen wrote:> Mail processes connect to dict socket, so all mail users executing > mail processes need to have access to it.Just as I thought when I configured "mode = 0666". I am uneasy about userA being potentially able to modify dict entries of userB. One can already define per-user sieve scripts in Dovecot 2.0, and I wonder if you have considered per-user dictionaries? -Ralph