Guest User

Untitled

a guest
Jul 21st, 2018
555
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. :0 f
  2. | ~/bin/encryptemail.pl | mail foobar@gmail.com
  3.  
  4. # by [alan]
  5. # See if addressed *directly* to me, and ..
  6. # ..has not already been forwarded
  7.  
  8. KEY = "TheMagic"
  9. FORWARD_EMAIL = "foo@example.com"
  10.  
  11. :0
  12. *$ ^To:.*$LOGNAME(@|[^0-9a-z]|$)
  13. *$ ! ^$MYXLOOP
  14. {
  15. # now let's encrypt the body using mimencode
  16.  
  17. :0 fbw
  18. | echo "MIME-Version: 1.0" ;
  19. echo "Content-Type: application/crypt" ;
  20. echo "Content-transfer-encoding: base64" ;
  21. echo "" ;
  22. crypt $KEY | mimencode -b
  23.  
  24. # Now let's prepare the headers for forwarding the mail,
  25. # and mark it so we don't loop
  26.  
  27. :0 fhw
  28. | $FORMAIL -I"Resent-To: $FORWARD_EMAIL" -I"$MYXLOOP"
  29.  
  30. :0
  31. ! $FORWARD_EMAIL
  32.  
  33. }
  34.  
  35. crypt $KEY | mimencode -b
  36.  
  37. ~/bin/encryptemail.pl | mimencode -b
  38.  
  39. :0
  40. | ~/bin/encryptemail.pl | sendmail -oi foobar@gmail.com
  41.  
  42. :0fb
  43. | ~/bin/encryptemail.pl
  44. :0
  45. ! foobar@gmail.com
Add Comment
Please, Sign In to add comment