[Dovecot] dovecot and fc2

Brian Candler B.Candler at pobox.com
Mon Jun 7 14:25:23 EEST 2004


On Sun, Jun 06, 2004 at 11:33:46PM +0200, Javi Pardo (DAKOTA) wrote:
> I am migrate FC1 to FC2, in FC1 i use ipop3d, but in the migration to FC2 this programa is obsolete, i decide migrate to dovecot, but i have problems with the old mail
> i have the mail stored into /var/spool/mail/USER 
> and this error appears with examine the mail with Oulook Express:
> Jun  6 23:24:10 dakota pop3(dakota): open(/var/spool/mail/dakota.lock) failed: Permission denied
> Jun  6 23:24:10 dakota pop3(dakota): file_lock_dotlock() failed with mbox file /var/spool/mail/dakota: Permission denied

Looks to me like Dovecot is trying to create dotlock files within
/var/spool/mail, but doesn't have sufficient permissions to do so.

There are usually two solutions to this:

(1) chmod 1777 /var/spool/mail

This allows any user to create files in /var/spool/mail, but the 'sticky'
bit prevents a user from deleting another user's files.

(2) give the imap/pop3 server sufficient rights to create files under
/var/spool/mail. Typically this means it running as group "mail", and
/var/spool/mail will be mode 775 (rwxrwxr-x) with group owner "mail"

(3) don't use dotlocks at all; use flock or fcntl locking.

I'm only here to learn a bit more about Dovecot and am not actually using it
at the moment, so I don't know how you configure Dovecot for case (2).

> with pine not have problem to read the mail

Perhaps pine is running setgid mail? Try "ls -l /usr/bin/pine".
If so, effectively pine is using solution (2) from above. Otherwise, perhaps
pine is using solution (3).

It's very important that all your applications on the system use the same
locking method, otherwise data corruption will occur when the same mailbox
is accessed twice concurrently.

Personally I would migrate away from mbox to Maildir format; that gets rid
of locking issues altogether.

Regards,

Brian.



More information about the dovecot mailing list