cancel
Showing results for 
Search instead for 
Did you mean: 

sendmail trouble

PAVIC Thierry
Frequent Advisor

sendmail trouble

Hi,
I use sendmail on my HP-UX server in order to sent mail to MS exchange server, and in order to forward mail from root.

until I used name resolution by /etc/hosts, I had no trouble. when I reboot my server. All my mail was put in queue in /var/spools/mqueue.

I check the following things :

delete the /.forward file
result : I can sent meail to root@localhost

I try to sent mail to my email ardesse that's worked befor reboot.
Result : (root@uncr07:/etc/mail)#sendmail -v t.pavic@snpe.com
t.pavic@snpe.com... snpe.com: Name server timeout
t.pavic@snpe.com... Transient parse error -- message queued for future delivery


The resolution use both /etc/host & dns
(root@uncr07:/etc/mail)#nslookup w2ksm02
Using /etc/hosts on: uncr07

looking up FILES
Name: w2ksm02
Address: 135.0.5.13
Aliases: mailhost
Telnet mailhost

I connect succesfully to the MS mailhost in telnet 25

So, what is wrong !
8 REPLIES
RAC_1
Honored Contributor

Re: sendmail trouble

nslookup "your_smart_relay"
nslookup "ip_of_smart_rely"

Is that OK??

/usr/sbin/expand_alias t.pavic@snpe.com

Is that OK?? What does file /etc/mail/service.switch look like?? (Cetain versions of sendmail still use this file)

Anil
There is no substitute to HARDWORK
PAVIC Thierry
Frequent Advisor

Re: sendmail trouble

I resolve my mailhost by 3 ways :

nslookup w2ksm02
Using /etc/hosts on: uncr07

looking up FILES
Name: w2ksm02
Address: 135.0.5.13
Aliases: mailhost

nslookup w2ksm02
Using /etc/hosts on: uncr07

looking up FILES
Name: w2ksm02
Address: 135.0.5.13
Aliases: mailhost

nslookup 135.0.5.13
Using /etc/hosts on: uncr07

looking up FILES
Name: w2ksm02
Address: 135.0.5.13
Aliases: mailhost

(root@uncr07:/etc/mail)#grep mailhost /etc/hosts
135.0.5.13 w2ksm02 mailhost


cat /etc/mail/service.switch
hosts dns files
aliases files

cat /etc/nsswitch.conf
#
# /etc/nsswitch.files:
#
# @(#)B.11.11_LR
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# does not use any name services.
#
passwd: files
group: files
hosts: files dns
services: files
networks: files
protocols: files
rpc: files
publickey: files
netgroup: files
automount: files
aliases: files


sendmail.cf is
DSmailhost

(root@uncr07:/etc/mail)#/usr/sbin/expand_alias t.pavic@snpe.com
Unexpected output: t.pavic@snpe.com: Host name lookup failure


One one hand, it seems that I resolv the name / ip adress of my mailhost.
nslookup seems good, the telnet 25 too.

But when I try to send a mail, no communication.
Steven E. Protter
Exalted Contributor

Re: sendmail trouble

Ther error message is a classic sign of one of two conditions:

1) Port 25 is blocked by firewall or a relay mail server that does not explicitly allow relay from your host/ip
2) That name lookups are failing, or the outside ISP that resolves outside names is not answering requests.

The area to look is nsswitch.conf and make sure there is good communication with the name resolving servers in /etc/resolv.conf

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
RAC_1
Honored Contributor

Re: sendmail trouble

I think your error is coming out of smart relay. Check with admin of smrt relay box.

Anil
There is no substitute to HARDWORK
PAVIC Thierry
Frequent Advisor

Re: sendmail trouble

I think that it's not a trouble of communication with mailhost, because of the successfully communication with a poolof HP-UX Server.

I think that ,with the change of resolution type I have to change a set of parameter, in sendmail.cf maybe more
RAC_1
Honored Contributor

Re: sendmail trouble

telnet "smart_host" 25
Now try sending it from there. If it goes we can isolate problem.

Anil
There is no substitute to HARDWORK
PAVIC Thierry
Frequent Advisor

Re: sendmail trouble

I connected to my mailhost server i.e w2ksm02


Telnet mailhost 25
(root@uncr07:/etc/mail)#telnet w2ksm02 25
Trying...
Connected to w2ksm02.
Escape character is '^]'.
220 W2KSM02.groupe.net Microsoft ESMTP MAIL Service, Version: 5.0.2195.6713 ready at Mon, 7 Mar 2005 16:57:39 +0100
vrfy root@uncr07
550 5.7.1 Cannot relay to
vrfy t.pavic@snpe.com
252 2.1.5 Cannot VRFY user, but will take message for
quit
221 2.0.0 W2KSM02.groupe.net Service closing transmission channel
Connection closed by foreign host.
(root@uncr07:/etc/mail
(root@uncr07:/etc/mail)#
PAVIC Thierry
Frequent Advisor

Re: sendmail trouble

The solution is
update /etc/mail/sendmail.cf file
update Dj macro
Dj$w.xxxx.net

update DS macro
DSxxxx.net

put the following line in comment
# pass to name server to make hostname canonical
# R$* < @ $* $~P > $* $: $1 < @ $[ $2 $3 $] > $4

Modifiy F=mDFMuX by F=0DFMuX
Msmtp, P=[IPC], F=0DFMuX, S=11/31, R=21, E=\r\n, L=990,


update /etc/nsswich.conf file
hosts: files dns [NOTFOUND=continue] [UNAVAIL=continue] [TRYAGAIN=continue]

stop and start sendmail