Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deferred: Connection refused by [127.0.0.1]

Status
Not open for further replies.

rosewoodblues

Programmer
Feb 1, 2005
8
US
I have sendmail on FreeBSD 5.3 configured in the following
freebsd.mc file:
...
divert(0)
VERSIONID(`$FreeBSD: src/etc/sendmail/freebsd.mc,v 1.29 2003/12/24 21:15:09 gsha
piro Exp $')
OSTYPE(freebsd5)
dnl Select the nullClient feature and specify the relay server
FEATURE(`nullclient', `another.domain.net')

this should relay all mail to the true mailserver for our domain. however, i am getting these failures in the maillog:

Mar 9 13:10:47 web1 sm-msp-queue[32428]: j29JA1bS032328: to=Ken Hawkins <ken@rosewood.com>, ctladdr=root (0/0), delay=00:00:46, xdelay=00:00:00, mailer=relay, pri=210302, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]

these messages started happening after I upgraded sendamil to 8.12 btw. notice that the mesages are being generated by the root user (cron jobs running and reporting)

I am new to sendmail and do not know what could cause these to be generated. any help would be greately appreciated since my que is filling slowly but surely...

thanks in advance,
ken;
 
Hi,

type "netstat -an | grep 25" and paste me the result. Looks like smtp not running on 127.0.0.1.

...........
dbase77
 
netstat -an | grep 25
tcp4 0 0 192.168.1.5.49281 17.250.248.64.143 ESTABLISHED
tcp4 0 0 192.168.1.5.49269 17.250.248.64.143 ESTABLISHED

please excuse my ignorance here but I do not think that it is running and how can i establish this on a FreeBSD system?

thanks,
ken;

 
my bad on the other post. I was on the wrong box....

this is the REAL netstat:

netstat -an | grep 25
tcp4 0 0 10.50.1.151.80 195.6.68.65.46250 TIME_WAIT
tcp4 0 0 10.50.1.151.80 62.254.0.59.59580 TIME_WAIT
tcp4 0 0 10.50.1.151.80 62.254.0.59.59493 TIME_WAIT
tcp4 0 0 10.50.1.151.80 10.50.1.151.61125 TIME_WAIT
tcp4 0 0 10.50.1.151.80 10.50.1.151.62598 TIME_WAIT
tcp4 0 0 10.50.1.151.80 67.85.225.88.2620 TIME_WAIT
tcp4 0 0 10.50.1.151.80 10.50.1.151.57425 TIME_WAIT
tcp4 0 0 10.50.1.151.80 10.50.1.151.50825 TIME_WAIT
tcp4 0 0 10.50.1.151.80 10.50.1.151.53253 TIME_WAIT
tcp4 0 0 10.50.1.151.80 67.85.225.88.2616 TIME_WAIT
tcp4 0 0 10.50.1.151.80 67.85.225.88.2615 TIME_WAIT
tcp4 0 0 10.50.1.151.80 67.85.225.88.2609 TIME_WAIT
tcp4 0 0 10.50.1.151.80 67.85.225.88.2606 TIME_WAIT
tcp4 0 0 10.50.1.151.80 67.85.225.88.2601 TIME_WAIT
tcp4 0 0 10.50.1.151.80 67.85.225.88.2599 TIME_WAIT
tcp4 0 0 10.50.1.151.80 67.85.225.88.2596 TIME_WAIT
tcp4 0 0 10.50.1.151.80 67.85.225.88.2594 TIME_WAIT
tcp4 0 0 10.50.1.151.80 67.85.225.88.2592 FIN_WAIT_2
tcp4 0 0 10.50.1.151.80 67.85.225.88.2586 ESTABLISHED
tcp4 0 0 10.50.1.151.80 67.85.225.88.2584 TIME_WAIT
tcp4 0 0 10.50.1.151.80 67.85.225.88.2576 TIME_WAIT
tcp4 0 0 10.50.1.151.80 67.85.225.88.2574 TIME_WAIT
tcp4 0 0 10.50.1.151.80 62.254.0.59.52943 TIME_WAIT
tcp4 0 0 10.50.1.151.80 62.254.0.59.52774 TIME_WAIT
tcp4 0 0 10.50.1.151.80 83.25.213.35.1339 FIN_WAIT_1
tcp4 0 0 10.50.1.151.80 83.25.213.35.1338 FIN_WAIT_1
tcp4 0 0 10.50.1.151.80 82.36.185.92.3125 FIN_WAIT_2
tcp4 0 0 10.50.1.151.80 167.21.1.227.52546 TIME_WAIT
tcp4 0 0 10.50.1.151.80 203.229.119.25.65402 FIN_WAIT_2
tcp4 0 0 10.50.1.151.80 203.229.119.25.65303 FIN_WAIT_2
tcp4 0 0 10.50.1.151.80 203.229.119.25.64435 FIN_WAIT_2
tcp4 0 0 10.50.1.151.80 203.229.119.25.64694 FIN_WAIT_2
tcp4 0 0 10.50.1.151.80 203.229.119.25.65419 FIN_WAIT_2
tcp4 0 0 10.50.1.151.80 203.229.119.25.65403 FIN_WAIT_2
tcp4 0 0 10.50.1.151.80 203.229.119.25.64909 FIN_WAIT_2
tcp4 0 0 10.50.1.151.80 203.229.119.25.64542 FIN_WAIT_2
tcp4 0 0 10.50.1.151.80 203.229.119.25.64682 FIN_WAIT_2
tcp4 0 0 10.50.1.151.80 203.229.119.25.64899 FIN_WAIT_2
tcp4 0 0 10.50.1.151.80 203.229.119.25.65382 FIN_WAIT_2
tcp4 0 0 10.50.1.151.80 203.229.119.25.65436 FIN_WAIT_2
tcp4 0 0 10.50.1.151.80 203.229.119.25.65237 FIN_WAIT_2
tcp4 0 0 10.50.1.151.80 203.229.119.25.65224 FIN_WAIT_2
tcp4 0 0 10.50.1.151.80 203.229.119.25.64676 FIN_WAIT_2
tcp4 0 0 10.50.1.151.80 203.229.119.25.65126 FIN_WAIT_2
tcp4 0 0 10.50.1.151.80 212.158.75.198.25437 TIME_WAIT

it still does not show up on 127.0.0.1 that i can see.

ken;
 
Hi,

Are you sure your sendmail is running? I dont see any opening for port 25. What OS? Can you paste "ps -ef | grep sendmail", please? No wonder it failed.

..........
dbase77
 
I am on FreeBSD 5.3 for an os. have restarted the service and the netstat:

netstat -an | grep 25
tcp4 0 0 10.50.1.151.80 10.50.1.151.62425 TIME_WAIT
tcp4 0 0 10.50.1.151.80 82.68.49.214.32825 ESTABLISHED
tcp4 0 0 10.50.1.151.80 10.50.1.151.58325 TIME_WAIT
tcp4 0 0 10.50.1.151.80 141.176.128.99.25473 ESTABLISHED
tcp4 0 0 10.50.1.151.80 10.50.1.151.61250 TIME_WAIT
tcp4 0 0 10.50.1.151.80 68.142.250.82.38608 TIME_WAIT
tcp4 0 0 10.50.1.151.80 68.228.25.63.1203 FIN_WAIT_2
tcp4 0 0 10.50.1.151.80 68.228.25.63.1202 FIN_WAIT_2
tcp4 0 0 10.50.1.151.80 68.142.250.186.40925 TIME_WAIT
tcp4 0 0 10.50.1.151.80 68.228.25.63.1201 ESTABLISHED
tcp4 0 0 10.50.1.151.80 68.228.25.63.1199 ESTABLISHED
tcp4 0 882 10.50.1.151.80 194.74.202.254.57457 ESTABLISHED
tcp4 0 452 10.50.1.151.80 194.74.202.254.57386 ESTABLISHED
tcp4 0 0 10.50.1.151.80 10.50.1.151.50250 TIME_WAIT
tcp4 0 0 10.50.1.151.80 141.176.128.99.25136 TIME_WAIT

ps -eaux | grep sendmail
smmsp 93739 0.0 0.2 1992 1572 ?? Is 5:47AM 0:00.00 sendmail: Queue runner@00:30:00 for /var/spool/clientmqueue (sendmail)
smmsp 93742 0.0 0.2 1992 1572 ?? Is 5:47AM 0:00.00 sendmail: Queue runner@00:30:00 for /var/spool/clientmqueue (sendmail)
root 93802 0.0 0.2 2388 1724 p0 RV 5:49AM 0:00.00 grep sendmail (tcsh)

in my /etc/rc.conf is:

sendmail_enable="YES"
sendmail_submit_enable="YES"
sendmail_flags="-L sm-msp-queue -Ac -q30m"

for sendmail configuration.
 
Hi,

Any particular reason you use "-Ac"? Are you setting up sendmail to send and receive or send only?

...........
dbase77
 
well i am forwarding all mail to the actual mail server (different box) my .mc file that creates the sendmail.cf is:

VERSIONID(`$FreeBSD: src/etc/sendmail/freebsd.mc,v 1.29 2003/12/24 21:15:09 gshapiro Exp $')
OSTYPE(freebsd5)
dnl Select the nullClient feature and specify the relay server
FEATURE(`nullclient', `true.domain.com')

true.domain.com is NOT our mail server but i edited it out for this. and my flags used to just be "-q30m" the additional ones where in place to try and pick up the clientmailqueue. obviously this is not working.

I have been through many iterations of the mc file using SMART_HOST to forward all outgoing mail to the true mail server. I am really at a loss here.

thanks for the look-see by the way
ken;

 
If you want to forward all your mails, i suggest you use smarthost option. simple solution.
 
well I would agree and have replaced the file with the smarthost option and it looks like this:

divert(0)
VERSIONID(`$FreeBSD: src/etc/sendmail/freebsd.mc,v 1.29 2003/12/24 21:15:09 gshapiro Exp $')
OSTYPE(freebsd5)
DOMAIN(generic)

FEATURE(access_db, `hash -o -T<TMPF> /etc/mail/access')
FEATURE(blacklist_recipients)
FEATURE(local_lmtp)
FEATURE(mailertable, `hash -o /etc/mail/mailertable')
FEATURE(virtusertable, `hash -o /etc/mail/virtusertable')

define(`SMART_HOST', `bhost1.broadjam.net')

dnl Enable for both IPv4 and IPv6 (optional)
DAEMON_OPTIONS(`Name=IPv4, Family=inet')
DAEMON_OPTIONS(`Name=IPv6, Family=inet6, Modifiers=O')

define(`confBIND_OPTS', `WorkAroundBrokenAAAA')
define(`confNO_RCPT_ACTION', `add-to-undisclosed')
define(`confPRIVACY_FLAGS', `authwarnings,noexpn,novrfy')
MAILER(local)
MAILER(smtp)

as well the generic m4 looks like:

divert(0)
VERSIONID(`$Id: generic.m4,v 8.15 1999/04/04 00:51:09 ca Exp $')
define(`confFORWARD_PATH', `$z/.forward.$w+$h:$z/.forward+$h:$z/.forward.$w:$z/.forward')dnl
define(`confMAX_HEADERS_LENGTH', `32768')dnl
FEATURE(`redirect')dnl
FEATURE(`use_cw_file')dnl
EXPOSED_USER(`root')

as well i trimmed the sendmail_flags to:
sendmail_enable="YES"
sendmail_flags="-q30m"

netstat -an | grep 25 tcp4 0 0 10.50.1.151.80 10.50.1.151.62500 TIME_WAIT
tcp4 0 0 10.50.1.151.80 10.50.1.151.64925 TIME_WAIT
tcp4 0 0 10.50.1.151.80 10.50.1.151.58525 TIME_WAIT
tcp4 0 0 10.50.1.151.80 10.50.1.151.59250 TIME_WAIT
tcp4 0 0 10.50.1.151.80 68.72.101.201.4425 TIME_WAIT
tcp4 0 0 10.50.1.151.80 10.50.1.151.58252 TIME_WAIT
tcp4 0 0 10.50.1.151.80 10.50.1.151.65225 TIME_WAIT
tcp4 0 0 10.50.1.151.80 10.50.1.151.62518 TIME_WAIT
tcp4 0 0 10.50.1.151.80 10.50.1.151.52596 TIME_WAIT
tcp4 0 0 10.50.1.151.80 10.50.1.151.62505 TIME_WAIT
tcp4 0 0 10.50.1.151.80 10.50.1.151.65257 TIME_WAIT
tcp4 0 0 10.50.1.151.80 10.50.1.151.49225 TIME_WAIT
tcp4 0 0 10.50.1.151.80 10.50.1.151.62599 TIME_WAIT
tcp4 0 0 10.50.1.151.80 10.50.1.151.60252 TIME_WAIT
tcp4 0 0 10.50.1.151.80 4.245.25.207.52725 TIME_WAIT
tcp4 0 0 10.50.1.151.80 4.245.25.207.52720 TIME_WAIT
tcp4 0 0 10.50.1.151.80 4.245.25.207.52719 TIME_WAIT
tcp4 0 0 10.50.1.151.80 4.245.25.207.52718 TIME_WAIT
tcp4 0 0 10.50.1.151.80 4.245.25.207.52717 TIME_WAIT
tcp4 0 0 10.50.1.151.80 201.252.218.27.2235 FIN_WAIT_2


I am still getting failures however:
Mar 13 06:50:33 web1 sm-msp-queue[65608]: j29J8kiE032239: to=coloursofdavid@hotpop.com, ctladdr= delay=3+17:41:47, xdelay=00:00:00, mailer=relay, pri=34500532, relay=[127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]

and am confused as to why this could be?
 
Unless you have to run it as daemon and accept connection for 127.0.0.1. Have you try it?

...........
dbase77
 
not sure what you mean?? try what specifically?

I am really cutting my teeth here with sendmail.....


ken;
 
add "-bd" in your sendmail flag to run as daemon. Restart sendmail. type "netstat -an | grep 25" and paste here. Paste also "ps -ax | grep sendmail".


.........
dbase77

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top