[Dovecot] why is there email in my mbox file?
Hi,
I've installed dovecot-imapd under ubuntu. My account and root are the only email accounts on my computer. I transitioned from using GNUS with fetchmail, exim and movemail, to gnus with exim, fetchmail and imap, so I've kept the mbox format email instead of changing to maildir. This works okay, except my mbox file is giant.
I expected dovecot to take the mail out of the mbox file and put it somewhere. But, I see there's a big mbox file (/var/mail/me) that keeps growing. Is dovecot using that as the store of messages?
If I were to move to using maildir instead of mbox, what is going to happen to my existing mail?
Kendall
Kendall Shaw:
I expected dovecot to take the mail out of the mbox file and put it somewhere.
Why should it do this? Dovecot normally tries to automatically detect where your mailboxes are and if it finds them in one of the usual places (for example your /var/mail/user) it uses this location.
But, I see there's a big mbox file (/var/mail/me) that keeps growing. Is dovecot using that as the store of messages?
Probably. Why don't you take a look?
If I were to move to using maildir instead of mbox, what is going to happen to my existing mail?
Nothing. You would have to move your mboxes to maildir yourself. You can use programs like mb2md to do that.
J.
When standing at the top of beachy head I find the rocks below very attractive. [Agree] [Disagree] http://www.slowlydownward.com/NODATA/data_enter2.html
Jochen Schulz ml@well-adjusted.de writes:
Kendall Shaw:
I expected dovecot to take the mail out of the mbox file and put it somewhere.
Why should it do this? Dovecot normally tries to automatically detect where your mailboxes are and if it finds them in one of the usual places (for example your /var/mail/user) it uses this location.
To be able to create folders and such that mbox doesn't describe and IMAP does maybe. In anycase, I wonder if you have more advice for me about converting to maildir.
But, I see there's a big mbox file (/var/mail/me) that keeps growing. Is dovecot using that as the store of messages?
Probably. Why don't you take a look?
I've taken a look at the file and no thoughts appeared while I was doing that.
I see there is both the file in /var/mail/me and in /home/me/.dovecot there are a number of files that seem to correspond to the IMAP folders.
In dovecot.conf I have:
default_mail_env = mbox:~/.dovecot/:INBOX=/var/mail/me
It was unclear to me if the directory other than the one labeled INBOX was required. I was guessing that dovecot might take the messages out of the inbox and put them into the other path.
If I were to move to using maildir instead of mbox, what is going to happen to my existing mail?
Nothing. You would have to move your mboxes to maildir yourself. You can use programs like mb2md to do that.
Thanks for this advice. I used mb2md to create a Maildir directory using:
mb2md -m mb2md -s /var/mail/me -R
I also changed dovecot.conf to use:
default_mail_env = maildir:~/Maildir
And changed exim to use Maildir instead of my mbox file, using the lines in the example for debian on the dovecot main page.
The result is that I get no mail. The log file looks essentially the same with some variations.
Using mbox, logging in looks like:
Feb 8 14:42:52 pokey dovecot: IMAP(me): Effective uid=1000, gid=1000 Feb 8 14:42:52 pokey dovecot: IMAP(me): mbox: data=/home/me/.dovecot/:INBOX=/var/mail/me Feb 8 14:42:52 pokey dovecot: IMAP(me): mbox: root=/home/me/.dovecot, index=/home/me/.dovecot, inbox=/var/mail/me
Using maildir, logging in looks like:
Feb 8 14:34:11 pokey dovecot: IMAP(me): Effective uid=1000, gid=1000 Feb 8 14:34:11 pokey dovecot: IMAP(me): maildir: data=/home/me/Maildir Feb 8 14:34:11 pokey dovecot: IMAP(me): maildir: root=/home/me/Maildir, index=/home/me/Maildir, control=, inbox=
Do I need to indicate where the inbox is somehow in default_mail_env?
Kendall
Ooops. Correction below:
Kendall Shaw queshaw@pacbell.net writes:
Jochen Schulz ml@well-adjusted.de writes:
Kendall Shaw:
I expected dovecot to take the mail out of the mbox file and put it somewhere.
Why should it do this? Dovecot normally tries to automatically detect where your mailboxes are and if it finds them in one of the usual places (for example your /var/mail/user) it uses this location.
To be able to create folders and such that mbox doesn't describe and IMAP does maybe. In anycase, I wonder if you have more advice for me about converting to maildir.
But, I see there's a big mbox file (/var/mail/me) that keeps growing. Is dovecot using that as the store of messages?
Probably. Why don't you take a look?
I've taken a look at the file and no thoughts appeared while I was doing that.
I see there is both the file in /var/mail/me and in /home/me/.dovecot there are a number of files that seem to correspond to the IMAP folders.
In dovecot.conf I have:
default_mail_env = mbox:~/.dovecot/:INBOX=/var/mail/me
It was unclear to me if the directory other than the one labeled INBOX was required. I was guessing that dovecot might take the messages out of the inbox and put them into the other path.
If I were to move to using maildir instead of mbox, what is going to happen to my existing mail?
Nothing. You would have to move your mboxes to maildir yourself. You can use programs like mb2md to do that.
Thanks for this advice. I used mb2md to create a Maildir directory using:
mb2md -m mb2md -s /var/mail/me -R
mb2md -s /home/me/.dovecot -R
Kendall
I also changed dovecot.conf to use:
default_mail_env = maildir:~/Maildir
And changed exim to use Maildir instead of my mbox file, using the lines in the example for debian on the dovecot main page.
The result is that I get no mail. The log file looks essentially the same with some variations.
Using mbox, logging in looks like:
Feb 8 14:42:52 pokey dovecot: IMAP(me): Effective uid=1000, gid=1000 Feb 8 14:42:52 pokey dovecot: IMAP(me): mbox: data=/home/me/.dovecot/:INBOX=/var/mail/me Feb 8 14:42:52 pokey dovecot: IMAP(me): mbox: root=/home/me/.dovecot, index=/home/me/.dovecot, inbox=/var/mail/me
Using maildir, logging in looks like:
Feb 8 14:34:11 pokey dovecot: IMAP(me): Effective uid=1000, gid=1000 Feb 8 14:34:11 pokey dovecot: IMAP(me): maildir: data=/home/me/Maildir Feb 8 14:34:11 pokey dovecot: IMAP(me): maildir: root=/home/me/Maildir, index=/home/me/Maildir, control=, inbox=
Do I need to indicate where the inbox is somehow in default_mail_env?
Kendall
Kendall Shaw:
Jochen Schulz ml@well-adjusted.de writes:
Kendall Shaw:
But, I see there's a big mbox file (/var/mail/me) that keeps growing. Is dovecot using that as the store of messages?
Probably. Why don't you take a look?
I've taken a look at the file and no thoughts appeared while I was doing that.
:)
I see there is both the file in /var/mail/me and in /home/me/.dovecot there are a number of files that seem to correspond to the IMAP folders.
In dovecot.conf I have:
default_mail_env = mbox:~/.dovecot/:INBOX=/var/mail/me
Ah, ok. That means that Dovecot expects mail to be delivered to /var/mail/me which is an mbox file and all other folders are created in ~/.dovecot/, which is a maildir.
You mentioned you are using fetchmail. Does that deliver to /var/mail/me? As far as I can tell, fetchmail reinjects POP'ped mail to your local MTA (exim).
It was unclear to me if the directory other than the one labeled INBOX was required.
No, it's not. I only have mail_location = maildir:/srv/mail/%Ld/%Ln
(It's a virtual domain setup, that's why I have a different folder per domain.)
I was guessing that dovecot might take the messages out of the inbox and put them into the other path.
Not until you tell it do to so (with your IMAP client).
mb2md -m
If I understand the documentation of mb2md correctly, that converted your /var/mail/me to maildir. How does it look like now? (I mean the contents of that file/directory.)
mb2md -s /var/mail/me -R [s#/var/mail/me#/home/me/.dovecot#]
And I think this one copied whatever was in /home/me/.dovecot to /home/me/Maildir. Do you have such a folder?
I also changed dovecot.conf to use:
default_mail_env = maildir:~/Maildir
Looks fine if you want to have all your mail below that directory (which is very common).
And changed exim to use Maildir instead of my mbox file, using the lines in the example for debian on the dovecot main page.
If exim is really delivering mail to your mailboxes, then I guess this should be fine as well. I don't know exim good enough, though.
The result is that I get no mail. The log file looks essentially the same with some variations.
Using mbox, logging in looks like:
It would probably be more interesting to see what exim looks, as it appears not to be able to deliver. But I am quite stuck in the dark.
Feb 8 14:42:52 pokey dovecot: IMAP(me): mbox: root=/home/me/.dovecot, index=/home/me/.dovecot, inbox=/var/mail/me -- snip Feb 8 14:34:11 pokey dovecot: IMAP(me): maildir: root=/home/me/Maildir, index=/home/me/Maildir, control=, inbox=
Do I need to indicate where the inbox is somehow in default_mail_env?
I don't think so. If I were you, I would try to inspect where exim actually delivers mails.
J.
Ultimately, the Millenium Dome is a spectacular monument of the doublethink of our times. [Agree] [Disagree] http://www.slowlydownward.com/NODATA/data_enter2.html
participants (2)
-
Jochen Schulz
-
Kendall Shaw