Hi,

Consider the following entries in an aliases file:

testlist:       :include:/etc/postfix/testlist
owner-testlist: user1

content of /etc/postfix/testlist:

user1
user2
user3

When we simulate a locked mailbox by creating /var/spool/mail/user2.lock and send a mail to the testlist, the following line is added to the mail log:

May 11 14:03:55 lucifer postfix/cleanup[8847]: 6260614005B: message-id=<20100511120202.12562140...@lucifer.esat.kuleuven.be> May 11 14:03:55 lucifer postfix/local[8848]: 12562140095: to=<testl...@esat.kuleuven.be>, orig_to=<testlist>, relay=local, delay=113, delays=113/0/0/0.04, dsn=2.0.0, status=sent (forwarded as 6260614005B) May 11 14:03:55 lucifer postfix/qmgr[8594]: 6260614005B: from=<owner-testl...@esat.kuleuven.be>, size=604, nrcpt=1 (queue active)
May 11 14:03:55 lucifer postfix/qmgr[8594]: 12562140095: removed

The mail gets forwarded and then sent as owner-testlist.

user1 receives the mail and then the mail goes to the deferred queue because user2's mailbox is unavailable. Even when the mail server retries after a few minutes, the mail is only retried to user2 (not user1). This is the expected behaviour.


Now, when I put the following in the aliases file:

member1:  user1
member2:  user2
member3:  user3
testlist:       :include:/etc/postfix/testlist
owner-testlist: user1

and in /etc/postfix/testlist:

member1
member2
member3

I touch /var/spool/mail/user2.lock to simulate a locked mailbox.

When I now send a mail to testlist, the mail is not forwarded and resent as owner-testlist. The mail is sent to user1 and then deferred. With every retry of the mail, the mail gets sent again to user1 and then deferred. This happens until user2.lock is removed and the mail is once again sent to all addresses on the list.

Is this normal? How can I make sure postfix also uses owner-testlist so messages are not delivered multiple times when one of the mailboxes is currently unavailable.

May 11 14:04:42 lucifer postfix/cleanup[8847]: D916B140095: message-id=<20100511120442.d916b140...@lucifer.esat.kuleuven.be> May 11 14:04:42 lucifer postfix/qmgr[8594]: D916B140095: from=<r...@esat.kuleuven.be>, size=457, nrcpt=1 (queue active) May 11 14:04:42 lucifer postfix/local[8848]: D916B140095: to=<us...@esat.kuleuven.be>, relay=local, delay=0.04, delays=0.03/0/0/0.02, dsn=2.0.0, status=sent (delivered to mailbox) May 11 14:05:01 lucifer postfix/local[8848]: D916B140095: to=<senti...@esat.kuleuven.be>, relay=local, delay=19, delays=0.03/0/0/19, dsn=4.2.0, status=deferred (cannot update mailbox /var/mail/user2 for user user2. unable to create lock file /var/mail/user2.lock: File exists) May 11 14:05:14 lucifer postfix/qmgr[8594]: D916B140095: from=<r...@esat.kuleuven.be>, size=457, nrcpt=1 (queue active) May 11 14:05:14 lucifer postfix/local[8751]: D916B140095: to=<us...@esat.kuleuven.be>, relay=local, delay=32, delays=32/0/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox) May 11 14:05:34 lucifer postfix/local[8751]: D916B140095: to=<us...@esat.kuleuven.be>, relay=local, delay=51, delays=32/0/0/20, dsn=4.2.0, status=deferred (cannot update mailbox /var/mail/user2 for user user2. unable to create lock file /var/mail/user2.lock: File exists)

Regards,

--
Rik

Reply via email to