Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### We're installing dependencies (certutils commdand)
- apt-get install libnss3-tools
- mkdir certs
- ### optional
- chown -R root:tomcat certs/
- chmod 770 -R certs/
- certutil -N -d certs/
- ### assuming we are in /root directory, and want to add following files in the /root/ssl/certs folder
- ### we're issuing following command :
- echo -n | openssl s_client -connect smtp.gmail.com:465 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ~/ssl/certs/gmail.crt
- certutil -A -n "Google Internet Authority" -t "C,," -d ~/ssl/certs -i ~/ssl/certs/gmail.crt
- ### We're testing with the following command :
- echo -e "Email content..." | mailx -v -s "Email subject" -S smtp-use-starttls \
- -S ssl-verify=ignore -S smtp-auth=login -S smtp=smtp://smtp.gmail.com:587 \
- -S from="email_we're_sending_from@gmail.com (e.g. your name)" -S smtp-auth-user=email_we're_sending_to@gmail.com \
- -S smtp-auth-password=<email_pasword> -S ssl-verify=ignore -S nss-config-dir=~/ssl/certs \
- email_we're_sending_to@gmail.com
- ### Above we may put our name in brackets for more decriptive email :
- ### -S from="email_we're_sending_from@gmail.com (e.g. your name)"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement