Hi all, On a multi-server setup the servers that are not running email (web + db + dns) are not able to send email to my admin account so I can monitor easier any problems. I have to view the /var/mail/root to check the emails. I would like to get all emails that going to root to my [email protected]. The mydomain.com is hosted in a mail server withing the multi-server setup. Do I need to just add my local subnet 10.0.0.0/16 under mynetworks or something else is recommended? At the time being all emails are rejecting with a Relay access denied Thanks
you can use /etc/aliases to send mails for root to a different mail. Code: root: [email protected] run newaliases when you change this file.
It still doesn't work with aliases. It bounces back the emails. Relay access denied (in reply to RCPT TO command))
That message is from your destination server? If so, it means it is not configured to accept mail for that domain. You could use mynetworks to get around that, but it shouldn't be necessary, as the server hosting mail for the domain will accept unauthenticated mail for it. Does mail to [email protected] work from anywhere?
Yes the [email protected] works from anywhere. The relay access denied bounce back to the server who tried to send (web server- never reach the email server)
Just to add that the email server that [email protected] exist has my local subnet under mynetworks but doesn't get the email.
An update; it works only if I put the public IP of the web server to the main.cf of the email server.