1752609 Members
4095 Online
108788 Solutions
New Discussion юеВ

sendmail....!

 
SOLVED
Go to solution
derek b smith_1
Regular Advisor

sendmail....!

Hi All,

I am getting this ole sendmail error. I searched and read many prior posts to no avail.
As a sysadmin habit I like to disable sendmail daemon, and still use the smart relay option which I am but I still get this error.

Aug 30 09:51:56 jude sendmail[6394]: o7UDpuC6006394: to=andrew.xxxx@cbc-companies.com, ctladdr=oracle (501/501), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30778, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]


My other hosts do not have this issue.
Below are some configs from my problem host:

# sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter

> $S
mailhost
> $j
jude.cbc.local

# tail /etc/mail/sendmail.cw
# disklessclient1.foo
# disklessclient1.foo.com
# disklessclient2
# disklessclient2.foo
# disklessclient2.foo.com
##
localhost
jude
jude.cbc
jude.cbc.local

# cat /etc/nsswitch.conf
passwd: centrifydc files
group: centrifydc files
hosts: files dns
networks: files
protocols: files
rpc: files
publickey: files
netgroup: files
automount: files
aliases: files
services: files

# grep mailhost /etc/hosts
10.1.4.16 mailhost.cbc.local mailhost

root@jude [/etc/mail]
# grep local /etc/hosts
127.0.0.1 localhost loopback
131.16.91.95 jude.cbc.local jude
10.1.4.16 mailhost.cbc.local mailhost
10.1.8.210 cbclog.cbc.local cbclog

root@jude [/etc/mail]
# ping 10.1.4.16
PING 10.1.4.16: 64 byte packets
64 bytes from 10.1.4.16: icmp_seq=0. time=0. ms

----10.1.4.16 PING Statistics----
1 packets transmitted, 1 packets received, 0% packet loss

I suppose I could just config it to send-only but...rather not.
15 REPLIES 15
Steven E. Protter
Exalted Contributor
Solution

Re: sendmail....!

Shalom,

if you disable the sendmail daemon, which is a good job, you need a cron job to run the queue once in a while and get the mail off the system.

After you get some mail in the outbound queue, run this command:

sendmail -v -q

Post a snippet if you get unexpected results.

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
derek b smith_1
Regular Advisor

Re: sendmail....!

I did run sendmail -v -q with no output and same results:

Sep 7 13:11:02 jude sendmail[14792]: o87HB2rB014792: from=dsmith, size=147, class=0, nrcpts=1, msgid=<201009071711.o87HB2rB014792@jude.cbc.local>, relay=dsmith@localhost
Sep 7 13:11:02 jude sendmail[14792]: o87HB2rB014792: to=derek.smith@cbc-companies.com, ctladdr=dsmith (5008/4), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30147, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]

Tim Nelson
Honored Contributor

Re: sendmail....!

by the looks of things you are relaying to the localhost.. is that your intent ?

if so, then you need to always run the sendmail daemon in order to recieve that mail..

Not sure what you are trying to accomplish.

you do not need the sendmail daemon running in order to send any email..only to receive.. and on the occasion where the outgoing mail gets queued for some reason ( this is where you run the queue runner via cron. )

derek b smith_1
Regular Advisor

Re: sendmail....!

Tim,

Thanks for the reply but you are wrong.
My relay host is mailhost per

# sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter

> $S
mailhost

above.

I updated it to another relay host, another exchange server and I still get the same error.

# sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter

> $S
cbcsmtp.cbc.local.


Any other ideas?
derek b smith_1
Regular Advisor

Re: sendmail....!

see attachment for debug mode output.

thank you!
Tim Nelson
Honored Contributor

Re: sendmail....!

must have missed that.. was reading this line in the log output.

stat=Deferred: Connection refused by [127.0.0.1]
Patrick Wallek
Honored Contributor

Re: sendmail....!

It also appears to me that it is not getting to the relay host.

What does "nslookup mailhost" return? Does it return the IP address of your relay server or does it return "127.0.0.1".

What if you modify your sendmail.cf file and insert the IP address of your relay server rather than the hostname?
Steven E. Protter
Exalted Contributor

Re: sendmail....!

Shalom,

Short term, you might want to turn on the sendmail daemon. Sendmail has been re-structured in recent years to make it harder to queue mail without the daemon running.

Which is the recommended way of running a Unix server.
This link may be helpful.

http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1283891629976+28353475&threadId=1408233

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
derek b smith_1
Regular Advisor

Re: sendmail....!

I have it turned back on in send mode only, but when I change relay to the IP it still fails.