Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

We are using a postfix server for debuging a notification system. I want postfix send all mails back to the sender, that means whatever the recipient is, postfix will delivery the mail back to the sender.

Is it possible? If so, how can I do this?

share|improve this question
Postfix sends mails back to sender in the case when sender sends mails to non-existing user or mail gets bounce. – user128296 Dec 1 '12 at 5:41
@user128296 This is true, but I expect Joseph wants something with a little more finesse and style than a typical NDR/Bounce :) – voretaq7 Dec 1 '12 at 15:08
up vote 1 down vote accepted

For your particular use case it's probably best to do the following:

  1. Set up a "catchall" email account and have postfix deliver everything there.
  2. Set up procmail rules on the catchall account to send the messages back to their original sender.

Most modern Linux systems have procmail installed. If yours doesn't (or if you're not running Linux) it's a tiny program with few dependencies so installing it shouldn't be much of an issue.
Configuring procmail rules has a bit of a learning curve, but if you google around there are many excellent documents/tutorials to help get you started.

share|improve this answer
Thanks @voretaq7, I work around using sender_bcc_maps, bcc all emails to the sender, and of course, there is a catchall account. – Joseph Dec 2 '12 at 0:43
@Joseph You may want to post that as an answer - it sounds like a more elegant solution than what I suggested (I'm not really a postfix guy, so I'm used to working around sendmail's deficiencies with procmail - I jump to it more often than is probably needed if using an MTA that doesn't suck :-) – voretaq7 Dec 2 '12 at 1:42

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.