1837785 Members
4005 Online
110119 Solutions
New Discussion

weird mail error...

 
SOLVED
Go to solution
Ratzie
Super Advisor

weird mail error...

I have setup an HP 11.0 server, with sendmail not running as I am only sending out bound mail.
It has been working up until recently.
I noticed that I was not getting any emails from the box, so I did some checking...

I am getting a ...
Host unknown (Name server: smtp1.abc.mb.ca.abc.ca.: no data known)

The thing is, it should be smtp1.abc.mb.ca
not
smtp1.abc.mb.ca.abc.ca
This is the address I can ping, the other errors out.

We have made no changes, and did not make any changes to the sendmail.cf file. It is default, where there is no entries for where the relay server is.

Where is it picking up the extra abc.mb.ca?!!!

8 REPLIES 8
Mel Burslan
Honored Contributor

Re: weird mail error...

At this point I presume you checked your sendmail.cf and did not find and lines starting with

DS

at all. Right ?

this totally sounds like somebody has messed with your sendmail.cf file and had a mail relay server set and to make the things worse, it is not a straight server name but a macro which is supposed to find your relay server. But due to the misconfiguration of this macro, you are getting the extra subdomain.domain suffix.

in the sendmail.cf file loof for lines starting with

DS

or

D{ followed by a bunch of cryptic directives

hope this helps. sendmail.cf is no fun to debug.
________________________________
UNIX because I majored in cryptology...
Sanjay_6
Honored Contributor
Solution

Re: weird mail error...

Hi,

Check your nsswitch.conf and resolv.conf files.

Hope this helps.

Regds
Steven E. Protter
Exalted Contributor

Re: weird mail error...

dig hostname
#pick a host on your internal network

If you used to get an answer and no longer do, you have a DNS or /etc/hosts name resolution problem.

As Sanjay noted the path is then /etc/nsswitch.conf or /etc/resolv.conf

Unlikely, though it might be that relaying was turned off on the server you do DS relay to. The error message counterindicates this outcome.

sendmail -v -d8.99 -d38.99 someone@domain.net
type some text before hitting enter

.


You will get good diagnostics and probably confirm the problem is with /etc/resolv.conf

Make sure you can ping them and that nslookup or dig returns good answers.

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
Ratzie
Super Advisor

Re: weird mail error...

The sendmail -v -d8.99 -d38.99 someuser@domain
Worked great, I was able to send mail, and recieved it, but when I do ...
mailx someuser@domain
I still get the connection refused because of the extended domain name.

I looked at all files, non have been touched since the server was built.
resolv.conf
nsswitch.conf
sendmail.cf
Mel Burslan
Honored Contributor

Re: weird mail error...

I am not a heavy user of mailx but have you checked your mailx.rc in the home directory of the user invoking the mailx command ?

also try running mailx by invoking it with the full path name (in my case /usr/bin/mailx). I have seen people putting scripts in your search path which diverts you from using the actual execuatble as you intended to.

looks like your mail delivery subsystem is functioning well. you are having issues how mailx passes messages to sendmail.
________________________________
UNIX because I majored in cryptology...
James A. Donovan
Honored Contributor

Re: weird mail error...

It's picking it up because the /sbin/init.d/sendmail script is appending it because you have the the SENDMAIL_SERVER_NAME set to smtp1.abc.mb.ca and you have either the DH or DM macros set in the /etc/mail/sendmail.cf file. If you unset the value of SENDMAIL_SERVER_NAME, the problem should disappear.
Remember, wherever you go, there you are...
James A. Donovan
Honored Contributor

Re: weird mail error...

....sorry misstated the problem (been a while since I ran into it and was writing of the top of my head). Since the /sbin/init.d/sendmail script actually does a re-write of /etc/mail/sendmail.cf to append the domainname to the SENDMAIL_SERVER_NAME in order to set the DH and/or DM variables:

sed -e s/^DH$/DH$SENDMAIL_SERVER_NAME.\$m/ \
-e s/^DM$/DM$SENDMAIL_SERVER_NAME.\$m/ \
/etc/mail/#sendmail.cf \


you actually should either set SENDMAIL_SERVER_NAME=smtp1, or not set it at all and just set the DS macro in your sendmail.cf file to smtp1.abc.mb.ca.

In either case, be sure to reset you DH/DM macros as appropriate to your environment.

Remember, wherever you go, there you are...
Ratzie
Super Advisor

Re: weird mail error...

Thanks