Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have a Postfix server here that is servicing about 70-80 active users. We have a single alias for all users in the system that we manage manually in /etc/aliases. Occasionally, email sent to this all users alias is deferred due to a number of reasons, some examples are given below:

Jan 25 12:02:15 mailserver postfix/local[6733]: 78D4619014D: to=, relay=local, delay=1956, delays=1936/0.01/0/20, dsn=4.2.0, status=deferred (cannot update mailbox /var/spool/mail/user1 for user user1. unable to create lock file /var/spool/mail/user1.lock: File exists)

Jan 25 13:42:14 mailserver postfix/local[10757]: 78D4619014D: to=, relay=local, delay=7954, delays=7936/0/0/19, dsn=4.2.0, status=deferred (cannot update mailbox /var/spool/mail/user2 for user user2. unable to lock for exclusive access: Resource temporarily unavailable)

Once the message is deferred it's redelivered to every person the alias sends mail to, even if they've already gotten a copy. So occasionally a message will make the rounds 3 or 4 times before it finally gets to every user successfully.

Has anyone had experience with this problem and what did you do to fix it?

share|improve this question
add comment

3 Answers

you can't have parallel delivery with mbox format.

 local_destination_recipient_limit = 1   #this is default, just remove from main.cf
 local_destination_concurrency_limit = 1

If the lock problem persist, then you have filesystem error or hard drive problem.

share|improve this answer
add comment

I think you use mailbox and not Maildir for your storage. So each time postfix must write on the user's mailbox file, it locks it. If you have a lot of simultaneous locks, there is maybe some problems. Do you use a delivering program (like procmail, dovecot-lda), or postfix write directly in files ? Which time the complete delivery take to be completely done when it doesn't hang ? Could you think to go to Maildir format, which doesn't need to locks files ? Are you on a network storage like NFS/SMB ?

share|improve this answer
add comment

Sure there was a time when this was a problem. It has been more than ten years ago when I was faced with a similar problem. But this is why someone invented Maildir which does not have these problems at all.

In your case you have a delay of more than two hours for one mail. This is incredibly bad. Change your setup. Even with millions of mails per day you should only have a delay of 2 seconds. Everything else is a bad configuration.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.