1

I have the same version of ssmtp installed on Debian 9 and CentOS 7.

Debian:

~# ssmtp -V
sSMTP 2.64 (Not sendmail at all)

CentOS:

# ssmtp -V
sSMTP 2.64 (Not sendmail at all)

I have identical configurations in /etc/ssmtp/ssmtp.conf for both systems, as well:

root=my_user@domain.com
mailhub=mail.domain.com:587
Hostname=otherfully.qualifieddomain.com
UseTLS=Yes
UseSTARTTLS=Yes
TLS_CA_File=/etc/pki/tls/certs/ca-bundle.crt
AuthUser=my_user
AuthPass=my_password
AuthMethod=LOGIN

I then send an email by running the following script:

#!/bin/bash

{
    echo 'To: another_user@domain.com'
    echo 'From: my_user@domain.com'
    echo 'Subject: Test subject'
    echo ''
    echo 'Test body'
} | ssmtp -vvv 'another_user@domain.com'

On Debian, this script exits without errors, with an exit code of 0, and the email arrives as intended. But on CentOS, it fails with the following error.

# ./script.sh
[<-] 220 rn-mailsvcp-mmp-lapp04.rno.domain.com -- Server ESMTP (Oracle Communications Messaging Server 8.1.0.1.20190704 64bit (built Jul  4 2019))
[->] EHLO otherfully.qualifieddomain.com
[<-] 250 SIZE 157286400
[->] STARTTLS
[<-] 220 2.5.0 Go ahead with TLS negotiation
ssmtp: Cannot open mail.domain.com:587

As far as I can tell, the only difference between these two configuration is that the TLS_CA_File directory, /etc/pki/tls/certs/ca-bundle.crt, does not exist on the Debian machine. It does exist on the CentOS machine, and contains data. However, if I change TLS_CA_File on the CentOS machine so that it points to a nonexistent file, as it does on the Debian machine, I still get the same error.

Why would this be? Is there some other configuration file that I'm not aware of?

I'd appreciate any help here. I'm also open to suggestions for other simple mail tools that would work consistently on both Debian and CentOS.

Cameron Hudson
  • 3,190
  • 1
  • 26
  • 38

0 Answers0