Last active
August 6, 2020 11:10
-
-
Save scateu/a42292721767f68da98790a93c0391c4 to your computer and use it in GitHub Desktop.
A sendmail wrapper for rss2email to write mail directly into mbox
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 | |
# A wrapper for rss2email | |
# Usage: in ~/.config/rss2email.cfg | |
# email-protocol = sendmail | |
# sendmail = ~/bin/sendmail_localhost_mbox | |
while [ -e ~/Mails/RSS.mbox.lock ]; do sleep 0.01; done | |
touch ~/Mails/RSS.mbox.lock | |
echo From RSS2EMAIL_SENDMAIL_WRAPPER `date +"%a %b %d %T %Y"` >> ~/Mails/RSS.mbox | |
#tee -a ~/Mails/RSS.mbox > /dev/null | |
cat >> ~/Mails/RSS.mbox | |
echo >> ~/Mails/RSS.mbox | |
rm ~/Mails/RSS.mbox.lock |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment