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/

  • Simon, is the qmail server on the same server as the web site? Or does it resides on a different host? – Rilindo Nov 16 '11 at 15:47
  • The qmail server is on the same server as the website, yes :) – Simon Justesen Nov 16 '11 at 15:53

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:

  • Hard errors will be thrown away. Give it up - the message is gone.
  • Soft errors may still be around if qmail hasn't reached its retry timeout limit.
    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.

  • Ok, thanks for the explanation - I'll look in the queue, and then see what happens :) – Simon Justesen Nov 16 '11 at 16:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.