LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   What is Maildir and mbox (https://www.linuxquestions.org/questions/linux-software-2/what-is-maildir-and-mbox-449513/)

vikasumit 05-29-2006 03:08 AM

What is Maildir and mbox
 
HI,

Can anyone please explain what is maildir and mbox, I found these term while reading about Exim MTA.

Thanks

acid_kewpie 05-29-2006 03:11 AM

an mbox is normally a single file, e.g. /var/spool/mail/bob where all emails are listed in a big file. Maildirs are folders of emails, normally /home/bob/Mail which contain a file for each seperate email, and sub folders for new, old emails etc... Maildirs were introduced to allow more flexibility in email file locking and such.

vikasumit 05-29-2006 03:47 AM

Hi,

thanks for info,Just need some help, understanding concepts. As I was playing with exim, I have successfully install it on my pc, but cannot figure it out how I got those mail delivered ...
I try to send email through exim itself

exim sumit@localhost

and it says mail sent, and I got it in /home/sumit/mail/new folder
now how can I access thsi mail through say outlook on windows?

Thanks

acid_kewpie 05-29-2006 04:52 AM

you need an imap or pop3 server

vikasumit 05-29-2006 05:16 AM

Hi,

Thanks for your help, I found courier to solve this... let me try that one if it works for me. Though just one quick question.

which one is better Maildir or mbox as I need to handle Emails for different domains from single PC using virtual aliases etc...

Thanks

acid_kewpie 05-29-2006 05:59 AM

qmail is a huge champion of Maildir's and a further extension of them. They are a more structured way to handle and store mail, but in line, more complicated. i'd check the qmail literature to get some comprehensive arguments in their favour. note that certain smtp and imap/pop3 servers favour (or only work with) certain mail types. for example i believe that sendmail will only work with Maildirs with an unofficial patch. may well be wrong.

jlinkels 05-29-2006 06:20 AM

Since mbox is one large file, it might become useless when corrupted. I am also not sure what happens to this huge file when you delete mails. Possibly you have to compact the file periodically (like in Outlook Express). Also might suffer performance degradation when using one huge file.

I prefer maildir format. I run an IMAP server and store the mail in maildir format. Usually three or four mail clients access the mail simultanously. Never had a problem.

jlinkels

vls 05-29-2006 07:04 AM

Quote:

Originally Posted by jlinkels
Since mbox is one large file, it might become useless when corrupted. I am also not sure what happens to this huge file when you delete mails. Possibly you have to compact the file periodically (like in Outlook Express). Also might suffer performance degradation when using one huge file.
jlinkels

mbox is just a plain text file with the header portion of the mail in a certain format. Delete a mail, the file shrinks by the size of the mail; delete 'em all, you have a 0 byte file. No special processing is necessary.

vikasumit 05-29-2006 07:33 AM

Hi,

Thanks for this relevant information ...Please check my other question if you have any idea :)

Thanks

jlinkels 05-29-2006 03:15 PM

Quote:

mbox is just a plain text file with the header portion of the mail in a certain format. Delete a mail, the file shrinks by the size of the mail; delete 'em all, you have a 0 byte file. No special processing is necessary.
Imagine you have a mbox file which has grown to a few GB over the years. (Mine does) If you delete a mail, isn't it true that the entire file must be rewritten? Or are there smarter ways? And isn't access slower, or do you have some kind of index? I honestly don't know.

jlinkels

vls 05-29-2006 05:08 PM

Quote:

Originally Posted by jlinkels
Imagine you have a mbox file which has grown to a few GB over the years. (Mine does) If you delete a mail, isn't it true that the entire file must be rewritten? Or are there smarter ways? And isn't access slower, or do you have some kind of index? I honestly don't know.

jlinkels

Your assumptions are correct. mbox is not the most effecient file format. No index, no fancy deletion facility. It's just what was developed originally for email. If you want to store gig's worth of email, then a single file ain't the way to do it. :)

vikasumit 06-03-2006 12:48 AM

HI,

sorry was out of office so late in replying, yes having all data in single file is slow process, as usual, but I wonder even if you have few thousand mails than your File system must be able to support that many Files in one folder to my knowledge a folder can have like 32K files only, than if a user (suppose a gamil type of account) have so many mails than doesn't that limit comes in effect ??

I have a like 3K files in my inbox for now :D


All times are GMT -5. The time now is 05:34 PM.