Skip to content

Instantly share code, notes, and snippets.

@mapkyca
Created September 4, 2013 10:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mapkyca/6435067 to your computer and use it in GitHub Desktop.
Save mapkyca/6435067 to your computer and use it in GitHub Desktop.
Procmail script to encrypt outgoing root email before forwarding.
SUBJECT=`formail -xSubject:`
FROM=`formail -xFrom:`
:0 c
*^To:.*root.*
|formail -I "" | gpg --trust-model always -ear "marcus@marcus-povey.co.uk" | mail -r "$FROM" -s "$SUBJECT" marcus@example.org
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment