I would like to reject mails to a certain address with a custom message. Mails to other non existing addresses should be unchanged. How can I do that? I'm using Postfix 2.7.0 on Ubuntu 10.4.
Background: My websites sends mails to my users, and so far, my personal address is used as the sender. I would like to change this to a noreply@... address, but since the users reply quite often to these emails, I would like to send them a helpful reject message.
Thanks!
Create a
custom_replies
map (i.e./etc/postfix/custom_replies
) with the following contents:Run
sudo postmap /etc/postfix/custom_replies
.Edit
/etc/postfix/main.cf
and put the following as the first check of thesmtpd_recipient_restrictions
:Then issue a
sudo postfix reload
.Try sending email to
[email protected]
: