All SMTP implementations I know of do the following:
All received messages are recorded on disk before they are
acknowledged as received.
If the server dies for any reason, it resumes its work based
on the on-disk record.
Other messages are obviously resent by the originator.
I might be wrong, but this might even be in the SMTP spec.
-Jon