[CentOS] sendmail

Tue Oct 3 08:29:38 UTC 2017
Kenneth Porter <shiva at sewingwitch.com>

--On Monday, October 02, 2017 6:21 PM -0400 Larry Martell 
<larry.martell at gmail.com> wrote:

> I an running CentOS7 in a docker container. I need to send email from
> that container so I installed sendmail and then I run:
>
> m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf` and when I try and
> send mail it fails with:
>
> larry.martll at gmail.com... Connecting to [127.0.0.1] via relay...
> larry.martll at gmail.com... Deferred: Connection refused by [127.0.0.1]
>
> Anyone know how I can configure sendmail so that I can send mail?

I don't know about docker, but in regular CentOS, you type make in 
/etc/mail to rebuild all configuration binary files (including sendmail.cf) 
from configuration sources, and then you need to start the sendmail service 
with systemctl. Enable the service if you want it to start at boot time.