Skip to content

Instantly share code, notes, and snippets.

View LuisCardenasSolis's full-sized avatar

Luis Cardenas LuisCardenasSolis

View GitHub Profile
@cristiroma
cristiroma / mailx-ssl-error-sending-email.sh
Last active March 22, 2021 20:46
Error in certificate: Peer's certificate issuer has been marked as not trusted by the.
Operating System: CentOS 7
These are the steps to follow when sending email from command line using SSL, for example:
echo "" | /bin/mail -v -q -s "subject" -r from@company.com -S smtp-auth=login -S smtp=smtps://secure.emailsrvr.com:465 -S smtp-auth-user="from@company.com" -S smtp-auth-password="SECRET" to@company.com
Steps:
1. Fix the Missing "nss-config-dir" variable error
2. Pull the certificate chain using openss s_client -showcerts command