Dovecot mbox & other programs
Hello,
I want to use dovecot as imap server with mbox storage format (described at [1]) but I also want to access (and modify!) those mbox files which are stored on server (and used by dovecot).
What is correct way to read those mboxes? From wiki page [1] I read that I should ignore first message in mbox (which contains X-IMAPbase header) and mbox file is in mboxcl2 format.
And what is correct way to modify that mbox file (which is used by dovecot imap)? I would like to configure mutt on server to directly access those mbox mailboxes without need to use imap protocol (over localhost). It is possible without any data/message damage?
[1] - http://wiki2.dovecot.org/MailboxFormat/mbox
-- Pali Rohár pali.rohar@gmail.com
On 2015-06-06 19:01:29 +0200, Pali Rohár wrote:
I want to use dovecot as imap server with mbox storage format (described at [1]) but I also want to access (and modify!) those mbox files which are stored on server (and used by dovecot).
What is correct way to read those mboxes? From wiki page [1] I read that I should ignore first message in mbox (which contains X-IMAPbase header) and mbox file is in mboxcl2 format.
And what is correct way to modify that mbox file (which is used by dovecot imap)? I would like to configure mutt on server to directly access those mbox mailboxes without need to use imap protocol (over localhost). It is possible without any data/message damage?
IMHO ... If you start a new mail server now ... Maildir is a better format.
darix
-- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org
On Monday 08 June 2015 02:45:52 Marcus Rueckert wrote:
IMHO ... Maildir is a better format.
Really? I do not think so! Having half of million (small) files in one directory is killer... which eats caches and slow down access time. Even listing such directory (without reading file contents) consume lot of CPU cycles...
PS: I'm not subscribed to this list, so please CC me!
-- Pali Rohár pali.rohar@gmail.com
On 2015-06-08 14:48:12 +0200, Pali Rohár wrote:
On Monday 08 June 2015 02:45:52 Marcus Rueckert wrote:
IMHO ... Maildir is a better format.
Really? I do not think so! Having half of million (small) files in one directory is killer... which eats caches and slow down access time. Even listing such directory (without reading file contents) consume lot of CPU cycles...
so what?
- modern filesystems
- dovecot's caching
313k mails in single mailbox and no problems at all.
PS: I'm not subscribed to this list, so please CC me!
you should change that. it isnt that high traffic.
or use the imap access provided here: http://www.dovecot.org/mailinglists.html
-- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org
On Monday 08 June 2015 23:06:26 Marcus Rueckert wrote:
On 2015-06-08 14:48:12 +0200, Pali Rohár wrote:
On Monday 08 June 2015 02:45:52 Marcus Rueckert wrote:
IMHO ... Maildir is a better format.
Really? I do not think so! Having half of million (small) files in one directory is killer... which eats caches and slow down access time. Even listing such directory (without reading file contents) consume lot of CPU cycles...
so what?
- modern filesystems
- dovecot's caching
313k mails in single mailbox and no problems at all.
Still I want read/write access to storage and want to use mbox as storage (also for easier backup and copy)...
And my question was how to properly read and write from/to mbox files which are used by dovecot.
-- Pali Rohár pali.rohar@gmail.com
On 2015-06-08 23:11:09 +0200, Pali Rohár wrote:
Still I want read/write access to storage and want to use mbox as storage (also for easier backup and copy)...
- backup is actually much easier for maildir.
- especially when you want to deleting mails in the mbox file it is a lot of rewriting data. compared to just unlinking the files.
And my question was how to properly read and write from/to mbox files which are used by dovecot.
Through the imap protocol or at least the same locking mechanism configured in dovecot.
darix
-- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org
On Monday 08 June 2015 23:17:50 Marcus Rueckert wrote:
Through the imap protocol or at least the same locking mechanism configured in dovecot.
It is which locking mechanism?
It is really ok for dovecot to:
- append (new) emails into mbox file?
- edit mbox file? (e.g. change some header/body)
-- Pali Rohár pali.rohar@gmail.com
On 2015-06-08 2:21 PM, Pali Rohár wrote:
On Monday 08 June 2015 23:17:50 Marcus Rueckert wrote:
Through the imap protocol or at least the same locking mechanism configured in dovecot.
It is which locking mechanism?
It is really ok for dovecot to:
- append (new) emails into mbox file?
- edit mbox file? (e.g. change some header/body)
On 6/8/2015 5:11 PM, Pali Rohár pali.rohar@gmail.com wrote:
Still I want read/write access to storage and want to use mbox as storage (also for easier backup and copy)...
And my question was how to properly read and write from/to mbox files which are used by dovecot.
There is no method for doing this. Any manual/direct manipulation of the files risks serious problems.
Fyi, your 'fears' regarding using the IMAP protocol on localhost are seriously unfounded.
Just use IMAP, and move on with your life.
On 6/9/2015 8:36 AM, Charles Marcus CMarcus@Media-Brokers.com wrote:
On 6/8/2015 5:11 PM, Pali Rohár pali.rohar@gmail.com wrote:
Still I want read/write access to storage and want to use mbox as storage (also for easier backup and copy)...
And my question was how to properly read and write from/to mbox files which are used by dovecot. There is no method for doing this.
Guess that should have read:
There is no 'proper' or safe way for doing this.
On Tuesday 09 June 2015 08:44:06 Charles Marcus wrote:
On 6/9/2015 8:36 AM, Charles Marcus CMarcus@Media-Brokers.com wrote:
On 6/8/2015 5:11 PM, Pali RohĂĄr pali.rohar@gmail.com wrote:
Still I want read/write access to storage and want to use mbox as storage (also for easier backup and copy)...
And my question was how to properly read and write from/to mbox files which are used by dovecot. There is no method for doing this.
Guess that should have read:
There is no 'proper' or safe way for doing this.
Ok, thanks for information!
Anyway I think that for atomic/snapshot read of mbox file should be ok (when lock is not acquired by dovecot). Or not?
And which emails in mbox are used only internally by dovecot? Only those which have X-IMAPbase header? Or are there any other emails which should I ignore when I parse mbox file (for read access)?
-- Pali Rohár pali.rohar@gmail.com
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On 09-06-15 15:05, Pali Rohár wrote:
On Tuesday 09 June 2015 08:44:06 Charles Marcus wrote:
On 6/9/2015 8:36 AM, Charles Marcus CMarcus@Media-Brokers.com wrote:
On 6/8/2015 5:11 PM, Pali RohĂĄr pali.rohar@gmail.com wrote:
Still I want read/write access to storage and want to use mbox as storage (also for easier backup and copy)...
And my question was how to properly read and write from/to mbox files which are used by dovecot. There is no method for doing this.
Guess that should have read:
There is no 'proper' or safe way for doing this.
Ok, thanks for information!
Anyway I think that for atomic/snapshot read of mbox file should be ok (when lock is not acquired by dovecot). Or not?
And which emails in mbox are used only internally by dovecot? Only those which have X-IMAPbase header? Or are there any other emails which should I ignore when I parse mbox file (for read access)?
It's a standard, so you can read up on it: http://lmgtfy.com/?q=mbox+format+standard
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2
iQIcBAEBCAAGBQJVdxFqAAoJEJPfMZ19VO/1+mcQAIOPXatJ5GiyET5MtrMfjf9m TiDL7LeddP8/ALfUogMS0HjlB35rRYsXPm7t+l8pCoconVPz2y1R8nNV1PxZj3H0 zfuX/UqskbEsRgQUlV7mrnqZllI3HdaEMuoFqEzI4rpA06PgTFC3yM/2gzVB3Vuq 0miPMy7GokaaaEb62vG7gUbdpAxGYcvuzcRpRIayx/VGuCJT6H3ZCcOSo3vINArR ZBKC7hzFsp5mu+mEdR3cl3+7tmCV/pxgbxvZEB93hOFZOdNdZaVGH4oSeLjcxULa S9kNQFVq9qH4EsOL6M1r2I9GFLTJtVxCRVlb5ay56QW8tzeVUCHRY+f/zfpIaCub 3aOc09/BRQKmRaL6iftzK34rI65HjVync/6Iq2OpTxolK1Ftr9Q8595UPxjmVfXC SHG5NsjhkN1ZYZID/j0EAtCBXd876cqjVhWD5xCEu2Ot+9SDZBTzOc6IHU00uy/U 0h6kMry0lkW+YncsKDJXQiqzhkD0wiMxV9PaH8Q0QzA3hV4eMRRqXWKSOODHmWbZ m+/S81ehnXuzlR1jzGcJ/6FddXr47DsIZYxrjrbIIHg5gNqPct9AH4rzyVRb2IPt s9YXJPUFlDjRiYxb8RE5x7339KhCYpllZ4kNdTvh9GlIrcHqXI/mYjOE8uR7cr7H axHx+tjYyD6YjlkFLei0 =9jDh -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On 06-06-15 19:01, Pali Rohár wrote:
Hello,
I want to use dovecot as imap server with mbox storage format (described at [1]) but I also want to access (and modify!) those mbox files which are stored on server (and used by dovecot).
What is correct way to read those mboxes? From wiki page [1] I read that I should ignore first message in mbox (which contains X-IMAPbase header) and mbox file is in mboxcl2 format.
And what is correct way to modify that mbox file (which is used by dovecot imap)? I would like to configure mutt on server to directly access those mbox mailboxes without need to use imap protocol (over localhost). It is possible without any data/message damage?
Just out of curiosity: why are you interested in handling the files manually when dovecot and IMAP protocol can already do that for you?
Even when accessing the files directly from the server, dovecot will handle possible file correction, access control, file permissions etc all for you. Using IMAP to localhost with mutt still gives you all of the above, maybe including other nice IMAP-related benefits such as FTS etc.
Tom -----BEGIN PGP SIGNATURE----- Version: GnuPG v2
iQIcBAEBCAAGBQJVdX+9AAoJEJPfMZ19VO/1yqsP/3ZHyKwJJ9IAmeMTaT/W2wHM gLhXAJj3ZYO2s1gp5b2Swyq/ta4KUDEwgdWQQaDK2YVdyTTu9f/6TgMubPNcuYV9 ogfqyGunPpVk3ZVSf9U2EviU2SXvjzUDuZ1bI80IxQYVXYOidzAZw4wBN+IXjFss giLKaI+T6YOU2+nFrCkavjMXuwbPhjo84Xe2KPvB0mcGy31HQoHq/ChOYHVzYUkH 1qYVWOE5bjUMHZFwExsR84vhjIBTAqwqKP0Hf5JdZRIafsrysY0gqSOWcrTeu7HH e2MLQvtLr3vAWoi319AQ03vz//ESOKBfZl/tv2ZuVzh8o9l0zkDtm0FxMlj+rrmQ /O/1kV4jJGjcCYfL61hZPkHHcI8sJq81Dz0CX5xbisYCLkk+EpWHjQC9ILgcl6vQ FBBOqvCfgmyCgYHi/3PbIZ5Hd4gmzIG2Du+59Webv/dIigeNv5dW5gbqx7kLYP1A ltBYQYtK+/tSVOZKjvcfNoT6BQcSn90VGNC2QzO8FcDkTzu/ihiY4DuE9bpCDgAs uebcRa55DOhL3EFeEy85fczCuac1TM8uaO+la9Xdokj4lWl20j6HlGQPlykRlMx0 Kyw6Z42SIR9lFa+Q+KsvBDY94rfwj5sgmo5oelndno/l1bHx1h8BGesbzKyS53r1 Jl57kyy3lePwcQ+dbGYm =lrws -----END PGP SIGNATURE-----
On Monday 08 June 2015 13:42:53 Tom Hendrikx wrote:
On 06-06-15 19:01, Pali Roh?r wrote:
Hello,
I want to use dovecot as imap server with mbox storage format (described at [1]) but I also want to access (and modify!) those mbox files which are stored on server (and used by dovecot).
What is correct way to read those mboxes? From wiki page [1] I read that I should ignore first message in mbox (which contains X-IMAPbase header) and mbox file is in mboxcl2 format.
And what is correct way to modify that mbox file (which is used by dovecot imap)? I would like to configure mutt on server to directly access those mbox mailboxes without need to use imap protocol (over localhost). It is possible without any data/message damage?
Just out of curiosity: why are you interested in handling the files manually when dovecot and IMAP protocol can already do that for you?
Because I have direct access to files and so I would not use another indirect and slower access to them if I'm not forced. And also IMAP protocol is not implemented properly in any application and direct file access via open/read/write/... unix calls is easier as implementing and using too complicated IMAP protocol. If I want to download all emails as fast as possible I just rsync those mboxes. Using IMAP connection for this operation is slow, hard and I think also stupid.
Even when accessing the files directly from the server, dovecot will handle possible file correction, access control, file permissions etc all for you. Using IMAP to localhost with mutt still gives you all of the above, maybe including other nice IMAP-related benefits such as FTS etc.
Tom
I do not want to have one message stored N times, just because every IMAP client store message locally and message is stored also on IMAP server. If I use IMAP over localhost it means that I have to wait for IMAP protocol until client download all headers/body/etc... then do magic and show me emails.
But I do not want to spend lot of time with writing philosophical problems of IMAP and their clients...
I just want to know: How to correctly read dovecot mboxes and how to correctly write to them. Thats all. In your email I did not find this information :-(
PS: I'm not subscribed to this list, so please CC me!
-- Pali Rohár pali.rohar@gmail.com
Pretty sure [s]he's a troll: Every assumption [s]he's written until now has been wrong and there was not even the attempt to show data/information that supports the claims. That communication form is usually intentional to provoke discussion.
Further CCing to his/her email should stop, s/he can just subscribe.
Am 06.06.2015 um 19:01 schrieb Pali Rohár:
What is correct way to read those mboxes? And what is correct way to modify that mbox file Really simple - just 9 pages: http://tools.ietf.org/html/rfc4155
I would like to configure mutt on server to directly access those mbox mailboxes without need to use imap protocol (over localhost). It is possible without any data/message damage? # man mutt # mutt -f /var/mail/...
Greetings Daniel
Excuse me... But I start thinking rude behaviour and trolling from you side.
On Tuesday 09 June 2015 09:55:40 Daniel Tröder wrote:
Pretty sure [s]he's a troll: Every assumption [s]he's written until now has been wrong and there was not even the attempt to show data/information that supports the claims. That communication form is usually intentional to provoke discussion.
Further CCing to his/her email should stop, s/he can just subscribe.
Am 06.06.2015 um 19:01 schrieb Pali Rohár:
What is correct way to read those mboxes? And what is correct way to modify that mbox file Really simple - just 9 pages: http://tools.ietf.org/html/rfc4155
I would like to configure mutt on server to directly access those mbox mailboxes without need to use imap protocol (over localhost). It is possible without any data/message damage? # man mutt # mutt -f /var/mail/...
Greetings Daniel
I already read dovecot mailing list page [1] and there is written that I can post messages to list even without subscribing. And all well behaved mailing list send response also to original sender. Otherwise such mailing list is useless for people who are not subscribed (it is just /dev/null). I though that ML used by people who understand emails very well do not do such useless things for senders...
I'm really disappointed about you -- dovecot people on ML -- I have just asked clear question about mbox storage format because I did not find everything on dovecot wiki page [2] and I wanted to be sure how it is working... And I thought that dovecot mailing list is good place where people could answer my question how is dovecot using mbox storage.
And every response was either not to my question or your which just marked me as troll who should not even post messages to this list.
I do not want to continue this discussion about trolling... as there is no value from it. I really do not understand what do you have against me.
Thanks.
[1] - http://www.dovecot.org/mailinglists.html [2] - http://wiki2.dovecot.org/MailboxFormat/mbox
-- Pali Rohár pali.rohar@gmail.com
participants (6)
-
Charles Marcus
-
Daniel Tröder
-
Gregory Finch
-
Marcus Rueckert
-
Pali Rohár
-
Tom Hendrikx