Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
/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