Operating System - HP-UX
1752307 Members
5584 Online
108786 Solutions
New Discussion юеВ

Re: mailx command working but not able to receive mail.

 
krissh89
Occasional Advisor

mailx command working but not able to receive mail.

HI ,

 

I am trying to test mail using mailx

 

mailx -s "testmail" raj@tcs.com

 

after executing command ,I checked with mailq and found no mail was in queue.

 

before doing this I added the mail server name in the sendmail.cf file.

 

# cat sendmail.cf | grep -i ds
##### in /ux/inet3/inet3isu/Sendmail/Sendmail-8.13.1/cmnds/src/cf/cf
##### environment may be needed. HP recommends that #####
# o UseTLS : Enable the TLS handshake in the SMTP transaction. (True/False) #
# to users at the clients. You could have nameserver MX records #
# database rebuilds, and various errors. More detailed information #
# Try hosts with no MX records (option TryNullMXList): #
# Sendmail always tries to lookup MX records for the destination host #
# number). If there are no MX records listed for the host or we are #
# Relay all non-local mail to the "Smart" relay host (DS) via smtp: #
# to a smart relay via SMTP just set macro S (DS) to the name of the #
# Relay all non-local mail to the "Smart" relay host (DS) via UUCP: #
# make two chnages to this file. First, set macro S (DS) to the name #
# This needs to be set before any LDAP maps are defined. `localhost' must be #
DSmail.tef.nl
O OldStyleHeaders=True
# noreceipts Don't return success DSN's
# perform initial split of envelope without checking MX records
#O Timeout.queuereturn.dsn=5d
#O Timeout.queuewarn.dsn=4h
# Return-Receipt-To: header implies DSN request
#O RrtImpliesDsn=False
# DHParameters (only required if DSA/DH is used)
RSOFTWARE $#error $@ 4.7.0 $: "403 TLS handshake."
Mdsmtp, P=[IPC], F=mDFMuXa%, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP, E=\r\n, L=990,
#

 

 

after executing mailx command I haven't received the mail,so when i check mail.log found below outut.

 

 

Sep 29 13:57:23 absap01 /sbin/init.d/sendmail[2870]: #### Starting sendmail ####
Sep 29 13:57:23 absap01 sendmail[2889]: alias database /etc/mail/aliases rebuilt by root
Sep 29 13:57:23 absap01 sendmail[2889]: /etc/mail/aliases: 7 aliases, longest 9 bytes, 88 bytes total
Sep 29 13:57:23 absap01 /sbin/init.d/sendmail[2870]: /etc/mail/aliases: 7 aliases, longest 9 bytes, 88 bytes total
Sep 29 13:57:23 absap01 sm-mta[2891]: starting daemon (@(#)Sendmail version 8.13.3 - Revision 1.004:: HP-UX11.31 - 03rd February,2010): SMTP+queueing@00:30:00
Sep 29 13:57:23 absap01 /sbin/init.d/sendmail[2870]: /etc/mail/submit.cf is missing
Sep 29 13:57:23 absap01 /sbin/init.d/sendmail[2870]: Sendmail client not started
Oct 1 12:54:56 absap01 /sbin/init.d/sendmail[14885]: #### Starting sendmail ####
Oct 1 12:54:56 absap01 sm-mta[14906]: starting daemon (@(#)Sendmail version 8.13.3 - Revision 1.004:: HP-UX11.31 - 03rd February,2010): SMTP+queueing@00:30:00
Oct 1 12:54:56 absap01 /sbin/init.d/sendmail[14885]: /etc/mail/submit.cf is missing
Oct 1 12:54:56 absap01 sendmail[14904]: alias database /etc/mail/aliases rebuilt by rajts
Oct 1 12:54:56 absap01 /sbin/init.d/sendmail[14885]: Sendmail client not started
Oct 1 12:54:56 absap01 sendmail[14904]: /etc/mail/aliases: 7 aliases, longest 9 bytes, 88 bytes total
Oct 1 12:54:56 absap01 /sbin/init.d/sendmail[14885]: /etc/mail/aliases: 7 aliases, longest 9 bytes, 88 bytes total
Oct 1 12:56:15 absap01 sendmail[16205]: t91AuFQ2016205: from=rajts, size=165, class=0, nrcpts=1, msgid=<201510011056.t91AuFQ2016205@absap01.ah.nl>, relay=rajts@localhost
Oct 1 12:56:15 absap01 sendmail[16207]: t91AuFQ2016205: to=raj@tcs.com, ctladdr=rajts (46704/15), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=120165, relay=mail.tef.nl [142.83.17.103], dsn=2.0.0, stat=Sent (t91AuFlk006509 Message accepted for delivery)
Oct 1 12:56:22 absap01 sm-mta[16208]: t91AuMXX016208: from=<>, size=2621, class=0, nrcpts=1, msgid=<201510011056.t91AuHlk006514@mail.tef.nl>, proto=ESMTP, daemon=MTA, relay=mail.tef.nl [142.83.17.103]
Oct 1 12:56:22 absap01 sm-mta[16217]: t91AuMXX016208: to=<rajts@absap01.ah.nl>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32889, dsn=2.0.0, stat=Sent
Oct 1 13:08:13 absap01 sendmail[25372]: t91B7noN025372: from=rajts, size=39, class=0, nrcpts=0, msgid=<201510011107.t91B7noN025372@absap01.ah.nl>, relay=rajts@localhost

 

 

 

i could see relay is goining to local server.

 

I am not able to ping or traceroute to mail server but  telent mailserver 25 is successful.

 

I doubt that the syntax I used at  DS in not correct 

2 REPLIES 2
Bill Hassell
Honored Contributor

Re: mailx command working but not able to receive mail.

The simplest way to trace mail activity is to use sendmail -v, like this

# sendmail -v bill_hpux@gmail.com < /etc/motd
bill_hpux@gmail.com... Connecting to gmail-smtp-in.l.google.com. via esmtp...
220 *********************************************
>>> EHLO mail.billh.com
250-mx.google.com at your service, [50.194.252.121]
250-SIZE 35882577
250-8BITMIME
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-XXXXXXXA
250 XXXXXXXB
>>> MAIL From:<root@mail.billh.com> SIZE=170
250 2.1.0 OK m7si3521613obv.25 - gsmtp
>>> RCPT To:<bill_hpux@gmail.com>
250 2.1.5 OK m7si3521613obv.25 - gsmtp
>>> DATA
354  Go ahead m7si3521613obv.25 - gsmtp
>>> .
250 2.0.0 OK 1443711952 m7si3521613obv.25 - gsmtp
bill_hpux@gmail.com... Sent (OK 1443711952 m7si3521613obv.25 - gsmtp)
Closing connection to gmail-smtp-in.l.google.com.
>>> QUIT
221 2.0.0 closing connection m7si3521613obv.25 - gsmtp

The Exchange mail server is mail.billh.com and has been configured to forward email from this server to the outside world. NOTE: most Exchange servers will refuse to forward unless configured.



Bill Hassell, sysadmin
krissh89
Occasional Advisor

Re: mailx command working but not able to receive mail.

HI,

 

When i send a test mail, it goes to local host rather than relay server.

 

Attached the mailx ,sendmail and resolv.conf and nsswitch.conf file for working server and non working sever.

 

in sendmail.cf file, I could see no value is passed at DS and it is using DNS for resolving.

 

but  test mail is going to local host and then it is going to relay host and that can be seen in mailx output.

 

Even I tried to put the relay host in DS filed an restarted the sendmail.

 

but still it goes to local host.

 

since submit.cf was not avialble in the non working servers I have moved the copy from /usr/newconfig dir and then i created smmsp user manually.

 

when i see diffrences for sendmail.cf in working and non working servers,I have no difference

 

but there are lot of differences in submit.cf file.

 

is this the reason it is causing issue?