Home > HOWTOs > Installing and Config heirloom-mailx (Gmail) on centos/ubuntu

Installing and Config heirloom-mailx (Gmail) on centos/ubuntu

Creating certificate Directory for SSL/TLS auth for Gmail
# Create a certificate directory
~]$ mkdir .certs

# Create a new database in the certs dir
~]$ certutil -N -d .certs 

# Fetch the certificate from Gmail, saving in the text file GMAILCERT
~]$ echo -n | openssl s_client -connect smtp.gmail.com:465 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > GMAILCERT

# Import the new cert file into the new database in the new dir
~]$ certutil -A -n “Google Internet Authority” -t “C,,” -d .certs -i GMAILCERT 

# Double Check
~]$ certutil -L -d .certs

Certificate Nickname                                         Trust Attributes
                                                             SSL,S/MIME,JAR/XPI

Google Internet Authority                                    C,,  
Mail .mailrc file
 account gmail {
 set smtp-use-starttls
 set ssl-verify=ignore
 set nss-config-dir=~/.certs
 set smtp=smtp://smtp.gmail.com:587
 set smtp-auth=login
 set smtp-auth-user=data.insights@me.com
 set smtp-auth-password=passwd
 set from=”data.insights@me.com (My Insights)”
 }

Testing mail Config

 echo “Test Email” | mailx  -v -A gmail -s “test” zubair.ahmed@me.com

Advertisements
Categories: HOWTOs
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: