• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question Change "from"-address for cron emails

Is there a way to change the "from"-address for cron emails?
I get messages from "root@subdomain.domain.com", but I want from address to be "root@domain.com".
My full FQDN is "subdomain.domain.com" (also the URI where the plesk panel is accessible) which is also my /etc/hostname and /etc/mailname.
Mail server is reachable from "mail.domain.com".

Is there a way to tell cron or postfix to use "root@domain.com" as sender address for cron / system emails? Otherwise my personal gmail account rejects all cron mails, because (presumably) DMARC fails...

I know I can achieve this if I pipe the output of my cron scripts to the mail command:
Code:
* * * * * mycroncommand | mail -s "my subject" -r root@domain.com target@email.com

But that feels kinda hacky...

Thank you for your help.
 
Last edited:
Hi,

You can use the MAILTO setting in your cron file or crontab:

MAILTO=me@email.com

That will send all cron job output to the designated email address.
 
Try this parameter in your cron job:
-S from=sender@mydomain.com

or use this line in your crontab file:
MAILFROM=sender@mydomain.com
 
Back
Top