satishkumarp2k1 put forth on 12/28/2009 9:29 PM:

> Yes, correct. All the alias files are generated using perl scripts, which
> run periodically. The scripts actually generate temporary alias files (while
> generating the aliases) and then just use "mv" command to the actual alias
> file. Do you still think lookup might fail even in this case??

How big is the alias file and how busy is this server?  If the answers are big
and busy, then the chances of querying while the file is locked for write access
are higher.  Check your logs and see if this is the case.  Index the script run
time stamp to the error time stamp.  If the times match, you've probably found
the cause.

A seriously ugly hack to get around this would be to stop postfix at the top of
your script and start postfix at the end of the script after the "mv", inserting
a few waits after the "mv" to make sure it completes before postfix starts
again.  Like I said, this is a very ugly solution and wrought with other
potential problems, but it should solve this immediate issue.

I'm guessing your best option moving forward would be to switch to a database
driven alias setup with something like mysql or postgresql.  That would pretty
much eliminate the possibility of the scenario you're currently running into.

--
Stan

Reply via email to