1748008 Members
4732 Online
108757 Solutions
New Discussion юеВ

mailx stopped working

 
Jenni Wolgast
Regular Advisor

mailx stopped working

I have two HP-UX 11.11 servers that were configured to send email by someone that is no longer here... Sometime Friday night, even though no changes were made on the server, one of the two servers stopped successfully sending email. There are messages in /var/mail/root that say "Deferred: Network is unreachable
Warning: message still undelivered after 4 hours
Will keep trying until message is 5 days old"

I have been looking through other posts so I have compared the /etc/resolv.conf, /etc/nsswitch.conf, /etc/rc.config.d/mailservs, /etc/mail/aliases, /etc/mail/sendmail.cf and /etc/hosts files between the two servers and do not see any differences. I have also tried sendmail -v -d8.99 -d38.99 jwolgast@healthplus.org. The results definitely look different but I have no idea how to interpret the results to find the problem. Any help would be greatly appreciated (and rewarded with points :) ), thanks!!


sendmail results from server that works:
;; res_querydomain(PRODUX, flintdns, 1, 1)
;; res_query(PRODUX.flintdns, 1, 1)
;; Querying server (# 1) address = 126.1.3.169
seq_map_parse(aliases.files, )
;; res_query(1.0.168.192.in-addr.arpa, 1, 12)
;; Querying server (# 1) address = 126.1.3.169
;; rcode = 3, ancount=0
;; res_query(225.3.1.126.in-addr.arpa, 1, 12)
;; Querying server (# 1) address = 126.1.3.169
;; res_querydomain(PRODUX.flintdns., , 1, 1)
;; res_query(PRODUX.flintdns, 1, 1)
;; Querying server (# 1) address = 126.1.3.169
map_init(sequence:aliases.files, NULL, 0)
sequence:aliases.files NULL: valid
map_init(implicit:Alias0, /etc/mail/aliases, 0)
wrong pass (pass = 0, rebuildable = 1)
map_init(host:host, NULL, 0)
host:host NULL: valid
map_init(switch:aliases, aliases, 0)
switch_map_open(aliases, aliases, 0)
switch_map_find => 1
files
map_stack[0] = sequence:aliases.files
switch:aliases aliases: valid
map_init(dequote:dequote, NULL, 0)
dequote:dequote NULL: valid
map_init(host:resolve, NULL, 0)
host:resolve NULL: valid
map_init(sequence:aliases.files, NULL, 1)
wrong pass (pass = 1, rebuildable = 0)
map_init(implicit:Alias0, /etc/mail/aliases, 1)
impl_map_open(Alias0, /etc/mail/aliases, 0)
hash_map_open(Alias0, /etc/mail/aliases, 0)
impl_map_lookup(Alias0, @)
db_map_lookup(Alias0, @)
implicit:Alias0 /etc/mail/aliases: valid
map_init(host:host, NULL, 1)
wrong pass (pass = 1, rebuildable = 0)
map_init(switch:aliases, aliases, 1)
wrong pass (pass = 1, rebuildable = 0)
map_init(dequote:dequote, NULL, 1)
wrong pass (pass = 1, rebuildable = 0)
map_init(host:resolve, NULL, 1)
wrong pass (pass = 1, rebuildable = 0)
getcanonname(healthplus.org), trying dns
dns_getcanonname(healthplus.org, trymx=1)
dns_getcanonname: trying healthplus.org. (ANY)
;; res_querydomain(healthplus.org, , 1, 255)
;; res_query(healthplus.org., 1, 255)
;; Querying server (# 1) address = 126.1.3.169
YES
dns_getcanonname: healthplus.org
getcanonname(healthplus.org), found
test
.
getmxrr(healthplus.org., droplocalhost=1)
;; res_querydomain(healthplus.org., , 1, 15)
;; res_query(healthplus.org, 1, 15)
;; Querying server (# 1) address = 126.1.3.169
jwolgast@healthplus.org... Connecting to healthplus.com.s8a1.psmtp.com. via esmt
p...
;; res_querydomain(healthplus.com.s8a1.psmtp.com., , 1, 1)
;; res_query(healthplus.com.s8a1.psmtp.com, 1, 1)
;; Querying server (# 1) address = 126.1.3.169
220 Postini ESMTP 82 y6_11_19c0 ready. CA Business and Professions Code Section
17538.45 forbids use of this system for unsolicited electronic mail advertiseme
nts.
>>> EHLO PRODUX.flintdns
250-Postini says hello back
250-STARTTLS
250-8BITMIME
250 HELP
>>> MAIL From:
250 Ok
>>> RCPT To:
250 Ok
>>> DATA
354 Feed me
>>> .
250 Thanks
jwolgast@healthplus.org... Sent (Thanks)
Closing connection to healthplus.com.s8a1.psmtp.com.
>>> QUIT
221 Catch you later
closemaps: closing aliases.files (NULL)
closemaps: closing Alias0 (/etc/mail/aliases)
impl_map_close(Alias0, /etc/mail/aliases, 12a3)
db_map_close(Alias0, /etc/mail/aliases, 12a3)
closemaps: closing host (NULL)
closemaps: closing aliases (aliases)
closemaps: closing dequote (NULL)
closemaps: closing resolve (NULL)


results from server that is not working:
;; res_querydomain(DEVUX, flintdns, 1, 1)
;; res_query(DEVUX.flintdns, 1, 1)
;; Querying server (# 1) address = 126.1.3.169
seq_map_parse(aliases.files, )
;; res_query(17.3.1.126.in-addr.arpa, 1, 12)
;; Querying server (# 1) address = 126.1.3.169
;; rcode = 3, ancount=0
map_init(sequence:aliases.files, NULL, 0)
sequence:aliases.files NULL: valid
map_init(implicit:Alias0, /etc/mail/aliases, 0)
wrong pass (pass = 0, rebuildable = 1)
map_init(host:host, NULL, 0)
host:host NULL: valid
map_init(switch:aliases, aliases, 0)
switch_map_open(aliases, aliases, 0)
switch_map_find => 1
files
map_stack[0] = sequence:aliases.files
switch:aliases aliases: valid
map_init(dequote:dequote, NULL, 0)
dequote:dequote NULL: valid
map_init(host:resolve, NULL, 0)
host:resolve NULL: valid
map_init(sequence:aliases.files, NULL, 1)
wrong pass (pass = 1, rebuildable = 0)
map_init(implicit:Alias0, /etc/mail/aliases, 1)
impl_map_open(Alias0, /etc/mail/aliases, 0)
hash_map_open(Alias0, /etc/mail/aliases, 0)
impl_map_lookup(Alias0, @)
db_map_lookup(Alias0, @)
implicit:Alias0 /etc/mail/aliases: valid
map_init(host:host, NULL, 1)
wrong pass (pass = 1, rebuildable = 0)
map_init(switch:aliases, aliases, 1)
wrong pass (pass = 1, rebuildable = 0)
map_init(dequote:dequote, NULL, 1)
wrong pass (pass = 1, rebuildable = 0)
map_init(host:resolve, NULL, 1)
wrong pass (pass = 1, rebuildable = 0)
getcanonname(healthplus.org), trying dns
dns_getcanonname(healthplus.org, trymx=1)
dns_getcanonname: trying healthplus.org. (ANY)
;; res_querydomain(healthplus.org, , 1, 255)
;; res_query(healthplus.org., 1, 255)
;; Querying server (# 1) address = 126.1.3.169
YES
dns_getcanonname: trying healthplus.org. (A)
;; res_querydomain(healthplus.org, , 1, 1)
;; res_query(healthplus.org., 1, 1)
;; Querying server (# 1) address = 126.1.3.169
YES
dns_getcanonname: healthplus.org
getcanonname(healthplus.org), found
test
.
getmxrr(healthplus.org., droplocalhost=1)
;; res_querydomain(healthplus.org., , 1, 15)
;; res_query(healthplus.org, 1, 15)
;; Querying server (# 1) address = 126.1.3.169
jwolgast@healthplus.org... Connecting to healthplus.com.s8a1.psmtp.com. via esmt
p...
;; res_querydomain(healthplus.com.s8a1.psmtp.com., , 1, 1)
;; res_query(healthplus.com.s8a1.psmtp.com, 1, 1)
;; Querying server (# 1) address = 126.1.3.169
jwolgast@healthplus.org... Connecting to healthplus.com.s8a2.psmtp.com. via esmt
p...
;; res_querydomain(healthplus.com.s8a2.psmtp.com., , 1, 1)
;; res_query(healthplus.com.s8a2.psmtp.com, 1, 1)
;; Querying server (# 1) address = 126.1.3.169
jwolgast@healthplus.org... Connecting to healthplus.com.s8b1.psmtp.com. via esmt
p...
;; res_querydomain(healthplus.com.s8b1.psmtp.com., , 1, 1)
;; res_query(healthplus.com.s8b1.psmtp.com, 1, 1)
;; Querying server (# 1) address = 126.1.3.169
jwolgast@healthplus.org... Connecting to healthplus.com.s8b2.psmtp.com. via esmt
p...
;; res_querydomain(healthplus.com.s8b2.psmtp.com., , 1, 1)
;; res_query(healthplus.com.s8b2.psmtp.com, 1, 1)
;; Querying server (# 1) address = 126.1.3.169
jwolgast@healthplus.org... Deferred: Network is unreachable
closemaps: closing aliases.files (NULL)
closemaps: closing Alias0 (/etc/mail/aliases)
impl_map_close(Alias0, /etc/mail/aliases, 12a3)
db_map_close(Alias0, /etc/mail/aliases, 12a3)
closemaps: closing host (NULL)
closemaps: closing aliases (aliases)
closemaps: closing dequote (NULL)
closemaps: closing resolve (NULL)
18 REPLIES 18
J. Bravo
Respected Contributor

Re: mailx stopped working

Hi!

Do you have checked the routing tables of the server?

Regards;

J. Bravo.
Jenni Wolgast
Regular Advisor

Re: mailx stopped working

I am very new to this still, can you explain how to check routing tables?
J. Bravo
Respected Contributor

Re: mailx stopped working

Hi!

With the following command you can check the routes:

netstat -rn

Compare the output with the other system to check that your failing server has connectivity with the mail server. Try with ping to the mail server too.

Regards;

J. Bravo.
Steven E. Protter
Exalted Contributor

Re: mailx stopped working

Shalom,

find out what the mail exchange server ip address is.

dig mx domain.com

nslookup

telnet mx.domain.com 25

See if you get a prompt or are blocked. If blocked check with the firewall admin or mail server admin.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Jenni Wolgast
Regular Advisor

Re: mailx stopped working

netstat -rn looks pretty much the same on both servers (the one that's working has another NIC so it has some extra entries). I can ping the server that I think is the mail server...

I am unsure how to do these steps:
dig mx domain.com
telnet mx.domain.com 25

I tried dig mx healthplus.org and got sh: dig: not found.

I'm not sure what I should be replacing mx with for the telnet command, can you explain a little more? Thanks!!
Philip Gunter
Respected Contributor

Re: mailx stopped working

Hi Jenni,

dig = domain information groper - it lets you lookup DNS details for a domain. It doesn't appear to be installed on your server.

MX = the mail exchange for a domain.

Anyway looking at the logs you've provided for both your servers we can see that connections on Server1 to healthplus.com.s8a1.psmtp.com worked.
On Server2 it trys to connect to healthplus.com.s8a1.psmtp.com and fails. It then tries healthplus.com.s8b2.psmtp.com (this is the next MX server for the domain) which also fails.

So you should try to telnet from Server2 to healthplus.com.s8a1.psmtp.com on port 25. You could also try telnet healthplus.com.s8b2.psmtp.com 25

If this fails then you have either a routing or firewall issue. You could try traceroute to see where the connection is blocked but this might not work because of network policy blocking ICMP.

At a guess you'll need to speak to your networks/firewall people.

Cheers,
Philip.
Jenni Wolgast
Regular Advisor

Re: mailx stopped working

traceroute definately gave very different results on the two systems:

working server:
traceroute healthplus.com.s8a1.psmtp.com
traceroute to healthplus.com.s8a1.psmtp.com (64.18.7.10), 30 hops max, 40 byte p
ackets
1 ASTARO.flintdns (126.1.3.229) 0.293 ms 0.208 ms 0.150 ms
2 10.0.0.1 (10.0.0.1) 0.915 ms * *
3 209-254-57-73.ip.mcleodusa.net (209.254.57.73) 6.905 ms * 8.911 ms
4 * * FSHRINFCH02JP01-SO0-0-0-0.mcleodusa.net (64.198.100.37) 24.427 ms
5 * STLSMOGZH00JC01-SO0-2-0-0.mcleodusa.net (64.198.101.26) 35.455 ms *
6 * * KSCAMO54H00JP01-SO2-2-0-0.mcleodusa.net (64.198.100.170) 33.927 ms
7 * DNVTCOUZH00JC01-SO0-3-0-0.mcleodusa.net (64.198.101.90) 48.157 ms *
8 SNJUCACLH25JC01-SO0-1-1-0.mcleodusa.net (64.198.100.78) 75.986 ms * 76.061
ms
9 * cr1-eqix-peer.sje007.internap.net (206.223.116.134) 76.379 ms 76.454 ms
10 * core4.sje.inappnet-28.cr1.sje007.internap.net (66.79.148.130) 70.111 ms
69.419 ms
11 * border1.pc1-0-bbnet1.sje.pnap.net (66.151.144.4) 69.952 ms *
12 * * *
13 * * *
14 * * *
15 * * *
(I stopped it at this point)

other server:
traceroute healthplus.com.s8a1.psmtp.c>
traceroute to healthplus.com.s8a1.psmtp.com (64.18.7.10), 30 hops max, 40 byte p
ackets
1 DEVUX.flintdns (126.1.3.17) 0.159 ms !N 0.044 ms !N 0.034 ms !N


The first place the working server heads is our firewall server, the non-working server just seems to be looking at itself... How can I get the non-working server to head to the firewall server?
Wouter Jagers
Honored Contributor

Re: mailx stopped working

Hiya,

In:
1 DEVUX.flintdns (126.1.3.17) 0.159 ms !N 0.044 ms !N 0.034 ms !N

..the "!N" also means "Network Unreachable", which is consistent with the sendmail errors you're getting.

Could you post the output of 'netstat -nr' (just to make sure) as well as the output of the 'ifconfig ' command on both machines ?

Cheers,
Wout
an engineer's aim in a discussion is not to persuade, but to clarify.
Jenni Wolgast
Regular Advisor

Re: mailx stopped working

Working server:

netstat -rn
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
192.168.0.1 192.168.0.1 UH 0 lan1 4136
126.1.3.225 126.1.3.225 UH 0 lan0 4136
192.168.0.0 192.168.0.1 U 2 lan1 1500
126.1.0.0 126.1.3.225 U 2 lan0 1500
127.0.0.0 127.0.0.1 U 0 lo0 0
default 126.1.3.229 UG 0 lan0 0


ifconfig lan0
lan0: flags=1843
inet 126.1.3.225 netmask fffffc00 broadcast 126.1.3.255


non-working server:
netstat -rn
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
126.1.3.17 126.1.3.17 UH 0 lan1 4136
126.1.0.0 126.1.3.17 U 2 lan1 1500
127.0.0.0 127.0.0.1 U 0 lo0 0
default 126.1.3.229 UG 0 lan1 0


ifconfig lan1
lan1: flags=1843
inet 126.1.3.17 netmask fffffc00 broadcast 126.1.3.255