Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
cancel
Showing results for 
Search instead for 
Did you mean: 

sendmail don't send

SOLVED
Go to solution
Vogra
Regular Advisor

sendmail don't send

Hi All,
I'm trying to send a msg from a HP11.00 using sendmail. I configured /etc/nameserver with the dns, domain, search diretive; the gateway is ok. I need to comunicate with an Exchange server in the same domain. When I try to send from Exchange to sendmail, it's ok. But when I try to send from sendmail to Exchange, it's fail. Don't have any restriction on Exchange server and the name of the server is reseolved with no problem.
Any ideia?
We are spirits in the material world
13 REPLIES
Mark Greene_1
Honored Contributor
Solution

Re: sendmail don't send

check the man page for nsswitch.conf to verify that that file is setup correctly. then look at /etc/mail/sendmail.cf and verify that the DS entry is correctly set to the name of your exchange server. if not, make the change and then stop and restart sendmail:

/usr/sbin/sendmail stop
/usr/sbin/sendmail start

and the do:

ps -ef |grep sendmail

to verify that it restarted and send a test mail.

HTH
mark
the future will be a lot like now, only later
MANOJ SRIVASTAVA
Honored Contributor

Re: sendmail don't send

Hi Claudio

Please do a sendmail -v so that you can find as to where the mail ios getting stuck .this is a verbo0se option and will tell you step by step as to where it is held up. Incase you can post it , it will help us more.


Manoj Srivastava
Mark Greene_1
Honored Contributor

Re: sendmail don't send

actually, if you do as root:

mailq -v -d

this will tell you what your current sendmail daemon process has for parameters and if there is mail stuck in the queue and why

mark
the future will be a lot like now, only later
Vogra
Regular Advisor

Re: sendmail don't send

Hi!
I did mailq -v -d and one of the lines show me that de host name lookup failure (see below):
SAA01924 12 120272 Apr 29 18:24 root
Deferred: Name server: vsurjex.vsul: host name lookup failure)
lima@vsurjex.vsul

But if i do:
#ping -o vsurjex.vsul -n 1
PING vsurjex.vsul: 64 byte packets
64 bytes from 172.17.0.4: icmp_seq=0. time=2. ms
----vsurjex.vsul PING Statistics----
1 packets transmitted, 1 packets received, 0% packet loss
round-trip (ms) min/avg/max = 2/2/2
1 packets sent via:
172.17.0.4 - vsurjex.vsul
172.17.0.17 - vsurjux2.vsul

#nslookup vsurjex.vsul
Name Server: vsurjwb.vsul
Address: 192.168.1.2

Trying DNS
Non-authoritative answer:
Name: vsurjex.vsul
Address: 172.17.0.4


Any idea?
We are spirits in the material world
MANOJ SRIVASTAVA
Honored Contributor

Re: sendmail don't send

Hi Claudio

It looks like that the name is not getting resolved properly , do like this check how the name resoltuion is setup in /etc/nsswitch.conf , and also where does resolve.conf point to whether the actual DNS server or not , and also what are the entries for this server in /etc/hosts . In case you can try just rename resolv.conf and the server should be using /etc/hosts to resolve the name ( in case you have the right entries ) then you should be able to see the correct path ,then the mail will work .Please do test you should be able to ping to the exchange server both by name and by IP Address for the mail to work , and in case you change the setting you have to stop and start the mail daemon.

Manoj Srivastava
someone_4
Honored Contributor

Re: sendmail don't send

hi
please post the results of

echo test | sendmaiil -v user@vsurjex.vsul

Richard
David Burgess
Esteemed Contributor

Re: sendmail don't send

I mail to Novell Groupwise server. I set this up :-

in /etc/mail/sendmail.cf

Define your domain nmae
Dj$w.yourdomainname.com

and / or

in /etc/hosts make sure the line for your hostname is fully qualified

x.x.x.x svrname svrname.yourdomainname.com

Add an entry in /etc/mail/sendmail.cf for the smart relay host. This is where to send mail that cannot ne delivered locally. Make it the ip address of your Exchange server

You could add the address to /etc/hosts or DNS to mailgate

DS1.2.3.4 = ip address of Exchange server.
DSmailgate

Alias the mailgate entry in /etc/hosts to be yourdomainname ie

1.2.3.4 mailgate yourdomainname.com

Try and ping mailgate

Now try /usr/sbin/sendmail -v user@yourdomainname.com
It should connect and send a blank message.

One thing to note is that you need to make sure the Exchange server isn't rejecting your email.

Hope this makes sense.

Regards,

Dave.
Vogra
Regular Advisor

Re: sendmail don't send

Richard:
vsurjux2@root:/ #echo test | sendmail -v user@vsurjex.vsul
user@vsurjex.vsul... Deferred: Name server: vsurjex.vsul: host name lookup failure
(...)
We are spirits in the material world
someone_4
Honored Contributor

Re: sendmail don't send

what if you try to send to the ip address?

echo test | sendmail -v user@172.17.0.4


Richard
Uday_S_Ankolekar
Honored Contributor

Re: sendmail don't send

Hello,

Modify your /etc/mail/sendmail.cf file.

Open sendmail.cf in vi mode Look for DS flag by /^DS insert your EXchange server name infront of this .
Like : DSyourexhangeserver. Or if you have any other mail server put that name.
Save and quit the sendmail.cf.
Restart sendmail process by
#/sbin/init.d/sendmail stop
#/sbin/init.d/sendmail start

Check the mail status by tail -f /var/adm/syslog/mail.log

Goodluck
-USA..
Good Luck..
Jeff Schussele
Honored Contributor

Re: sendmail don't send

Hi Claudio,

In your /etc/resolv.conf file - what does the line starting with search say - should be something like

search company.com

this is what will be appended to all host names that are not FULLY qualified
EX host.company.com OR
host.subnet.company.com
when a search is requested.

So in your example is
vsurjex.vsul.your_domain.your_domain_type
a proper, fully qualified name AND in your name resolution - be it hostsfile/DNS/NIS?

Of course if you don't have a search line - you need to add one OR make sure you give sendmail the fully qualified host name.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Vogra
Regular Advisor

Re: sendmail don't send

Uday and Mark,

I had modified /etc/mail/sendmail.cf about DS field.
Thank you so much to everyone!
We are spirits in the material world
benoit Bruckert
Honored Contributor

Re: sendmail don't send

Hi Claudio,
The DS is a way to solve your trouble, but be careful, because this means that you will always use your exchange server for sending outgoing mail. IE that all mails which are for another host/domain will use your exchange server. This one has to be configured as a relay for outgoing mail !
If this is what you want, then it's ok !

regards
Benoit
Une application mal pansée aboutit à une usine à gaze (GHG)