Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to change the sender address of mails that are already queued?

The relay-server we've used so far has silently changed its policy a few days ago and rejects now mails without a verified sender address. We've now adapted sendmail's settings but a few mails with the old sender address are already stuck in the queue (Sender address rejected: unverified address). Can I change their sender address?

share|improve this question
up vote 7 down vote accepted

Look in /var/spool/mqueue. There are two files for each mail. dfblah for the email text, qfblah for the headers. You can ignore the df files and concentrate of the qf files. Depending on whether you need to modify just the envelope-from or the header-from as well, you might need to modify one or two locations.

Save a copy before you start modifying these files. Kill sendmail too to avoid lock/race problems.

share|improve this answer
Thanks! Worked and mails are successfully sent. – z00bs May 20 '11 at 8:24

Sendmail stores queued messages as text files, so this should be possible; howewer, the format of the queue files is somewhat complex (as everything in Sendmail...), so modifying them by hand is probably not so trivial.

Lots of info here:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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