Skip to content

Instantly share code, notes, and snippets.

@mcgrof
Created November 23, 2017 00:46
Show Gist options
  • Save mcgrof/3819e61038f3caeab8cc6d03fdd7bbbe to your computer and use it in GitHub Desktop.
Save mcgrof/3819e61038f3caeab8cc6d03fdd7bbbe to your computer and use it in GitHub Desktop.
/opt/mail2pgp/.procmailrc
LOGFILE=/opt/mail2pgp/procmail.log
SHELL=/bin/bash
VERBOSE=yes
LOGABSTRACT=yes
FORMAIL=/usr/bin/formail
GNUPGHOME=/opt/mail2pgp/.gnupg
:0 H
*
{
MYHDRS=`formail -XContent-Type: -XContent-disposition: -XContent-transfer-encoding:`
:0 fh
| formail -I 'Content-Type: multipart/encrypted; protocol="application/pgp-encrypted"; boundary="iy67b7eliunzc2u3"' -I 'Content-disposition: inline' -I 'User-Agent: mail2pgp/20171120'
:0 fb
| { cat /opt/mail2pgp/gpg-mime-start ; { echo "$MYHDRS" ; echo ; cat - ; } | gpg --keyring /opt/mail2pgp/keyring.gpg --batch --quiet --always-trust -a -e -r $PGP_KEY; cat /opt/mail2pgp/gpg-mime-end; }
}
:0c
! $FWD_TO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment