[Dovecot] Orientation and configuration help
This sounds to me like a "RTFM" question, but I've read the Wiki, and looked through the m.l. archives as far back as July... I still don't have a clear answer, so I'm posting here :/
I'm currently using mutt as my mail client. It runs on the same host that runs the sendmail MTA for my domain. So sendmail "delivers" my mail to /var/mail/<username>, and I read it from that location w/ mutt, transferring the "new" mail to a folder in my home directory if I want to save it (/home/<username>/Mail/<foldername>).
This arrangement has been convenient, useful and reasonably secure (I think): I can check mail from anywhere via SSH, and I don't have to worry about downloading virus-laden spam/shit to my Windoze (corporate) laptop.
Now, I want to change; I want to use dovecot to provide IMAP access to my mail. I'd like to do this in such a way that I can still access mail using mutt when I want/need to do so.
I've installed dovecot, and reviewed /etc/dovecot.conf. I think I need to do the following to get underway:
create a directory for Maildir-formatted folders: mkdir /home/<username>/Maildir
start the dovecot daemon
Is that it? Will dovecot "take over" from mutt, and put mail in my home directory? Or do I need to configure sendmail to deliver to dovecot?
Also, there are other users/email accounts on the mail server that I would like to leave "as-is". Over time, I may want to migrate them to dovecot as well, but I'm reluctant to switch everything over until I've had a chance to evaluate it.
Should I run dovecot as a "rootless" installation to get it for a single user, or should I just set my single UID in dovecot.conf?
Thanks, Jay
On Sat, 27 Nov 2004, J Moore wrote:
I've installed dovecot, and reviewed /etc/dovecot.conf. I think I need to do the following to get underway:
- create a directory for Maildir-formatted folders: mkdir /home/<username>/Maildir
I haven't used maildir yet, but I think dovecot makes that directory automatically when you set the mail environment in dovecot.conf.
http://www.dovecot.org/doc/mail-storages.txt
- start the dovecot daemon
Is that it? Will dovecot "take over" from mutt, and put mail in my home directory? Or do I need to configure sendmail to deliver to dovecot?
No, dovecot doesn't deliver anything. Your MTA (or LDA) configuration will determine where mail ends up. You just tell dovecot where to find the mailbox files with the default_mail_env variable (see dovecot.conf).
Also, there are other users/email accounts on the mail server that I would like to leave "as-is". Over time, I may want to migrate them to dovecot as well, but I'm reluctant to switch everything over until I've had a chance to evaluate it.
Just don't log in with IMAP. Dovecot has nothing to do with where your MTA saves arriving emails, so it doesn't matter to people who don't use IMAP.
You could have a separate passwd file, if you only want access for a few users. And you can set a mail environment variable per user, if needed. See the wiki, Q & A.
Should I run dovecot as a "rootless" installation to get it for a single user, or should I just set my single UID in dovecot.conf?
I don't know if that would work the way you think it would. First of all, dovecot needs to be started as root to bind to port 143, obviously. I suppose after that you could run everything unprivileged with your UID, and have a imap directory root in your home directory... but that's not what you want, it's not a strict one-user dovecot instance. I don't think the code has been written with this in mind.
I suggest you use a normal imap setup and use a different passwd file if necessary. From there on, you have full control over who can use imap, and you can pick a different password for imap as for your system account. It's also easier to allow other users imap access later on.
On Sun, Nov 28, 2004 at 04:08:51AM +0100, the unit calling itself Wouter Van Hemel wrote:
I've installed dovecot, and reviewed /etc/dovecot.conf. I think I need to do the following to get underway:
- create a directory for Maildir-formatted folders: mkdir /home/<username>/Maildir
I haven't used maildir yet, but I think dovecot makes that directory automatically when you set the mail environment in dovecot.conf.
http://www.dovecot.org/doc/mail-storages.txt
- start the dovecot daemon
Is that it? Will dovecot "take over" from mutt, and put mail in my home directory? Or do I need to configure sendmail to deliver to dovecot?
No, dovecot doesn't deliver anything. Your MTA (or LDA) configuration will determine where mail ends up. You just tell dovecot where to find the mailbox files with the default_mail_env variable (see dovecot.conf).
OK - I see that now. I kind of glossed over it when I read the file as it indicated that dovecot would try to detect this automatically.
When you say, "[My] MTA [] will determine where the mail ends up." I assume you mean where it delivers the mail. In my case, sendmail leaves all mail in /var/mail/<username>; I believe this is "mbox format"???
So if I understand, I need the following entry in /etc/dovecot.conf:
default_mail_env = mbox:~/mail/:INBOX=/var/mail/%u
Is that correct?
Thnx, Jay
On Sat, 27 Nov 2004, J Moore wrote:
No, dovecot doesn't deliver anything. Your MTA (or LDA) configuration will determine where mail ends up. You just tell dovecot where to find the mailbox files with the default_mail_env variable (see dovecot.conf).
OK - I see that now. I kind of glossed over it when I read the file as it indicated that dovecot would try to detect this automatically.
It will, but if you set it once, you won't have to depend on other users having a maildir directory.
When you say, "[My] MTA [] will determine where the mail ends up." I assume you mean where it delivers the mail. In my case, sendmail leaves all mail in /var/mail/<username>; I believe this is "mbox format"???
Yes.
So if I understand, I need the following entry in /etc/dovecot.conf:
default_mail_env = mbox:~/mail/:INBOX=/var/mail/%u
Is that correct?
Yes, if you want everything in mbox. I think you said you'd like to use maildir for the non-inbox folders, so you'd have to add a namespace for them.
It's explained right here:
http://wiki.dovecot.org/moin.cgi/Namespaces (1.3)
... and in the faq (wiki).
participants (2)
-
J Moore
-
Wouter Van Hemel