Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :0 f
- | ~/bin/encryptemail.pl | mail foobar@gmail.com
- # by [alan]
- # See if addressed *directly* to me, and ..
- # ..has not already been forwarded
- KEY = "TheMagic"
- FORWARD_EMAIL = "foo@example.com"
- :0
- *$ ^To:.*$LOGNAME(@|[^0-9a-z]|$)
- *$ ! ^$MYXLOOP
- {
- # now let's encrypt the body using mimencode
- :0 fbw
- | echo "MIME-Version: 1.0" ;
- echo "Content-Type: application/crypt" ;
- echo "Content-transfer-encoding: base64" ;
- echo "" ;
- crypt $KEY | mimencode -b
- # Now let's prepare the headers for forwarding the mail,
- # and mark it so we don't loop
- :0 fhw
- | $FORMAIL -I"Resent-To: $FORWARD_EMAIL" -I"$MYXLOOP"
- :0
- ! $FORWARD_EMAIL
- }
- crypt $KEY | mimencode -b
- ~/bin/encryptemail.pl | mimencode -b
- :0
- | ~/bin/encryptemail.pl | sendmail -oi foobar@gmail.com
- :0fb
- | ~/bin/encryptemail.pl
- :0
- ! foobar@gmail.com
Add Comment
Please, Sign In to add comment