PDA

View Full Version : SLES 12 SP3 Can't send mail after upgrade from SLES 12 SP2 to SP3



x0500hl
29-Oct-2018, 17:01
I am looking for assistance with debugging a problem with sending email.

After a coworker upgraded SLES 12 from SP2 to SP3, the server can no longer send email. He tried to telnet to the email server and doesn't receive the 220 message back.

We've asked the Network team to see if there was a change to a firewall or something else in the network and they said that there isn't anything that will prevent the server from contacting the email server.

I checked and the xinetd service is running, but I can't remember how to configure it to run postfix. I have spent a good hour or more searching Google but haven't stumbled across anything helpful.

Any ideas what else I can check?


Harley

malcolmlewis
29-Oct-2018, 17:13
Hi
So is postfix running? Maybe the switch to systemd is causing issues?



systemctl status postfix


Is it just forwarding emails to a host on the network?

Any output in the mail logs, postfix queue stuck perhaps?

x0500hl
29-Oct-2018, 17:39
I didn't think that I would need postfix running as I thought (probably incorrectly) that postfix ran under xinetd. I started the postfix server and sent a new email.

The server was using systemd while it was running SLES 12 SP2.

I am trying to send an email to the mail server using (normalized):

echo "Test mail from postfix" | mail -s "Test Postfix" harley@e????

Here are the entries for the email I sent from the output of the mailq command (normalized):

DA488264 2901 Mon Oct 29 11:20:16 MAILER-DAEMON
(delivery temporarily suspended: connect to xxx.yy.gov[nnn.mmm.ooo.ppp]:25: Connection timed out)
MainframeSystemsLinuxAdmin@xxx.zz.gov

8C994267 502 Mon Oct 29 11:20:20 MainframeSystemsLinuxAdmin@.ok.gov
(delivery temporarily suspended: connect to xxx.yy.gov[nnn.mmm.ooo.ppp]:25: Connection timed out)
harley@e?????

F3006243 27455 Mon Oct 29 11:20:16 MAILER-DAEMON
(delivery temporarily suspended: connect to xxx.yy.gov[nnn.mmm.ooo.ppp]:25: Connection timed out)
MainframeSystemsLinuxAdmin@xxx.zz.gov

The /var/log/mail file shows every attempt to connect to the mail server is getting 'connection timed out'.

I'm not sure what else to check.

EDIT: I forgot to mention that I can ping the mail server.

malcolmlewis
29-Oct-2018, 19:01
Hi
OK, if you can ping the mail server, not a routing issue. So the only two things i can think of are a proxy server involved or you were using a forwarding server configured in /etc/postfix/main.cf?

On the remote mail server, not configured to allow mac address only or something like that since you can't telnet in now?

jmozdzen
30-Oct-2018, 17:15
Hi x0500hl,

I didn't think that I would need postfix running as I thought (probably incorrectly) that postfix ran under xinetd. I started the postfix server and sent a new email.

have you checked that Postfix actually started successfully and is still running? It may well be that the service is being started, but fails to do so during startup - seconds after issuing "systemctl start ...".

If it is running and you can actually see that some Postfix process is listening on port 25 of that server (lsof -Pi|grep ":25 "), check that the server's running without iptable rules (local firewall) interfering.

If Postfix started successfully but is not listening on port 25 (but rather on 587), you should decide if you need to alter Postfix's configuration to also listen on old-school port 25, or to change your internal email infrastructure to use the more modern techniques (though I believe to be able to predict the result of that decision :D ).

If Postfix wasn't able to start and you're unsure why, please let us know what's in the logs from Postfix start to failure.

Regards,
J

x0500hl
12-Nov-2018, 17:01
Hi x0500hl,


have you checked that Postfix actually started successfully and is still running? It may well be that the service is being started, but fails to do so during startup - seconds after issuing "systemctl start ...".

If it is running and you can actually see that some Postfix process is listening on port 25 of that server (lsof -Pi|grep ":25 "), check that the server's running without iptable rules (local firewall) interfering.

If Postfix started successfully but is not listening on port 25 (but rather on 587), you should decide if you need to alter Postfix's configuration to also listen on old-school port 25, or to change your internal email infrastructure to use the more modern techniques (though I believe to be able to predict the result of that decision :D ).

If Postfix wasn't able to start and you're unsure why, please let us know what's in the logs from Postfix start to failure.

Regards,
J

Postfix was not running. The Systems Admin I took this problem from said that postfix doesn't need to be running until this server is going to receive emails. I found that he was wrong about that. It appears that something was changed on the email reply server. Once it was pointed out that it wasn't a routing issue, the problem "miraculously" went away.

Thanks everyone!


Harley

jmozdzen
12-Nov-2018, 18:06
Hi Harley,


Postfix was not running. The Systems Admin I took this problem from said that postfix doesn't need to be running until this server is going to receive emails. I found that he was wrong about that. It appears that something was changed on the email reply server. Once it was pointed out that it wasn't a routing issue, the problem "miraculously" went away.

glad to see the problem got resolved that easily.

Technically speaking, the email infrastructure can actually be set up to have no Postfix running on individual servers, except for a central mail service machine. But in such a case, you need to point all mail clients to that central server for SMTP (see i. e. the definition for the "smtp" variable in "man 1 mailx"). By default, on a Linux machine, the clients will try to use contact the local MTA.

Regards,
J