[Dovecot] popa3d migration problem

Geoffrey S. Mendelson gsm at mendelson.com
Tue Nov 1 14:34:49 EET 2005


On Tue, Nov 01, 2005 at 12:36:28PM +0100, Janusz Batko wrote:

> Nov  1 12:31:24 sneogg dovecot: pop3-login: Login: user=<test2>, 
> method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
> Nov  1 12:31:24 sneogg dovecot: pop3(test2): 
> open(/var/mail/.temp.sneogg.araneo.pl.15235.cf176acb943a102d) failed: 
> Permission denied
> Nov  1 12:31:24 sneogg dovecot: pop3(test2): file_lock_dotlock() failed 
> with mbox file /var/mail/test2: Permission denied
> Nov  1 12:31:24 sneogg dovecot: pop3(test2): Mailbox init failed top=0/0, 
> retr=0/ del=0/0, size=0

If your incoming mail directory is not /var/mail, you need to tell
dovecot where it is. (see mailenv)


That's a permissions problem with /var/mail. If you want to use "dot locking",
which is necessary if you have more than one way of accessing the incoming
mail, such as using a different pop and imap daemon, some people reading
the mail locally, or sharing the mail via NFS or SAMBA, then you need to:

The standard (and less than wonderful) way is to make /var/mail world
writeable as in:

>ls -ld /var/spool/mail
drwxrwxrwt    2 root     mail         4096 Nov  1 14:14 /var/spool/mail 

This makes the incoming mail directory owned by root, with a group of
mail and world writeable. Note that this does not let individual people
read others mail, but on a system used by many people it's dangerous.

It would be better to make the directory owned by root, with a group mail
and permissions set to 0775. This allows anyone in group mail to write
to it, without allowing a general user to do so.

Make sure that your mail delivery program will allow you to do this, some
will not and require the incoming mail directory to be world writeable.

Then make sure that you have the options set in your dovecot.conf file:

	mail_extra_groups = mail 


	lock_method = dotlock
	mbox_read_locks = dotlock
	mbox_write_locks = dotlock

	(other locking methods may be better, it depends upon what else
	access your mail directory)

Geoff.
-- 
Geoffrey S. Mendelson, Jerusalem, Israel gsm at mendelson.com  N3OWJ/4X1GM
IL Voice: (07)-7424-1667  IL Fax: 972-2-648-1443 U.S. Voice: 1-215-821-1838 
You should have boycotted Google while you could, now Google supported
BPL is in action. Time is running out on worldwide radio communication.


More information about the dovecot mailing list