[Dovecot] New admin, not much success
Hello,
I'm trying to set up something fairly simple (famous last words) using Dovecot.
I have a very small setup (just a dozen users)
I'm using qmail as my MTA.
I'm running FreeBSD 8.0
I've got qmail delivering into a file named 'Mailbox' in user's home directories.
I prefer not to use Maildir delivery because from a shell its a PITA to get a Maildir aware MUA (I use /bin/mail when I'm attached locally)
What I'm trying to do is configure an SSL only POP3 server so that folks can retrieve their email on the road without divulging their passwords.
My backup scenario is to put VPN software on my user's clients and having them VPN into the network and then do un-encrypted POP3 from the VPN. I prefer not to do this as it means maintaining the VPN client as well.
Users have a mix of MacOS, Windows, and Linux.
So, I can't get dovecot to work at all. In an unusual turn about I got the SSL stuff working but not the mailbox handling. I'm running 2.0beta6
Output from dovecot -n
# 2.0.beta6: /usr/local/etc/dovecot/dovecot.conf # OS: FreeBSD 8.0-RELEASE-p2 i386 nfs auth_debug = yes auth_verbose = yes default_internal_user = nobody default_login_user = nobody listen = * mail_full_filesystem_access = yes mail_location = mbox:/home/%u/:INBOX=/home/%u/ passdb { driver = pam } protocols = pop3 service pop3-login { inet_listener pop3s { port = 995 ssl = yes } } service pop3 { process_limit = 1024 } ssl_cert =
A typical failure looks like this in maillog: Jun 15 22:19:20 eeebox dovecot: master: Dovecot v2.0.beta6 starting up Jun 15 22:20:29 eeebox dovecot: pop3-login: Login: user=<cmcmanis>, method=PLAIN, rip=66.125.189.27, lip=66.125.189.30, mpid=78871, TLS Jun 15 22:20:29 eeebox dovecot: pop3(cmcmanis): Error: Opening INBOX failed: Mailbox isn't selectable Jun 15 22:20:29 eeebox dovecot: pop3(cmcmanis): Error: Couldn't open INBOX: Mailbox isn't selectable Jun 15 22:20:29 eeebox dovecot: pop3(cmcmanis): Couldn't open INBOX top=0/0, retr=0/0, del=0/0, size=0
Home directories are mounted via NFS and root doesn't have access, but if dovecot accesses the Mailbox as the user it should work fine.
I'm about ready to start hacking in additional logging into mail-storage.c to figure out what "mailbox isn't selectable" means.
--Chuck
On 06/16/2010 07:26 AM Chuck McManis wrote:
… I've got qmail delivering into a file named 'Mailbox' in user's home directories. ^^^^^^^ … So, I can't get dovecot to work at all. In an unusual turn about I got the SSL stuff working but not the mailbox handling. I'm running 2.0beta6
Output from dovecot -n
# 2.0.beta6: /usr/local/etc/dovecot/dovecot.conf # OS: FreeBSD 8.0-RELEASE-p2 i386 nfs auth_debug = yes auth_verbose = yes default_internal_user = nobody default_login_user = nobody listen = * mail_full_filesystem_access = yes mail_location = mbox:/home/%u/:INBOX=/home/%u/ ^^^^^ ^^^^^^? passdb { driver = pam } protocols = pop3 service pop3-login { inet_listener pop3s { port = 995 ssl = yes } } service pop3 { process_limit = 1024 } ssl_cert =
A typical failure looks like this in maillog: Jun 15 22:19:20 eeebox dovecot: master: Dovecot v2.0.beta6 starting up Jun 15 22:20:29 eeebox dovecot: pop3-login: Login: user=<cmcmanis>, method=PLAIN, rip=66.125.189.27, lip=66.125.189.30, mpid=78871, TLS Jun 15 22:20:29 eeebox dovecot: pop3(cmcmanis): Error: Opening INBOX failed: Mailbox isn't selectable Jun 15 22:20:29 eeebox dovecot: pop3(cmcmanis): Error: Couldn't open INBOX: Mailbox isn't selectable Jun 15 22:20:29 eeebox dovecot: pop3(cmcmanis): Couldn't open INBOX top=0/0, retr=0/0, del=0/0, size=0
Home directories are mounted via NFS and root doesn't have access, but if dovecot accesses the Mailbox as the user it should work fine.
I'm about ready to start hacking in additional logging into mail-storage.c to figure out what "mailbox isn't selectable" means.
what happens when you set: mail_location = mbox:/home/%u/Mailbox:INBOX=/home/%u/Mailbox or: mail_location = mbox:~/Mailbox:INBOX=~/Mailbox
Dovecot should have logged, where it is looking for mails. If you can't find such information in your logs, set also mail_debug = yes in your conf.d/10-logging.conf
Regards, Pascal
The trapper recommends today: deadbeef.1016715@localdomain.org
On Wed, Jun 16, 2010 at 6:35 AM, Pascal Volk < user+dovecot@localhost.localdomain.orguser%2Bdovecot@localhost.localdomain.org
wrote:
… I've got qmail delivering into a file named 'Mailbox' in user's home directories. ^^^^^^^ … So, I can't get dovecot to work at all. In an unusual turn about I got
On 06/16/2010 07:26 AM Chuck McManis wrote: the
SSL stuff working but not the mailbox handling. I'm running 2.0beta6
Output from dovecot -n
# 2.0.beta6: /usr/local/etc/dovecot/dovecot.conf # OS: FreeBSD 8.0-RELEASE-p2 i386 nfs auth_debug = yes auth_verbose = yes default_internal_user = nobody default_login_user = nobody listen = * mail_full_filesystem_access = yes mail_location = mbox:/home/%u/:INBOX=/home/%u/ ^^^^^ ^^^^^^? passdb { driver = pam } protocols = pop3 service pop3-login { inet_listener pop3s { port = 995 ssl = yes } } service pop3 { process_limit = 1024 } ssl_cert =
A typical failure looks like this in maillog: Jun 15 22:19:20 eeebox dovecot: master: Dovecot v2.0.beta6 starting up Jun 15 22:20:29 eeebox dovecot: pop3-login: Login: user=<cmcmanis>, method=PLAIN, rip=66.125.189.27, lip=66.125.189.30, mpid=78871, TLS Jun 15 22:20:29 eeebox dovecot: pop3(cmcmanis): Error: Opening INBOX failed: Mailbox isn't selectable Jun 15 22:20:29 eeebox dovecot: pop3(cmcmanis): Error: Couldn't open INBOX: Mailbox isn't selectable Jun 15 22:20:29 eeebox dovecot: pop3(cmcmanis): Couldn't open INBOX top=0/0, retr=0/0, del=0/0, size=0
Home directories are mounted via NFS and root doesn't have access, but if dovecot accesses the Mailbox as the user it should work fine.
I'm about ready to start hacking in additional logging into mail-storage.c to figure out what "mailbox isn't selectable" means.
what happens when you set: mail_location = mbox:/home/%u/Mailbox:INBOX=/home/%u/Mailbox or: mail_location = mbox:~/Mailbox:INBOX=~/Mailbox
If I set the mailbox location to point to the file, I get another error about how the root directory can't be a file. The exact error is: Jun 16 08:21:57 eeebox dovecot: master: Dovecot v2.0.beta6 starting up Jun 16 08:22:07 eeebox dovecot: pop3-login: Login: user=<cmcmanis>, method=PLAIN, rip=66.125.189.27, lip=66.125.189.30, mpid=80225, TLS Jun 16 08:22:07 eeebox dovecot: pop3(cmcmanis): Error: user cmcmanis: Initialization failed: Initializing mail storage from mail_location setting failed: mbox: mbox root directory can't be a file: /home/cmcmanis/Mailbox ( http://wiki.dovecot.org/MailLocation/Mbox) Jun 16 08:22:07 eeebox dovecot: pop3(cmcmanis): Error: Invalid user settings. Refer to server log for more information.
Now it strikes me that this message indicates that Dovecot is confused about how mail is delivered on my system and is looking for a Maildir implementation when I"m using single files. And yet I can't find a variable in any of the various configuration files which can set for sure the mbox "mode".
Dovecot should have logged, where it is looking for mails. If you can't
find such information in your logs, set also mail_debug = yes in your conf.d/10-logging.conf
I have logging-conf set to both
auth_debug = yes auth_verbose = yes
But it doesn't say anything else than what you see above. --Chuck
Regards, Pascal
The trapper recommends today: deadbeef.1016715@localdomain.org
On Wed, 2010-06-16 at 08:28 -0700, Chuck McManis wrote:
Jun 16 08:22:07 eeebox dovecot: pop3(cmcmanis): Error: user cmcmanis: Initialization failed: Initializing mail storage from mail_location setting failed: mbox: mbox root directory can't be a file: /home/cmcmanis/Mailbox ( http://wiki.dovecot.org/MailLocation/Mbox)
..
Now it strikes me that this message indicates that Dovecot is confused about how mail is delivered on my system and is looking for a Maildir implementation when I"m using single files.
No, it's looking for a directory containing mbox files. See the wiki URL and "Only /var/mail/ mboxes" section in it.
Timo Sirainen wrote:
On Wed, 2010-06-16 at 08:28 -0700, Chuck McManis wrote:
Jun 16 08:22:07 eeebox dovecot: pop3(cmcmanis): Error: user cmcmanis: Initialization failed: Initializing mail storage from mail_location setting failed: mbox: mbox root directory can't be a file: /home/cmcmanis/Mailbox ( http://wiki.dovecot.org/MailLocation/Mbox)
..
Now it strikes me that this message indicates that Dovecot is confused about how mail is delivered on my system and is looking for a Maildir implementation when I"m using single files.
No, it's looking for a directory containing mbox files. See the wiki URL and "Only /var/mail/ mboxes" section in it.
One wonders if Chuck's stated requirement may be reasonably served by something like this:
mail_location = mbox:~/mail:INBOX=~/Mailbox
and create a directory "mail" in each user's home directory.
This should then make Dovecot consider each user's INBOX to be an mbox-format file at "~/Mailbox", and also allows Dovecot to keep indexes in the directory "~/mail", thereby enabling Chuck's users to take advantage of Dovecot's indexing functionality.
Bill
On Wed, Jun 16, 2010 at 8:44 AM, William Blunn
wrote:
Timo Sirainen wrote:
On Wed, 2010-06-16 at 08:28 -0700, Chuck McManis wrote:
Jun 16 08:22:07 eeebox dovecot: pop3(cmcmanis): Error: user cmcmanis: Initialization failed: Initializing mail storage from mail_location setting failed: mbox: mbox root directory can't be a file: /home/cmcmanis/Mailbox ( http://wiki.dovecot.org/MailLocation/Mbox)
..
Now it strikes me that this message indicates that Dovecot is confused about how mail is delivered on my system and is looking for a Maildir implementation when I"m using single files.
No, it's looking for a directory containing mbox files. See the wiki URL and "Only /var/mail/ mboxes" section in it.
One wonders if Chuck's stated requirement may be reasonably served by something like this:
mail_location = mbox:~/mail:INBOX=~/Mailbox
and create a directory "mail" in each user's home directory.
This should then make Dovecot consider each user's INBOX to be an mbox-format file at "~/Mailbox", and also allows Dovecot to keep indexes in the directory "~/mail", thereby enabling Chuck's users to take advantage of Dovecot's indexing functionality.
Fascinating, that gets it further, it creates a bunch of stuff in mail/.imap (which is confusing because I really really don't want IMAP and have removed IMAP from the protocols served and the ports listened on etc) Then it complains that it can't do an fcntl on Mailbox. It said 'operation not supported.'
--Chuck
Bill
Chuck McManis wrote:
On Wed, Jun 16, 2010 at 8:44 AM, William Blunn
bill%2Bdovecot@blunn.org wrote:
Timo Sirainen wrote:
On Wed, 2010-06-16 at 08:28 -0700, Chuck McManis wrote:
Jun 16 08:22:07 eeebox dovecot: pop3(cmcmanis): Error: user cmcmanis: Initialization failed: Initializing mail storage from mail_location setting failed: mbox: mbox root directory can't be a file: /home/cmcmanis/Mailbox ( http://wiki.dovecot.org/MailLocation/Mbox)
..
Now it strikes me that this message indicates that Dovecot is confused about how mail is delivered on my system and is looking for a Maildir implementation when I"m using single files.
No, it's looking for a directory containing mbox files. See the wiki URL and "Only /var/mail/ mboxes" section in it.
One wonders if Chuck's stated requirement may be reasonably served by something like this:
mail_location = mbox:~/mail:INBOX=~/Mailbox
and create a directory "mail" in each user's home directory.
This should then make Dovecot consider each user's INBOX to be an mbox-format file at "~/Mailbox", and also allows Dovecot to keep indexes in the directory "~/mail", thereby enabling Chuck's users to take advantage of Dovecot's indexing functionality.
Fascinating, that gets it further, it creates a bunch of stuff in mail/.imap (which is confusing because I really really don't want IMAP and have removed IMAP from the protocols served and the ports listened on etc) Then it complains that it can't do an fcntl on Mailbox. It said 'operation not supported.'
Strange. Perhaps there is a problem locking the mbox file using fcntl. Though I would be surprised if this were the case on a modern filesystem on a modern unix-like OS.
If you can't use fcntl then you may be limited to using dotlocks (see http://wiki.dovecot.org/MboxLocking), though you would also need to determine with certainty that your MTA was using a compatible locking strategy --- don't skip this step unless you want to be spending 105% of your time firefighting weekly trouble reports of users complaining that their mailboxes are scrambled.
Though, if getting reliable locking on mbox is proving expensive, you might find your overall cheapest solution is to switch to Maildir. With mbox you have to be careful and work hard to make sure your various software components cooperate on mailbox locking and even silly things like mbox format variants (does it escape "From" or not?), and it is almost impossible to be certain that both the MTA and POP3 system are going to cooperate perfectly and not scramble mailboxes occasionally. With Maildir, everything works out-of-the-box with no configuration without breaking a sweat; mailbox corruption is simply designed-out.
Bill
On Wed, Jun 16, 2010 at 9:19 AM, William Blunn
wrote:
[snip]... . With Maildir, everything works out-of-the-box with no configuration without breaking a sweat; mailbox corruption is simply designed-out.
Bill
I may end up and go back to a maildir implementation, that would at least change my problem from "POP3 server that understands SSL and mbox" to "command line MUA that understands Maildir" ;-)
--Chuck
On Wed, Jun 16, 2010 at 8:31 AM, Timo Sirainen tss@iki.fi wrote:
On Wed, 2010-06-16 at 08:28 -0700, Chuck McManis wrote:
Jun 16 08:22:07 eeebox dovecot: pop3(cmcmanis): Error: user cmcmanis: Initialization failed: Initializing mail storage from mail_location
setting
failed: mbox: mbox root directory can't be a file: /home/cmcmanis/Mailbox ( http://wiki.dovecot.org/MailLocation/Mbox) ..
Now it strikes me that this message indicates that Dovecot is confused
about
how mail is delivered on my system and is looking for a Maildir implementation when I"m using single files.
No, it's looking for a directory containing mbox files. See the wiki URL and "Only /var/mail/ mboxes" section in it.
Thanks Timo, I've read that wiki page a few times, and adding INDEX=MEMORY hasn't changed things. (random 2.0 bug report, unless you set info_log_path in conf.d/10-logging the additonal information doesn't come out)
I suspect its that I'm trying to do everything in a single file, from qmail delivering mail there, to dovecot pulling out messages for users. (I did that to manage storage controls). Reading the qmail/LDA page it seems like dovecot really wants me to have qmail deliver into an 'inbox' file and then to transfer email from that file into the local directory 'mbox' file while it works.
--Chuck
On Wed, 2010-06-16 at 08:46 -0700, Chuck McManis wrote:
(random 2.0 bug report, unless you set info_log_path in conf.d/10-logging the additonal information doesn't come out)
With or without setting log_path? If you didn't set log_path, it goes to syslog and maybe to a different file (or maybe syslog loses it completely). "doveadm log find" might find where it goes.
On Wed, Jun 16, 2010 at 8:53 AM, Timo Sirainen tss@iki.fi wrote:
On Wed, 2010-06-16 at 08:46 -0700, Chuck McManis wrote:
(random 2.0 bug report, unless you set info_log_path in conf.d/10-logging the additonal information doesn't come out)
With or without setting log_path? If you didn't set log_path, it goes to syslog and maybe to a different file (or maybe syslog loses it completely). "doveadm log find" might find where it goes.
Without setting log_path. Its possible that my syslog setup is just tossing info messages sent to the MAIL facility, I'll check that a bit later. The debug stuff seems to land in /var/log/debug.log by default.
On 06/16/2010 05:28 PM Chuck McManis wrote:
On Wed, Jun 16, 2010 at 6:35 AM, Pascal Volk <
what happens when you set: mail_location = mbox:/home/%u/Mailbox:INBOX=/home/%u/Mailbox or: mail_location = mbox:~/Mailbox:INBOX=~/Mailbox
If I set the mailbox location to point to the file, I get another error about how the root directory can't be a file. The exact error is: Jun 16 08:21:57 eeebox dovecot: master: Dovecot v2.0.beta6 starting up Jun 16 08:22:07 eeebox dovecot: pop3-login: Login: user=<cmcmanis>, method=PLAIN, rip=66.125.189.27, lip=66.125.189.30, mpid=80225, TLS Jun 16 08:22:07 eeebox dovecot: pop3(cmcmanis): Error: user cmcmanis: Initialization failed: Initializing mail storage from mail_location setting failed: mbox: mbox root directory can't be a file: /home/cmcmanis/Mailbox ( http://wiki.dovecot.org/MailLocation/Mbox) Jun 16 08:22:07 eeebox dovecot: pop3(cmcmanis): Error: Invalid user settings. Refer to server log for more information.
Oops, sorry, my bad. I'm sure I meant: mail_location = mbox:~/:INBOX=~/Mailbox
But the configuration suggested by William Blunn look OK.
And the .imap folder is only created when you are using the (obsolete) mdbox mailbox format. It has nothing to with the used protocols.
Regards, Pascal
The trapper recommends today: f007ba11.1016719@localdomain.org
On 06/16/2010 07:44 PM Pascal Volk wrote:
And the .imap folder is only created when you are using the (obsolete) mdbox mailbox format. It has nothing to with the used protocols.
Oh, what's goin on with me? mdbox would be very fine. But mbox could be the reason for many trouble.
Regards, Pascal
The trapper recommends today: f007ba11.1016719@localdomain.org
participants (4)
-
Chuck McManis
-
Pascal Volk
-
Timo Sirainen
-
William Blunn