On 26.01.2016 16:54, Matt Bayliss wrote:
> I'm trying to find the correct/best practice method for setting up a
> black hole email address for such items as "noreply" addresses when
> sending alerts from monitoring devices etc.
While not necessarily "the best" solution, I use this:
# pcre:/etc/postfix/recipient_access
/^(?:bytesink|devnull|noreply)\@somedomain\.tld$/ DISCARD
You'll need to make sure that this file is used of course, like so:
# /etc/postfix/main.cf
smtpd_recipient_restrictions =
permit_mynetworks
permit_sasl_authenticated
check_recipient_access pcre:${config_directory}/recipient_access
reject_non_fqdn_recipient
reject_unlisted_recipient
reject_unknown_recipient_domain
I include many other entries in recipient_access and it makes sense for
me to ignore the access file for mynetworks or sasl_authenticatd clients.
Change this if necessary.
-Ralph