X-Git-Url: http://the.earth.li/gitweb/?a=blobdiff_plain;f=onak-mail.pl.in;h=96fce71008e10bf178d5e5d7ac67f34e80414b6e;hb=fe4482ac9d5350ad0803073781a6244f5cb6aa5c;hp=5c1ce53f603b46fa0fb052881083f8cdd7e45630;hpb=4845f6a8b29e77c5d829f9aa49048fd4b2a87e41;p=onak.git diff --git a/onak-mail.pl.in b/onak-mail.pl.in index 5c1ce53..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 @@ -257,7 +257,7 @@ while ($file = readdir(MAILDIR)) { push @body, $_; } } - if (! defined($replyto)) { + if ($replyto eq '') { $replyto = $from; } close(FILE);