I'm trying to use ssmtp to send a simple email from a server. There are loads of examples out there for configuring a gmail account and that's what I'm using. My /etc/ssmtp/ssmtp.conf tile contains the line:
mailhub=smtp.gmail.com:587
But when I try and send an email I get the error:
ssmtp: Cannot open mailhub:25
I've not a clue where it's pulling the port 25 from. I had installed postfix thinking of setting it up in satellite mode but removed it for ssmtp, thinking it was simpler given the limited requirements I have. So postfix was removed, don't know if that's had an effect.
ssmtp(was it justssmtp -u?), I think we should keep this open (or reopen it if closed) as it would show that-u, used that way, silently keeps the custom port from being used. Had you run it from an interactive shell? An init script? Most commands give an error or warning when an unrecognized option is passed. I considered editing "I used-u" into the question itself, but I don't know the circumstances where produces the described behavior. – Eliah Kagan Oct 07 '17 at 21:52