1832258 Members
2776 Online
110041 Solutions
New Discussion

Fun with Sendmail!!

 
John Booth_1
Advisor

Fun with Sendmail!!

I am having problems getting sendmail to work on my D380 with 10.20. It just gets stuck in the mqueue. All I want to use is the "smart" relay host so I can send e-mails to our exchange server. Any suggestions!! I have sendmail working on all my boxes with 11.0, and I set up the 10.20 box with the same config.
20 REPLIES 20
Victor BERRIDGE
Honored Contributor

Re: Fun with Sendmail!!

Hi,
Is your exchange server on the same subnet?
You may be filtered by a router...

all the best

Victor
Tracey
Trusted Contributor

Re: Fun with Sendmail!!

Make sure you have your server defined in the /etc/mail/sendmail.cw directory. If you make any changes make sure you start and stop the sendmail daemon:

/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start
John Booth_1
Advisor

Re: Fun with Sendmail!!

I have copied in a new sendmail.cf file and made two changes:
added the line Dj$w.mydomain.com

"Smart" Relay Host
DSexchangeserver

I also edited nsswitch.conf file:
hosts:files
aliases:files

After I make any changes I start and stop sendmail..

We don't use DNS but I have the correct entries in /et/hosts and I can get to the exchange box from the server and vice versa.
Dave Kelly_1
Respected Contributor

Re: Fun with Sendmail!!

If you the command

mailq

does it show any sort of error against the messages that are "stuck" ?
John Booth_1
Advisor

Re: Fun with Sendmail!!

This is the error I get when I run mailq:

(Deferred: Name server: xchange002: host name lookup failure)

Which I don't understand because I have the entry in /etc/hosts and I can ping xchange002...
John Poff
Honored Contributor

Re: Fun with Sendmail!!

Hi,

Does an 'nslookup' of xchange002 return the right answer, as well as the IP address for xchange002? Just curious.

JP
Kevin Wright
Honored Contributor

Re: Fun with Sendmail!!

I bet your exchange server is not in your /etc/hosts file..since your only using files in you nsswitch.conf file, if it cannot find it it quits..do you use DNS at your site? if so put
hosts: files dns
in nsswitch.conf..but if you only use files, then putting an entry in /etc/hosts should solve you problem
David Macpherson
Occasional Advisor

Re: Fun with Sendmail!!

on the /etc/hosts add another alias to it, it MUST be what sendmail is trying to route it to..

if your e-mail is to joe@home.com
then your /etc/hosts must alias your exchange server's ip address to home.com....

***.***.***.*** exchange home.com

hope this helps...
Meddle not in the affairs of dragons - for you are crunchy, and go well with ketchup.
John Booth_1
Advisor

Re: Fun with Sendmail!!

Yes, When I do an nslookup it show that it is using the/etc/hosts file and it also can find the exchange servers address, because there is an entry in /etc/hosts for it. But still it will not send messages futher then the mqueue. Quite strange.
Kevin Wright
Honored Contributor

Re: Fun with Sendmail!!

try
sendmail -v user@domain.com < message
and see what error returns
John Booth_1
Advisor

Re: Fun with Sendmail!!

This is the error I get when I do a sendmail -v

.. Deferred: Name server: xchange002: host name lookup failure

But I can ping the exchange server and do a nslookup on it.
Kevin Wright
Honored Contributor

Re: Fun with Sendmail!!

Check and see if the line that reads
O=ServiceSwitchFile=
in your sendmail.cf file is uncommented, if it is comment it out and restart.
If this line is already commented out, the only other thing I can think of right now is setting the fallbackMX option in sendmail.cf and trying that.
Kevin Wright
Honored Contributor

Re: Fun with Sendmail!!

There is also a line that reads
o = hosts file..be sure it is uncommented too
and you may have to create your service.switch file..one more thing, I would recommend using dns. recent versions of sendmail use dns for alot of internal things, in fact yours could be compiled with DNS only..most support the without dns option only for compatability reasons..
John Sisak
Advisor

Re: Fun with Sendmail!!

I had a similar problem with mailx on a T500 that was resolved when I created /etc/resolv.conf with domain, search, and nameserver entries (even though /etc/nsswitch.conf says hosts: files).
This is what my /etc/resolv.conf looks like:
domain mydomain.com
search mydomain.com
nameserver XX.XX.XX.XX

Hope this helps.
Frank Li
Trusted Contributor

Re: Fun with Sendmail!!

Hi,

I have encountered the same problem as you before :-
It seems that "-q15m" in the command "sendmail -bd -q15m " is not useful !

So my solution is : put "sendmail -q " on your root crontab !
or
run "sendmail -q15m & " the command

I apply the point 1 in our mail system(hpux10.20 ) and problem solved ( names lookup failed , just like you .)

Hopes this helps.

Hi Friend
Frank Li
Trusted Contributor

Re: Fun with Sendmail!!

I suggest that you have a test:
#sendmail -q //force sendmail to process the mail queue, then
#mailq //to display the content of mail queue

if it prompts "/var/spool/mqueue is empty" , then the solution I mentioned above is the right way for you.

Frank.
Hi Friend
Andre Blanchette
Occasional Advisor

Re: Fun with Sendmail!!

Hi,

I also had a problem like this.

My dns was resolving the right fully qualified host name but doing the return value as the reverse lookup was having a typo .
ie : forward dns lookup was returning hostname@domain.com
and reverse lookup was returning
hostname@domain,com

hope it helps
becoming HP knowlegable person?
Vincent Stedema
Esteemed Contributor

Re: Fun with Sendmail!!

Hi,

Is the /etc/hosts entry for the exchange server in the right format, eg.:

xxx.xxx.xxx.xxx server.domain.com server
^ip ^fully qual. name ^alias

Vincent
John Booth_1
Advisor

Re: Fun with Sendmail!!

Thank you all for your help!!!

I broke down and called HP support:

I updated sendmail to 8.9.3 and it start working instantly.

If all else fails call HP!!!!
Frank Li
Trusted Contributor

Re: Fun with Sendmail!!

my sendmail version is 8.11.0 and it still encounters this problem . In fact , this problem occurs not so often . I hope you can solve this problem completely . If not , please run crontab "sendmail -q" by root every 15 minutes . That's the way we applied .


Frank.
Hi Friend