X-Git-Url: https://git.sommitrealweird.co.uk/onak.git/blobdiff_plain/68784e7ff81a477fd4a973ba302d96285def9b7d..b7a8b5277d37b289361ff0cc881632f527e4d5db:/onak-mail.pl.in?ds=sidebyside diff --git a/onak-mail.pl.in b/onak-mail.pl.in index c635dfb..96fce71 100644 --- a/onak-mail.pl.in +++ b/onak-mail.pl.in @@ -2,8 +2,7 @@ # # onak-mail.pl - Mail processing interface for onak, an OpenPGP Keyserver. # -# Written by Jonathan McDowell -# Copyright 2002-2005 Project Purple +# Copyright 2002-2005 Jonathan McDowell # Released under the GPL. # @@ -213,11 +212,12 @@ my $tmpfile = sprintf "%s/%04d%02d%02d-%02d%02d%02d-%d.onak", $time[1], $time[0], $$; -open(MAILFILE, '>'.$tmpfile); +open(MAILFILE, '>'.$tmpfile.'.tmp'); while (<>) { print MAILFILE $_; } close(MAILFILE); +rename $tmpfile.".tmp", $tmpfile; # # Lock here to ensure that only one copy of us is processing the incoming