Page 1 of 1

Centos 5.6, need SSL/TLS-aware way to send (not rcv) Email - help?

Posted: 2017/10/07 15:25:10
by jeffw_00
Hi - I'm a one-man operation with not a whole lot of Linux savvy, having to keep a Centos 5.6 system alive. The last SMTP provider known to me that doesn't require SSL is going to require it starting 11/7, so I need a simple way to send Email from the command line using SSL. (I use the formerly popular sendemail.pl but it has known issues supporting SSL/TLS). I've tried to make mutt & ssmtp work without any luck. I don't need receiving - just have to send Emails when jobs complete. Nothing fancy - if I can send with a subject that's sufficient.

Does anyone have simple Email sending working with an SSL SMTP Server (port 465)? Can you share?

Thanks
/j

Re: Centos 5.6, need SSL/TLS-aware way to send (not rcv) Email - help?

Posted: 2017/10/07 16:46:12
by TrevorH
CentOS 5 is End Of Life. 5.6 is so old (2011) that it's not funny and has enough security holes in it to drive a truck through. If you must run CentOS 5 at all then at least run yum update to get to 5.11 which is the latest and last version - and still hasn't had any updates since the end of March 2017 as that's when it fell off the perch. To do that you'll need to amend your /etc/yum.repos.d/CentOS-Base.repo to point to the archived content on vault.centos.org as el5 is no longer on the mirror network.

You need to get off CentOS 5 ASAP. I'd recommend jumping straight to CentOS 7 as 6 has already entered production phase 3 where only critical security updates are released.

Re: Centos 5.6, need SSL/TLS-aware way to send (not rcv) Email - help?

Posted: 2017/10/07 17:57:18
by avij
One possibility might be to set up a more modern mail server (running CentOS 7 for example), which would accept non-encrypted connections from your CentOS 5 system and then relay the email to its intended destination using encryption.

Re: Centos 5.6, need SSL/TLS-aware way to send (not rcv) Email - help?

Posted: 2017/10/07 19:45:23
by jeffw_00
Hi guys - I appreciate all the well-meant advice, and it's constructively taken. However, for many reasons (which i can go into if needed to induce your help :-), I'm currently stuck on the system I have.. But message received - working at my own risk.

All I'm asking for is a pointer to the linux equivalent of an SSL-aware cmail, blat or some such that will let me do something like

somemailer.exe -s (server/username/password/port(465)) -subj <subject> -from <me> -to <me>.

Does this not exist? I can't believe there's a problem solved 5 different ways in windoze that isn't solved once in linux :-)

Thanks!!!
/j

Re: Centos 5.6, need SSL/TLS-aware way to send (not rcv) Email - help?

Posted: 2017/10/08 14:04:14
by TrevorH
But message received - working at my own risk
Strictly speaking you're working at all of our risks since if/when you get compromised and turned into a spambot, we'll be the ones on the receiving end.

Postfix can do what you want to do. But seriously, reinstall with a supported operating system that gets security patches. What you're running now is the Windows XP of linux systems...

Re: Centos 5.6, need SSL/TLS-aware way to send (not rcv) Email - help?

Posted: 2017/10/08 18:34:40
by jeffw_00
ummm ok - it does appear at first glance that postfix can probably do what I need, the same way I could go learn to fly a small plane in order to make a trip down the street. :-) :-)

Message received though, and sorry to have bothered you guys. I guess there is no straightforward command-line SMTP client out there for Linux. I'll probably just recode my stuff to write a semaphore file to my windows machine, and have the windows machine poll a folder and run cmail. Hacky, but I don't have time to read a Postfix book (or take the 5-day course :-)).

And as far as upgrading - I would if I could, but don't worry, the environment this machine runs in is such that you don't have to worry about it spambotting the net. I have that covered.

I'll try not to post again until I have the latest CentOS running - the forum title (CentOS 5 help) mislead me. My bad!

best
/j

Re: Centos 5.6, need SSL/TLS-aware way to send (not rcv) Email - help?

Posted: 2017/10/08 21:00:18
by avij
The thing is, it may be common in the Windows world to have separate programs for a specific need like this, but in Linux world we tend to use proper email software for sending emails.

The following postfix configuration worked for me on CentOS 7. Perhaps it works in older releases as well.

Code: Select all

smtp_tls_security_level=may
smtp_tls_loglevel = 1
smtp_tls_session_cache_database=btree:/var/lib/postfix/smtp_scache
smtp_tls_CAfile=/etc/pki/tls/certs/ca-bundle.crt

Re: Centos 5.6, need SSL/TLS-aware way to send (not rcv) Email - help?

Posted: 2017/10/08 21:58:35
by jeffw_00
well, there was sendemail.pl (which, I guess, is "improper" Email software ;-) ) ... all you needed to understand was the command line parameters. I respect that many have the time and background to understand postfix and could make good use of those parameters (thanks for posting them!), but i was actually hoping to find a solution that could be implemented as quickly as sendemail or cmail without having to have admin-level knowledge. (the admin for this system is long gone, I have to keep the machine running, and I know little of linux admin or the tools thereto, sorta why I was posting to a "support" forum).

Again, sorry to have troubled you.

/j

Re: Centos 5.6, need SSL/TLS-aware way to send (not rcv) Email - help?

Posted: 2017/10/09 18:43:00
by jeffw_00
was able to get ssmtp to work once I did a little googling corrected the certificate path in the config file in /etc/ssmtp/ So there is a solution if anyone else needs it