[Dovecot] Mailbox statistics (sdbox / indexes) (+ wiki2 frontpage notes)
Hi,
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?
(I am effectively counting who has sent the most mail to a mailbox and how many of the the messages have been and have not been replied to; thus another answer would be: "I got a stats program for mailboxes")
Greets, Jeroen
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.
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)
Am 08.07.2013 12:17, schrieb Jeroen Massar:
Hi,
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?
(I am effectively counting who has sent the most mail to a mailbox and how many of the the messages have been and have not been replied to; thus another answer would be: "I got a stats program for mailboxes")
Greets, Jeroen
you may have a look at
http://wiki2.dovecot.org/Tools/Doveadm/SearchQuery
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.
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)
Best Regards MfG Robert Schetterer
-- [*] sys4 AG
http://sys4.de, +49 (89) 30 90 46 64 Franziskanerstraße 15, 81669 München
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer Aufsichtsratsvorsitzender: Florian Kirstein
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.
participants (3)
-
Jeroen Massar
-
Robert Schetterer
-
Timo Sirainen