Hi All,

I'm using postfix as an MX server which delivers email to the final recipient 
using virtual aliases. The version number according to rpm is 
postfix-2.3.3-2.1.el5_2, that is the version which is supplied in the main 
CentOS5 yum repositories. This is working perfectly except for one problem. 
Occasionally postfix will reject an email with the following error:

Feb 12 00:41:24 mail1 postfix/smtpd[24782]: NOQUEUE: reject: RCPT from 
unknown[111.111.111.111]: 550 5.1.1 <recipi...@example.com>: Recipient address 
rejected: User unknown in virtual alias table; from=<sen...@example.net> to=< 
recipi...@example.com > proto=SMTP helo=<example.org>

This is a very intermittent and short lived error. Emails to 
recipi...@example.com were working before the error and start working again a 
few seconds after it.

Based on my debugging it seems that this error is related to me running postmap 
to rebuild the virtual_alias table This is despite the fact that the 
recipi...@example.com address is correctly configured in both the old and new 
virtual_aliases. Here a log of what was happening at the same time as the above 
error:

2010-02-12 00:40:39,345 - 24597 - DEBUG - Writing virtual_aliases and 
virtual_domains
2010-02-12 00:41:20,496 - 24597 - DEBUG - Done writing virtual_aliases and 
virtual_domains.
2010-02-12 00:41:20,506 - 24597 - DEBUG - Running postmap virtual_domains.
2010-02-12 00:41:23,555 - 24597 - DEBUG - Done running postmap virtual_domains.
2010-02-12 00:41:23,556 - 24597 - DEBUG - Running postmap virtual_aliases.
2010-02-12 00:41:24,107 - 24597 - DEBUG - Done running postmap virtual_aliases.

Maillog doesn't have millisecond precision so I can't see exactly when the 
"User unknown in virtual alias table" error was logged but it happens either 
while "postmap virtual_aliases" is running or very shortly (within a second) 
afterwards. The same pattern repeats itself in other cases of the same error. 
The error always seem to happen within a second or so of "postmap 
virtual_aliases" finishing.

 So my questions are:

1. Does my analysis seem correct?
2. Is this a known problem? Are there any known race conditions in reloading 
the virtual aliases config by running "postmap virtual_aliases"
3. Is there anyway I can fix or work around this problem? Would upgrading help?
4. If I switched to using a SQL or LDAP backend for the table lookups would 
this problem go away?

Thanks in advance,

- Richard

Reply via email to