Mailx

We have configured mailx Linux server. When send mail from Linux server it is not going

How to trouble shoot the root cause step by step

I can only find mailx the client. Apparently, you can make it send mail without a local server, but the norm is to send mail to the local mail server for store and forward, in case the other end is down or the recipient is local. It seems there may be ways to point it to an external mail server: mailx mail server linux - Google Search

Troubleshooting and configuring the local sendmail is a much bigger deal, another big Riley book. :smiley: I start with "echo RULESET ADDRESS | sendmail -bt".

When I type mailq, The below error messages logged into mailq file

Deferred: Connection timed out with smtp62.intersmtp.com.

Maybe that is not your email server (change D* line or the like in sendmail.cf), or there is a firewall in the way. Try "telnet smtp62.intersmtp.com 25" and see if you can get an SMTP prompt:

$ telnet xxx.yyy.com 25 
Trying...
Connected to qqq.yyy.com.
Escape character is '^]'.
220 zzzz.yyy.com -- Server ESMTP (Sun Java(tm) System Messaging Server 7u3-15.01 32bit (built Feb 12 2010))
421 4.4.2 Timeout while waiting for command.
Connection closed by foreign host.
$