1
I have an Ubuntu 16.04.2 server running Postfix 3.1.0, which I'm using as an email relay for another server running Cron jobs.
Various error emails, including bad address bounces, are being sent to www-data@mydomain.com, which doesn't have an email box. These messages are clogging up my postqueue with nowhere to go.
I've been trying to reroute these emails to me@myotherdomain.com with aliases, virtual or otherwise.
The problems I'm experiencing are:
- I'm not sure I the way I'm testing (using sendmail:
sudo mail -s "test subject" www-data
) is effective. - I can't tell if my alias changes are being added correctly, despite using
newaliases
andpostalias hash:/etc/aliases
, as well as restarting the postfix service. - I'm not sure this is actually even something that can be done with aliases, as opposed to header rewrites.
My alias file:
# See man 5 aliases for format
postmaster: root
My virtual file:
www-data@mydomain.com me@myotherdomain.com
main.cf has alias_maps
and alias_database
set, but not virtual_alias_domains
or virtual_alias_maps
. That was going to be the next thing I tried, but if it's as I said earlier that my testing is no good, it won't make a difference.
What am I missing?