Last active
July 13, 2016 07:47
-
-
Save jstangroome/3b958f4820d9ffb3f337 to your computer and use it in GitHub Desktop.
Mock /usr/sbin/sendmail implementation to see Cron failure detail
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# for when a Cron job fails on Ubuntu with "(No MTA installed, discarding output)" | |
# captures the job output to syslog instead | |
exec 1> >(/usr/bin/logger --id --tag sendmail-to-syslog --priority mail.notice) 2>&1 | |
echo $ sendmail "$@" | |
exec cat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment