Linux configuration -- ssmtp: Cannot open smtp.gmail.com:587
Hi I have RHEL5 with ssmtp installed on it ssmtp-2.61-22.el5.i386.rpm
my /etc/ssmtp/ssmtp.conf updated as below :-
AuthUseremail@example.com AuthPass=mypassword FromLineOverride=YES mailhub=smtp.gmail.com:587 UseSTARTTLS=YES UseTLS=Yes RewriteDomain=gmail.com
also revaliases updated as below :
i have shutdown sendmail service
when i try to send email with ssmtp i get below error
[root@ctmtest ssmtp]# echo "test" | ssmtp -vvv firstname.lastname@example.org [<-] 220 smtp.gmail.com ESMTP v26sm42795996pfi.56 - gsmtp [->] EHLO ctmtest [<-] 250 SMTPUTF8 [->] STARTTLS [<-] 220 2.0.0 Ready to start TLS ssmtp: Cannot open smtp.gmail.com:587
i searched lots of tag with this error , but unable to fix this
my system is able to connect smtp.gmail.com on port 587
[root@ctmtest ssmtp]# telnet smtp.gmail.com 587 Trying 220.127.116.11... Connected to smtp.gmail.com (18.104.22.168). Escape character is '^]'. 220 smtp.gmail.com ESMTP o90sm11695907pfi.17 - gsmtp
is there anyone who have fixed this ? please suggest
I encountered the same problem. The following steps worked for me:
- sudo vi/etc/ssmtp/ssmtp.conf Add the following:
Replace: XXXX- username(mail) XYXYX- password(mail password) AAAA- hostname(get by running $hostname)
- sudo vi /etc/ssmtp/revaliases Add the following:
Replace : XXXX - username(mail)
Try running the mail now:
$mail -s "adasdas" XXXX@gmail.com
CC: XYZLoremIpsum . 'ctrl+D'
It solved my problem. Hopefully for a system(Office) you need to configure correct proxy settings otherwise you will get an error:
cannot send message: Process exited with a non-zero status
14.04 - ssmtp: Cannot open smtp.gmail.com:587, There are a few small typos in your config. You have written: UseSTARTCTLS=YES ^. (I have marked the error) where you should have written: Linux configuration — ssmtp: Cannot open smtp.gmail.com:587 0 Ready to start TLS ssmtp: Cannot open smtp.gmail.com:587 crt line on my Arch Linux system
try changing this option
Allowing less secure apps to access your account
ssmtp: Cannot open smtp.gmail.com:587 - CentOS, ssmtp: Cannot open smtp.gmail.com:587. Post by If so, do you see any problems with the above setup? Todd Same error -- darn it. Todd. $ apt-get install ssmtp $ vi /etc/ssmtp/ssmtp.conf email@example.com mailhub=smtp.gmail.com:587 rewriteDomain= hostname=mycomputerName UseTLS=YES UseSTARTTLS=YES AuthMethod=LOGIN AuthUserfirstname.lastname@example.org AuthPass=sender.email.password FromLineOverride=YES $ chmod 640 /etc/ssmtp/ssmtp.conf $ ssmtp email@example.com Hi Ctrl+D
This is perhaps because you're not setting the
hostname parameter of
ssmtp.conf. It should be a resolvable, fully-qualified domain name; yours is defaulting to the machine name of
ctmtest (as shown in the
EHLO command that you quote above).
The issue that user963 mentions in their answer may also be in action here, but in that case you'll get a different error message, something like
ssmtp: Authorization failed (534 5.7.14 ...).
linux ssmtp error Cannot open smtp.gmail.com:587, Did you check if your selinux enabled? Also, you may need this option: TLS_CA_Dir. A directory of trusted certificates for validating the server, if required. SSMTP is a simple MTA(Message Transfer Agent) to send off mail from a Linux system to a mailhub. For a mailhub will use a Gmail account. SSMTP can send emails by itself or you can install mutt (it’s another simple MTA). Always it’s a good idea to configure your server to notify you with some […]
first to get your hostname type in terminal : hostname
copy it and past in hostname parameter in ssmtp.conf
After updating sSMTP to version 2.61 I cannot send mail via gmail , Unix & Linux Stack Exchange ssmtp: Cannot open smtp.gmail.com:587 This has been resolved by adding the following to my ssmtp.conf file FYI -- For Ubuntu the .crt file is in a different place and should read: Adding this enabled me to connect to my SMTP server via STARTTLS on port 587 with the settings: “ssmtp -au EMAIL_ADDRESS -ap EMAIL_PASSWORD firstname.lastname@example.org”. So anybody doing a “ps” just as your are doing this command will see your email_password. Putting a password as a parameter on the command line is a very bad security practice.
On my Gentoo Linux system, the error
ssmtp: Cannot open smtp.server.com:port was caused by an ownership/permissions issue: the file
/etc/ssmtp/ssmtp.conf should belong to the group
ssmtp, which it didn't (and any user allowed to access ssmtp should be a member of that group).
Using smtp.gmail.com from a Linux Server, Linux configuration -- ssmtp: Cannot open smtp.gmail.com:587. Question. Hi I have RHEL5 with ssmtp installed on it ssmtp-2.61-22.el5.i386.rpm. SSMTP is a tiny simple utility which lets you relay your Linux system’s emails to Google Or Microsoft Office 365 accounts. Its pretty simple and straightforward utility which forwards your Linux system’s emails to reliable relay mail servers like Google or MSN and then email is forwarded to the destination addresses using those SMTP servers (smtp.gmail.com or smtp.office365.com).
SSMTP Cannot open smtp.gmail.com:587, Unable to connect to "smtp.gmail.com" port 587. Cannot open smtp.gmail.com:587. Here is my /etc/ssmtp/ssmtp.config. root=username@gmail. Install sSMTP and setup with Gmail on Ubuntu 16.04 This is a guide on how to install sSMTP and set it up with Gmail on Ubuntu 16.04. I installed this to allow CSF/LFD to send email to me, as I didn’t want a full mail server.
Ssmtp cannot open mailhub 25, conf -- a config file for sSMTP sendmail. # # The person who gets all mail for userids < MinUserId # Make this empty to disable rewriting. root= Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Problem sending email using ssmtp
Set Up SSMTP for Mail Relay to AuthSMTP – Engine Yard , Config file for sSMTP sendmail # # The person who gets all mail for userids Commonly mailhosts are named mail.domain.com mailhub=smtp.gmail.com:587 the Arch linux wiki entry on ssmtp) mention a mail group but I can't find it. Alright so I flipped my permissions back to rw-r--r-- and it now doesn't