Advertisement
Guest User

Untitled

a guest
Apr 11th, 2017
558
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. ### We're installing dependencies (certutils commdand)
  2. apt-get install libnss3-tools
  3. mkdir certs
  4.  
  5. ### optional
  6. chown -R root:tomcat certs/
  7. chmod 770 -R certs/
  8. certutil -N -d certs/
  9.  
  10. ### assuming we are in /root directory, and want to add following files in the /root/ssl/certs folder
  11. ### we're issuing following command :
  12. echo -n | openssl s_client -connect smtp.gmail.com:465 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ~/ssl/certs/gmail.crt
  13. certutil -A -n "Google Internet Authority" -t "C,," -d ~/ssl/certs -i ~/ssl/certs/gmail.crt
  14.  
  15. ### We're testing with the following command :
  16. echo -e "Email content..." | mailx -v -s "Email subject" -S smtp-use-starttls \
  17. -S ssl-verify=ignore -S smtp-auth=login -S smtp=smtp://smtp.gmail.com:587 \
  18. -S from="email_we're_sending_from@gmail.com (e.g. your name)" -S smtp-auth-user=email_we're_sending_to@gmail.com \
  19. -S smtp-auth-password=<email_pasword> -S ssl-verify=ignore -S nss-config-dir=~/ssl/certs \
  20. email_we're_sending_to@gmail.com
  21.  
  22.  
  23. ### Above we may put our name in brackets for more decriptive email :
  24. ### -S from="email_we're_sending_from@gmail.com (e.g. your name)"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement