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

I have a few emails in my mailq which are bounced for a good reason, the email address is wrong. I was wondering if it is possible to modify the address of the recipient on the fly. I can see the directory where the mail deferred are stored and I could probably change something there, but i am wondering if there is a proper way to do this.

Any thought?

share|improve this question
As documented, direct manipulation of queue files is not supported. – adaptr Oct 15 '12 at 15:12
@adaptr this is an answer, not a comment ;) – Thomas Berger Oct 15 '12 at 19:42
up vote 5 down vote accepted

When you requeue the messages (postsuper -r <queue_id>|ALL): man postsuper:

The message is subjected again to mail address rewriting and substitution. This is useful when rewriting rules or virtual mappings have changed.

So the best way (or the least intrusive way) would be to have an address rewrite for that recipient. From the Postfix Address Rewriting

    smtp_generic_maps = hash:/etc/postfix/generic

    his@localdomain.local       hisaccount@hisisp.example

Following this example, you could try:

share|improve this answer
good stuff! thanks! – momeunier Oct 15 '12 at 11:38
Since smtp_generic_maps is applied to mail delivery, there is no need to re-queue the mail. The smtp(8) daemon performs this rewrite. – adaptr Oct 15 '12 at 15:12
Good one, and don't forget to issue postmap /etc/postfix/generic after editing /etc/postfix/generic. – kasimir Jun 17 '13 at 19:00

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.