Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A sendmail wrapper for rss2email to write mail directly into mbox
#!/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