* Victor Duchovni <victor.ducho...@morganstanley.com>: > Note, if rsync propagates file permissions before it copies file contents, > an incomplete queue file could be picked up by the queue manager before > it is completely written. So it is safer to rsync outside "incoming" > (in the same file-system) and then rename into "incoming".
Good point. rsycn it some place else, the mv it atomically. > The above said, rsync also uses temporary file-names while creating files, Yes. > and uses rename to finalize the file copy only once the contents are > all there, so Wietse's suggestion will likely work, provided rsync's > temp file names don't look like Postfix queue-ids (the queue manager > incoming directory scans skip filenames that don't look like queue-ids). > > The code in question is src/global/mail_queue.c:mail_queue_id_ok() > which skips any filenames that are not alphanumeric (with '_'). > > So provided rsync's temp names include some other chars (I think > it uses ".tempname" to keep temp files "out of view" while they > are being created) there is no need for the intermediate copy... -- Ralf Hildebrandt Geschäftsbereich IT | Abteilung Netzwerk Charité - Universitätsmedizin Berlin Campus Benjamin Franklin Hindenburgdamm 30 | D-12203 Berlin Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962 ralf.hildebra...@charite.de | http://www.charite.de