I have configured WHM >> Edit System Mail Preferences page but emails are not getting forwarded to “myemail@gmail.com” account.
Below are the settings present on the server :-
The system currently forwards mail for “nobody” to “root”.
The system currently forwards mail for “root” to “myemail@gmail.com”.
The system currently forwards mail for “cpanel” to “root”.
The system currently forwards mail for “root” to “myemail@gmail.com”.
The system currently forwards mail for “cpanel” to “root”.
Below are the logs for more details :-
2016-08-30 02:45:48 1beNoq-0002Ca-Th <= root@myvps.myhostname.com U=root P=local S=666 T="lfd on myvps.myhostname.com: WHM/cPanel root access alert from xx.xx.xxx.xxx" for root
2016-08-30 02:45:48 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1beNoq-0002Ca-Th
2016-08-30 02:45:49 1beNoq-0002Ca-Th ** root@myvps.myhostname.com R=fail_remote_domains: The mail server could not deliver mail to root@myvps.myhostname.com. The account or domain may not exist, they may be blacklisted, or missing the proper dns entries.
Solution :-
1) Make sure that email account to which emails are getting forwarded is valid.
2) Make sure that server's hostname myvps.myhostname.com entry is present in the /etc/localdomains file.
2) Make sure that server's hostname myvps.myhostname.com entry is present in the /etc/localdomains file.
That's all!