Hide the expanded alias in a bounce message

postfixsmtp

While looking at my mail queue I noticed the server was attempting to send back a bounce email, presumably to a spammer. Reading the error, I noticed that it was revealing the expanded value of a virtual alias. Is there any way to hide this address and keep it transparent?

I have my aliases set up as
local@myhost.tld email@destination.tld in the alias file, and here is the mail content:

This is the mail system at host myhost.tld.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                   The mail system

<email@destination.tld> (expanded from <local@myhost.tld>): host
    gmail-smtp-in.l.google.com[74.125.95.27] said: 552-5.7.0 Our system
    detected an illegal attachment on your message. Please 552-5.7.0 visit
    http://mail.google.com/support/bin/answer.py?answer=6590 to 552 5.7.0
    review our attachment guidelines. 37si2240042ibi.37 (in reply to end of
    DATA command)

Best Answer

Do not solve this problem. Solve the original problem.

There is no need to relay Spam. This is what you are doing here. You accept any mail and then forward all mails to a Google account. Google's Spam filter jumps in and rejects the mail. So please think of replacing this strange mail setup. If you want to store any mail in Googlemail because it is convenient, then please use Google-Apps and move the MX of myhost.tld to Google's server farm. If it is a per user setting to forward mails to Google, then you have to filter for Spam and only forward the clean ones.

In general you should never bounce Spam mails. The bounces do not reach the correct person as 99.999% of all sender addresses are forged.