[Dovecot] Intermittent "cannot update mailbox" problems w/ postfix & dovecot
I hate asking questions on mailing lists, but I've exhausted my googling and FAQ trawling skills. If I've missed the pertinent doc, please tell me where to RTFM.
Environment: I'm running postfix 2.3.2 on a Solaris 10 server. Mail goes into standard mbox format in /var/mail. Users can access their mail via shell (pine, mutt), POP3 or IMAP, and the pop3/imap server is dovecot-1.0.rc15.
Problem: For a few users, mail occasionally fails to deliver. The mail is accepted by smtpd, passes cleanup and qmgr without incident. When it gets to local delivery, though, local complains that "cannot open file: Permission denied". A sample log entry (slightly sanitized):
Dec 7 09:42:05 solaris-host local[18332]: [ID 197553 mail.info] D35C3445C: to=bubba@solaris-host.sample.com, relay=local, delay=0.17, delays=0.09/0/0/0.08, dsn=5.2.0, status=bounced (cannot update mailbox /var/mail/bubba for user bubba. cannot open file: Permission denied) Dec 7 10:52:26 solaris-host local[20775]: [ID 197553 mail.info] 670C9445D: to=jack@solaris-host.sample.com, relay=local, delay=15, delays=8.9/0/0/6.5, dsn=5.2.0, status=bounced (cannot update mailbox /var/mail/jack for user jack. cannot open file: Permission denied)
Does anyone have any advice on how I might get better details about why postfix is having trouble accessing the file? Has anyone run into this before? My initial suspicion is a lock file from the users' POP3 connections...
Thanks in advance for any help.
-John
On 8.12.2006, at 23.30, John Reddy wrote:
Dec 7 09:42:05 solaris-host local[18332]: [ID 197553 mail.info] D35C3445C: to=bubba@solaris-host.sample.com, relay=local, delay=0.17, delays=0.09/0/0/0.08, dsn=5.2.0, status=bounced (cannot update mailbox /var/mail/bubba for user bubba. cannot open file: Permission denied)
I'd guess you're solved this already somehow, but to me it looks like
a Postfix configuration problem. Maybe you've configured Postfix to
use different UID for a user than for Dovecot.
I never did locate the root cause of the problem I was experiencing. The problem seems to have been fixed by switching to the Dovecot LDA (deliver) by putting in the /etc/postfix/main.cf: mailbox_command = /usr/local/libexec/dovecot/deliver -c /usr/local/etc/dovecot.conf -f "$SENDER"
I brought this up on the postfix mailing list as well. According to Wietse Venema:
We're looking at this code fragment:
/* * Open an existing file. */ if ((fp = vstream_fopen(path, flags & ~(O_CREAT | O_EXCL), 0)) == 0) { saved_errno = errno; vstring_sprintf(why, "cannot open file: %m"); errno = saved_errno; return (0); }
Since the file already exists, Postfix attempts to open it with the recipient's uid/gid privileges.
...
Does anyone have any advice on how I might get better details about why postfix is having trouble accessing the file? "Permission denied" is what the kernel says in response to an open(2) or write(2) request. Postfix just delivers the bad news.
Wietse is the one who suggested switching to the Dovecot LDA, and it does seem to be working out well.
-John
On 12/22/06, Timo Sirainen tss@iki.fi wrote:
On 8.12.2006, at 23.30, John Reddy wrote:
Dec 7 09:42:05 solaris-host local[18332]: [ID 197553 mail.info] D35C3445C: to=bubba@solaris-host.sample.com, relay=local, delay=0.17, delays=0.09/0/0/0.08, dsn=5.2.0, status=bounced (cannot update mailbox /var/mail/bubba for user bubba. cannot open file: Permission denied)
I'd guess you're solved this already somehow, but to me it looks like a Postfix configuration problem. Maybe you've configured Postfix to use different UID for a user than for Dovecot.
participants (2)
-
John Reddy
-
Timo Sirainen