Making mail bounce with specific reply


The subject isn’t very clear…

What I want to do is make mail sent to one of my aliases bounce back to the sender, with the bounced version containing a fixed message (like “I’m sorry this e-mail address is currently unavailable”, though with more specific information than that)

Can this be done? If so… how?

Thanks in advance for any/all help, suggestions, divine inspirations :wink:



There’s no easy way to do this.

When an address is set to bounce, in most cases, our MTA simply sends a 550 error to the sender’s MTA during the SMTP transaction; thus, it’s the sender’s MTA which actually generates the bounce message, and the content (other than the error message) isn’t determined by us.

aura% telnet smtp
Connected to
Escape character is ‘^]’.
EHLO aura
250-SIZE 40960000
250 Ok
550 User unknown

It would theoretically be possible to put some text after the 550 error (instead of the usual ‘User Unknown’, but we don’t have any way to do this, nor are there plans to add this as a feature.

In some cases, a fake “bounce” message is generated (by a simple perl script), but it’s not configurable.

You could possibly do what you are trying to do with an autoresponder, and almost definitely using procmail and / or Perl. Just be careful in either case, as you don’t want to accidentally create an infinite loop of any sort.

Anyway, there’s no officially supported way of doing this, and there isn’t likely to be in the future.


(Hmmm… I thought I replied to this last night… must have done something wrong)

I found a relatively simple solution that seems to work.

First, I set an autoresponder for the address I want to effectively “bounce”, and that contains the message I want to send out.

Then I forward the address to a different address (which I called “nobody”), and set mail to “nobody” to be deleted (without reply) on receipt.

So the autoresponder responds to the incoming e-mail, the e-mail is forwarded to “nobody” where it gets send to the bit-bucket.

Voila! :slight_smile:

Thanks for your reply!