OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: Mail bounced when postmap is being done

From: Bill Cole (postfixlists-070913billmail.scconsult.com)
Date: Thu Oct 11 2007 - 08:44:25 CDT


At 6:49 PM +0530 10/11/07, ram wrote:
>On Thu, 2007-10-11 at 08:21 -0400, Victor Duchovni wrote:
>> On Thu, Oct 11, 2007 at 04:26:15PM +0530, ram wrote:
>>
>> > On Thu, 2007-10-11 at 12:46 +0200, Ralf Hildebrandt wrote:
>> > > * ram <ramnetcore.co.in>:
>> > > > I have a postfix 2.3.3-2 server that accepts mails for all
>>valid users
>> > > > in virtual_alias table and any user not in this table is bounced
>> > > >
>> > > > My virtual_alias file has grown to 65k lines
>> > > >
>> > > > The issue is I have seen many times as the postmap is being
>>done a mail
>> > > > arriving at the same instant gets bounced with user unknown
>> > >
>> > > postmap virtual_alias.new
>> > > mv virtual_alias.new.db virtual_alias.db
>> > >
>> >
>> > I tried doing a cp ( not a mv ) but even that would not help
>> >
>>
>> What on earth made you think of that. *Even* that ensures that you
>> have problems, while "mv" is safe.
>>
>
>Ok sorry, I am doing "mv" now. I am watching the logs for legitimate
>ids bouncing thru a little perl script, havent got any till now.
>( fingers crossed)
>
>But Just for my information , how does "mv" work , while "cp" fails

When the source and target names are on the same filesystem, 'mv' is
done by changing the name of the file, while 'cp' reads all of the
file's contents from the source and writes it to a new file with the
target name. If a file with the target name already exists, using
'mv' means that any other program using the target name will always
see a complete file.

--
Bill Cole
billscconsult.com