Emails from cron to root
Hello,
I'm not receiving emails from Cron, because it returns that root@hostname is invalid...
Like: (myhostname replaced the real fqn)
2018-11-06 10:42:02 1gK0gE-0006VR-Qs <= root@myhostname U=root P=local S=815 T="Cron....
2018-11-06 10:42:02 cwd=/var/spool/exim 4 args: /usr/sbin/exim -odi -Mc 1gK0gE-0006VR-Qs
2018-11-06 10:42:02 1gK0gE-0006VR-Qs Sender identification U=root D=-system- S=root
2018-11-06 10:42:03 1gK0gE-0006VR-Qs ** root@myhostname R=fail_remote_domains: The mail server could not deliver mail to root@myhostname. The account or domain may not exist, they may be blacklisted, or missing the proper dns entries.
2018-11-06 10:42:03 cwd=/var/spool/exim 8 args: /usr/sbin/exim -odi -t -oem -oi -f <> -E1gK0gE-0006VR-Qs
2018-11-06 10:42:03 1gK0gF-0006VX-14 <= <> R=1gK0gE-0006VR-Qs U=mailnull P=local S=2172 T="Mail delivery failed: returning message to sender" for root@myhostname
In Edit System Mail Preferences the Forward mail for "root" to is correct to my real email.
Where is the problem?
Thanks.
-
Hi @Rogerio What's the mailto address set in the crontab? Either for the user or for root (if set for root)? 0 -
Hello @cPanelLauren, it's the root's crontab "crontab -e" I need to set MAILTO=user@domain forcefully? 0 -
Hi @Rogerio You'll need to set that mailto to whatever email address you want cron jobs to send mail to. I'm assuming at some point it got changed as the mailto= portion isn't usually filled out. 0 -
Hello @cPanelLauren, yes, it was not set. In fact, I learned about this variable yesterday. Thanks 0
Please sign in to leave a comment.
Comments
4 comments