On Thursday 30 October 2008 16.42.16 Timo Sirainen wrote:
On Thu, 2008-10-30 at 16:28 +0100, LÉVAI Dániel wrote:
I've got bitten by this: The wiki[1] reads:
[...] the hierarchy separator. Currently the separator is hardcoded to
- "%" works by matching any number of characters, but it stops at
"/". [...] plugin { # Trash and its children 7d, Spam 30d expire = Trash 7 Trash/* 7 Spam 30 [...]
That is not exactly true. The separator which is working (as told me by e-frog, and as can be seen in the Maildir/ hierarchy) is the dot character (ie.: .).
The "/" hardcoding only means the "%" wildcard matching, meaning if you've a mailbox "foo/bar" then "%" would match only "foo" part, but if you've a mailbox "foo.bar" then "%" would match the full "foo.bar". In any case you'll need to use the separator you've configured in your namespaces. Where have I configured that? I'm just using maildir: in the mail_location, and if I create a subdirectory with my MUA, in the server on the filesystem it will separate it from the parent with a dot. Is this configurable?
Yep, now I can understand that, but what *is* weird, that the only "debug" information comes from this expire-tool when ran with the --test option. If I run it without it, it won't output anything anywhere. It would be nice to increase the logging for this (with or without the --test option), eg. when mail_debug=yes.
What should it write? I guess -v parameter could do something. mail_debug=yes could affect the plugin's logging. I think, it should display that it found an "expire = something" entry in dovecot.conf, and that it could find a matching directory under the mail_location. While iterating over the messages that it has found, it would be nice if it would write an info line with each message, including the message's path/name, the message's expire date in the future, that it has been expunged, or that it would have been expunged, but the --test option was set. Like: $ .../expire-tool --test expire = spamassassin.SPAM 1 spamassassin.HAM 1 match: /var/virtualmaildir/user1/Maildir/.spamassassin.SPAM/ cur/1225290969.M266240P9922.host,W=3210,S=3155:2,S will expire on Oct 31, 13:01 cur/1225291087.M157951P9922.host,W=3267,S=3193:2,S will expire on Oct 30, 19:25 cur/1225292609.M646577P6712.host,S=2802,W=2874:2,S expunged (not really) cur/1225316456.M35928P11573.host,S=3760,W=3852:2,S expunged (not really) cur/1225333013.M644866P4387.host,S=4208,W=4311:2,S expunged (not really) cur/1225350074.M658507P24283.host,W=2508,S=2462:2,S expunged (not really) cur/1225361450.M896405P30952.host,S=58036,W=58865:2,S expunged (not really) match: /var/virtualmaildir/user1/Maildir/.spamassassin.HAM/ cur/1225381029.M654813P11449.host,W=5325,S=5268:2,S expunged (not really) match: /var/virtualmaildir/user116/Maildir/.spamassassin.HAM/ cur/1225290969.M35928P11573.host,W=5325,S=5268:2,S will expire on Oct 31, 01:54
Of course without the --test option it wouldn't have to write the (not really) part. Anyway, something like the above :)
Daniel
-- LEVAI Daniel PGP key ID = 0x4AC0A4B1 Key fingerprint = D037 03B9 C12D D338 4412 2D83 1373 917A 4AC0 A4B1