Centos 7 - Sendmail not working

Jojo01

I'm trying to setup sendmail on my centos 7 server, but it's failing for some reason. I've opened port 25/tcp on firewall-cmd and selinux is disabled as well. It's still not working... /var/log/maillog logs:

Jul 25 14:14:34 mail sendmail[12274]: u6PBEYlI012274: [email protected], size=101, class=0, nrcpts=1, msgid=<[email protected]>, relay=root@localhost
Jul 25 14:14:34 mail sendmail[12275]: NOQUEUE: tcpwrappers (localhost, 127.0.0.1) rejection
Jul 25 14:14:34 mail sendmail[12274]: u6PBEYlI012274: [email protected], [email protected] (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30101, relay=[127.0.0.1] [127.0.0.1], dsn=5.0.0, stat=Service unavailable
Jul 25 14:14:34 mail sendmail[12274]: u6PBEYlI012274: u6PBEYlJ012274: DSN: Service unavailable
Jul 25 14:14:34 mail sendmail[12274]: u6PBEYlJ012274: [email protected], delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31125, relay=[127.0.0.1], dsn=5.0.0, stat=Service unavailable
Jul 25 14:14:34 mail sendmail[12274]: u6PBEYlJ012274: u6PBEYlK012274: return to sender: Service unavailable
Jul 25 14:14:34 mail sendmail[12274]: u6PBEYlK012274: to=postmaster, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32149, relay=[127.0.0.1], dsn=5.0.0, stat=Service unavailable
Jul 25 14:14:34 mail sendmail[12274]: u6PBEYlJ012274: Losing ./qfu6PBEYlJ012274: savemail panic
Jul 25 14:14:34 mail sendmail[12274]: u6PBEYlJ012274: SYSERR(root): savemail: cannot save rejected email anywhere

Thanks to @Andrzej A. Filip's answer i'm now getting this in the logs:

Jul 25 17:26:00 mail sendmail[3812]: u6PEPxur003812: [email protected], size=102, class=0, nrcpts=1, msgid=<[email protected]>, relay=root@localhost
Jul 25 17:26:00 mail sendmail[3813]: u6PEQ0Bs003813: from=<[email protected]>, size=347, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
Jul 25 17:26:00 mail sendmail[3812]: u6PEPxur003812: [email protected], [email protected] (0/0), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=30102, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (u6PEQ0Bs003813 Message accepted for delivery)

But the mails are still not coming to destination...

AnFi

Your sendmail seems to use tcpwrappers. tcpwrappers seem to reject email connection to 127.0.0.1:25.
Such connections are used to pass email submitted via sendmail command to local sendmail daemon.

FIX:
Inspect and fix tcpwrappers configuration files: /etc/hosts.allow and /etc/hosts.deny.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Sendmail is not working with crontab (bash)

From Dev

PHP Sendmail Not Working

From Dev

How to install sendmail in CentOS?

From Dev

VirtualHost is not working under Apache 2.4.6 on CentOS 7

From Dev

lxc-clone not working with overlayfs in centos 7

From Dev

Docker CentOS 7 - cron not working in local machine

From Dev

Rsyslog's imfile plugin not working on CentOS 7?

From Dev

PHP mail() / sendmail not working since Apache 2.4 PHP7 upgrade

From Dev

Spectron Headless Testing on CentOS 7 not working

From Dev

Permalinks not working on nginx centos 7

From Dev

Sendmail not working as desired in bash script

From Dev

Centos - Sendmail smtp smarthost with authentication

From Dev

Sendmail is not working with crontab (bash)

From Dev

PHP Sendmail Not Working

From Dev

CentOS 7 - yum install not working

From Dev

CentOs 7 YUM update not working

From Dev

Executing command for sendmail not working

From Dev

Windows 7 and VirtualBox (centos 7) DNS not working

From Dev

Adding a virtual NIC in centos 7 not working on the cloud

From Dev

lxc-clone not working with overlayfs in centos 7

From Dev

Reverse DNS lookup not working Centos 7 BIND

From Dev

Docker CentOS 7 - cron not working in local machine

From Dev

Sendmail Has Stopped Working

From Dev

Tracepath not working in Centos 7 with Vagrant

From Dev

Sudo not working on CentOS 7

From Dev

Permalinks not working on nginx centos 7

From Dev

Centos 7: Multiple virtual host is not working

From Dev

gzip compression not working with nginx and centos 7

From Dev

Sendmail service is not starting and giving the error message on CentOS7