[Dovecot] Mailbox statistics (sdbox / indexes) (+ wiki2 frontpage notes)

Timo Sirainen tss at iki.fi
Wed Jul 10 09:24:14 EEST 2013


On Mon, 2013-07-08 at 12:17 +0200, Jeroen Massar wrote:

> I used to, with a simple script, loop over the filenames in a Maildir,
> grab the From from the contents of the file and grab the flags
> (especially "READ" and "REPLIED") from the filename, but after moving to
> sdbox these flags are hidden in the index file.
> 
> Is there anyway to get these out of there programmatically without
> having to resort to using an imap-client or is that the way to go?

\Seen flags can be very efficiently looked up with doveadm mailbox
status 'messages unseen' INBOX. \Replied flag requires going through the
index, which is a little bit slower, but still quite fast: doveadm
search mailbox INBOX replied

> PS: just reverted the wiki2 Frontpage, apparently even bots know who the
> author of the IMAP protocol is (leading me to believe that that check
> does not work): http://wiki2.dovecot.org/FrontPage?action=info
> I could not find a "revert" button thus copied&pasta'd the previous
> edition in there.

The check works well enough currently. I change it only when enough bots
learn the answer that I have to keep reverting the changes several times
a week.

> PS2: there seems to be a master.wiki2.dovecot.org and a
> wiki2.dovecot.org; logging in on the one does not log in on the other,
> and accounts on the one are different from the other, and it seems
> cookies go missing also somewhere, hence why an IP is logged and not my
> account (which I used to have, now was missing and thus I recreated, but
> needed to do that on both boxes)

Hmm. The way it works is that all edits go to master.wiki* server and
they are rsynced to the two mirror wiki* servers. I hadn't really
thought of users before. Only users created on master.wiki* are
preserved, the others will get deleted after the next rsync.

I guess there should be some kind of redirection to master.wiki also
when creating a user, maybe also when logging in, but that would require
some more moinmoin patching.. Anyone want to do that? :)
http://dovecot.org/tmp/moin-1.9.3-master-mirror.diff is my current
patch.




More information about the dovecot mailing list