0

We've application fetching messages from mailbox inbox.

Once, application stoppped fetching, then we'd the following in maillog:

Aug 15 11:03:47 server_name postfix/virtual[16743]: 731E258003: to=<mailbox_name>, relay=virtual, delay=0.06, delays=0.04/0/0/0.02, dsn=2.0.0, status=sent (delivered to mailbo
x)
Aug 15 11:03:55 server_name postfix/pipe[3201]: 9CE9658002: to=<mailbox_name>, relay=filter, delay=0.19, delays=0.15/0/0/0.05, dsn=2.0.0, status=sent (delivered via filter ser
vice)
Aug 15 11:03:55 server_namepostfix/virtual[16743]: C6C4958003: to=<mailbox_name>, relay=virtual, delay=0.06, delays=0.05/0/0/0.01, dsn=2.0.0, status=sent (delivered to mailbo
x)
Aug 15 11:06:22 server_name postfix/pipe[6280]: 0CBA058002: to=<mailbox_name>, relay=filter, delay=0.22, delays=0.18/0/0/0.04, dsn=2.0.0, status=sent (delivered via filter ser
vice)
Aug 15 11:06:41 server_name postfix/virtual[11801]: 3CEA058003: to=<mailbox_name>, relay=virtual, delay=19, delays=0.04/0/0/19, dsn=4.2.0, status=deferred (delivery failed to
mailbox  unable to lock for exclusive access: Resource temporarily unavailable)
Aug 15 11:09:31 server_name postfix/pipe[6282]: 438CF58002: to=<mailbox_name>, relay=filter, delay=0.15, delays=0.12/0/0/0.03, dsn=2.0.0, status=sent (delivered via filter ser
vice)
Aug 15 11:09:50 server_name postfix/virtual[12526]: 62A7E58004: to=<mailbox_name>, relay=virtual, delay=19, delays=0.04/0/0/19, dsn=4.2.0, status=deferred (delivery failed to
mailbox : unable to lock for exclusive access: Resource temporarily unavailable)
Aug 15 11:13:14 server_name postfix/virtual[12526]: 3CEA058003: to=<mailbox_name>, relay=virtual, delay=412, delays=394/0/0/19, dsn=4.2.0, status=deferred (delivery failed to
mailbox : unable to lock for exclusive access: Resource temporarily unavailable)
Aug 15 11:16:16 server_name postfix/pipe[6280]: D111E58002: to=<mailbox_name>, relay=filter, delay=0.18, delays=0.14/0/0/0.04, dsn=2.0.0, status=sent (delivered via filter ser
vice)
Aug 15 11:16:16 server_name postfix/virtual[12526]: 03C0E58005: to=<mailbox_name>, relay=virtual, delay=0.06, delays=0.04/0/0/0.01, dsn=2.0.0, status=sent (delivered to mailbo
x)

then I had the following in dovecot-info:

dovecot: Aug 15 11:03:48 Info: POP3(mailbox_name): Disconnected: Logged out top=0/0, retr=2/42139, del=2/2, size=42100
dovecot: Aug 15 11:14:23 Info: POP3(mailbox_name): Disconnected for inactivity top=0/0, retr=1/29827, del=0/1, size=29809
dovecot: Aug 15 18:01:28 Info: POP3(mailbox_name): Disconnected: Logged out top=0/0, retr=96/9469449, del=96/96, size=9467620

From the above logs I understood that:

1- mailbox inbox was working good till 11:03:47 and message was fetched as per mentioned in dovecot-info @11:03:48

2-after 11:03:47, no message fetched and @11:06 inbox was locked for exclusive access

3-@11:14: application tried to connect but it was disconnected for inactivity

4-everything went fine again after restarting application service @18:01

My questions are:

-Was application unable to access due to lock ?

-Why application didn't try to access again ?

-if this is issue was for inbox locking due to more than 2 access in the same time, how to avoid such behavior ?

-can I increase postfix parameter for simultaenous access to be more than 2 ?

2 Answers 2

1

Are you using traditional the mbox format? You should consider converting all mailboxes to Maildir format to avoid such locking errors (and much better performance).

The logs for Dovecot don't seem particularly troublesome, they just indicate an user was disconnected due to inactivity, which is OK.

1
  • What's the meaning of inactivity ? Does it mean can't access due to inbox file locking ? The mentioned user is related to app which fetches messages and you can find Del=0/1 which means can't delete or fetch the exist message
    – user212051
    Aug 18, 2014 at 17:41
0

Can you use IMAP instead of POP3?

POP3 is designed for single-user use. It's from the times when you exclusively used a single computer for everything and when the mailboxes offered by ISPs were very small. Back then we did fetch all the e-mails from the server to a personal computer.

Due that most POP3 clients/servers do lock the mailbox when they are accessing it, so no other clients can access it simultaneously. If the connection is unexpectedly closed by the client, the server most likely does keep the lock around for 30 minutes or so, unless the lock gets freed (or the mail server software restarted).

So, I guess your application did disconnect unexpectedly and was unable to reconnect before the lock was released by the server.

Switch to IMAP if possible, it does not have this kind of shortcomings.

3
  • Lock released 19 mins later .. but application service didn't work again till it's restarted 8 hours later .. Also we've this work run daily but this issue happened only 1 every 6 months and it's resolved after restarting service. I knew about postfix parameter which is responsible number of simultaneous mails per second which is 2 .. and I am wondering what happened if i make it 4 .. ??
    – user212051
    Aug 18, 2014 at 12:52
  • mailbox locked only 11:06 while application service stopped logging only after 11:03:47 .. and put in mind that we've message 11:03:55 when the server was ok, mailbox was ok and not locked but application service didn't come to fitch till 11:14
    – user212051
    Aug 18, 2014 at 12:57
  • I'm pretty sure this is not about Postfix. Postfix talks SMTP and it can deliver mail simultaneously just fine. It's the POP3 side which is your problem and you should fix. Aug 19, 2014 at 5:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .