Last active
June 9, 2022 11:37
-
-
Save AntonTyutin/8254685 to your computer and use it in GitHub Desktop.
A stub of "sendmail" command. Appends mail to file instead of send it to mail server. Depends on Perl and its "MIME::QuotedPrint" module.
This file contains 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 | |
MAIL_LOG=${LOG_DIR:-/var/log}/mails.log | |
echo '== [' $(date +%Y-%m-%d_%H-%M-%S) '] ==' >> $MAIL_LOG | |
perl -MMIME::QuotedPrint -pe '$_=MIME::QuotedPrint::decode($_);' | tee -a $MAIL_LOG > /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment