title: Linux configuration -- ssmtp: Cannot open smtp.gmail.com:587
body: <p>Hi I have RHEL5 with ssmtp installed on it ssmtp-2.61-22.el5.i386.rpm</p>
  
  <p>my /etc/ssmtp/ssmtp.conf updated as below :-</p>
  
  <pre><code>AuthUser=mymail@gmail.com
  AuthPass=mypassword
  FromLineOverride=YES
  mailhub=smtp.gmail.com:587
  UseSTARTTLS=YES
  UseTLS=Yes
  RewriteDomain=gmail.com
  </code></pre>
  
  <p>also revaliases updated as below :</p>
  
  <pre><code>root:mymail@gmail.com:smtp.gmail.com:587
  </code></pre>
  
  <p>i have shutdown sendmail service </p>
  
  <p>when i try to send email with ssmtp i get below error </p>
  
  <pre><code>[root@ctmtest ssmtp]# echo "test" | ssmtp -vvv mymail@gmail.com
  [&lt;-] 220 smtp.gmail.com ESMTP v26sm42795996pfi.56 - gsmtp
  [-&gt;] EHLO ctmtest
  [&lt;-] 250 SMTPUTF8
  [-&gt;] STARTTLS
  [&lt;-] 220 2.0.0 Ready to start TLS
  ssmtp: Cannot open smtp.gmail.com:587
  </code></pre>
  
  <p>i searched lots of tag with this error , but unable to fix this </p>
  
  <p>my system is able to connect smtp.gmail.com on port 587</p>
  
  <pre><code>[root@ctmtest ssmtp]# telnet smtp.gmail.com 587
  Trying 74.125.200.108...
  Connected to smtp.gmail.com (74.125.200.108).
  Escape character is '^]'.
  220 smtp.gmail.com ESMTP o90sm11695907pfi.17 - gsmtp
  </code></pre>
  
  <p>is there anyone who have fixed this ? please suggest </p>