using link(2) + unlink(2) instead of rename(2) to get the message file
from tmp to new. rename(2) will clobber an existing file, which we
don't want; link(2) will not.
Strictly speaking this is an impossible scenario for mdeliver, for
which one process delivers no more than one message. It is, however,
not outside the realm of possibility that a filename identical to the
one chosen by mdeliver came into existence for some unrelated reason
(though the odds of this happening must be staggering).
Perhaps more importantly, it has been reported on the qmail list that
OpenBSD 3.2 will reuse the same PID in the same second, which would
mean this was a real problem on that system.
Whatever the case, this addresses any potential problems.