I've been asked to retrieve a specific email for a user (true James Bond-style..). It has been sent through a mail form on our website, but the user never got an email confirmation receipt because he/she has been inputting an incorrect email address.
Now my question is: Since it has been sent with PHP and the mail server (QMail) responded with an error, I should be able to find it in the bounce-folder of the QMail installation directory, right? I can't remember exactly how long we're retaining bounce mails (QMail default setting), but the message is just a few days old. Does QMail save a copy of sent emails somewhere?
Been looking through a great deal of QMail tutorials already, but haven't found a definitive answer. (Life with QMail is good reading though -> http://www.lifewithqmail.org/
Best Answer
You can configure qmail to do this which some hackery (one example here), but by default qmail is just a plain, boring, non-archiving MTA: It takes mail and either (a) delivers it to a local user, or (b) sends it on to a remote system for delivery.
In a vanilla qmail setup if the mail server responded with an error you have two possibilities:
Look in the qmail queue directory (whatever it is on your system) and see if the message is there.
My advice: Tell the user the mail is not recoverable. Don't wade into the swamp of email, for there be gators.