Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have configured sSMTP on Ubuntu and it worked fine yesterday. But today when I am trying to send email it shows "ssmtp: Cannot open smtp.gmail.com:587" error message.

$ apt-get install ssmtp  

$ vi /etc/ssmtp/ssmtp.conf
root=sender.email@gmail.com
mailhub=smtp.gmail.com:587
rewriteDomain=
hostname=mycomputerName
UseTLS=YES
UseSTARTTLS=YES
AuthMethod=LOGIN
AuthUser=sender.email@gmail.com
AuthPass=sender.email.password
FromLineOverride=YES

$ chmod 640 /etc/ssmtp/ssmtp.conf

$ ssmtp username@gmail.com
Hi
Ctrl+D
ssmtp: Cannot open smtp.gmail.com:587

Additional info: Yesterday I used public IP, today I am using private IP. I think it is not any problem.

share|improve this question
1  
Your machine can't connect to smtp.gmail.com on port 587, so something must be blocking it. Check any firewalls on the machine or between the machine and the Internet. – mgorven Aug 9 '12 at 5:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.