Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

launchd no longer sending emails since upgrade

Since upgrading my Mac Mini several days ago, it no longer sends emails with the output of launchd (really, cron) jobs, which it was doing regularly and reliably before the upgrade.


That machine is now running:


```

# uname -a

Darwin bear 19.0.0 Darwin Kernel Version 19.0.0: Thu Oct 17 16:17:15 PDT 2019; root:xnu-6153.41.3~29/RELEASE_X86_64 x86_64

# sw_vers

ProductName: Mac OS X

ProductVersion: 10.15.1

BuildVersion: 19B88

#

```


There seem to be no log files for launchd anywhere (corresponding to what a decent crond implementation would provide). Why not? How do I enable them?


Note that the jobs themselves do appear to be running (I tested that) and sending email from the machine via e.g. `mailx` works fine.


Please advise as to how to fix this (and please fix the software and maybe the organization itself so important things like this are no longer broken by new releases).


Thanks!

Mac mini, macOS 10.15

Posted on Nov 15, 2019 8:36 AM

Reply
Question marked as Best reply

Posted on Nov 18, 2019 1:36 AM

As I haven't seen a response, and there seems to be no documentation in the relevant man pages (concerning e.g. lack of support for MAILTO= in crontab files), guess I'll assume this support has simply been dropped without warning.


So I've modified the (fortunately!) handful of crontab entries I have so the lines end in:


... 2>&1 | mail -E -s <subject> "$MAILTO"


Where <subject> is the command being executed (basically the "..." without the date/time info for when to run the job).


Seems to work ok. The "-E" avoids sending empty emails, which is how crond works (IME anyway).


Note that I found a number of posts about this issue, going back many years, with little or no responsiveness from Apple or the launchd authors as to why support was dropped without adequate documentation. Is mentioning the lack of MAILTO support in a man page really so much to expect?


Given how long ago this support was apparently withdrawn, it's also not clear to me why this was working on my Mac Mini until a couple of weeks ago -- as I don't think it was running terribly out-of-date software prior to upgrading to El Capitan. Oh well....

1 reply
Question marked as Best reply

Nov 18, 2019 1:36 AM in response to jcburley

As I haven't seen a response, and there seems to be no documentation in the relevant man pages (concerning e.g. lack of support for MAILTO= in crontab files), guess I'll assume this support has simply been dropped without warning.


So I've modified the (fortunately!) handful of crontab entries I have so the lines end in:


... 2>&1 | mail -E -s <subject> "$MAILTO"


Where <subject> is the command being executed (basically the "..." without the date/time info for when to run the job).


Seems to work ok. The "-E" avoids sending empty emails, which is how crond works (IME anyway).


Note that I found a number of posts about this issue, going back many years, with little or no responsiveness from Apple or the launchd authors as to why support was dropped without adequate documentation. Is mentioning the lack of MAILTO support in a man page really so much to expect?


Given how long ago this support was apparently withdrawn, it's also not clear to me why this was working on my Mac Mini until a couple of weeks ago -- as I don't think it was running terribly out-of-date software prior to upgrading to El Capitan. Oh well....

launchd no longer sending emails since upgrade

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.