Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Jun 2002 10:38:48 -0700 (PDT)
From:      Qingjia Zhu <ie_qjzhu@yahoo.ie>
To:        Alexander V Zubchenko <stalker@hermes-comp.zp.ua>
Cc:        gshapiro@FreeBSD.org, freebsd-questions@freebsd.org
Subject:   Re: sendmail refuse localhost(revisited)?
Message-ID:  <20020626173848.46342.qmail@web14401.mail.yahoo.com>
In-Reply-To: <20020626110835.L12722-100000@server.hermes-comp.zp.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi, gurus

  Because fetchmail in my box works, that is, my sendmail
  do can receive incoming mails, so I'd like to describe
  my problem again, I hope somebody can look into this and
  help me to find the way out(Which config file to modifiy? How?).
  
  My box dials up to the Internet. First, I did a complete freshly 
  install(FreeBSD 4.6 release), create two user(root, qjzhu), hostname 
  is not set in /etc/rc.conf, and /etc/hosts contains
  ::1			localhost localhost.my.domain
  127.0.0.1		localhost localhost.my.domain
  No /etc/mail/relay-domains, no /etc/mail/local-host-names
  Now it's ok for root to send mail to qjzhu with 'mail' MUA.
  /var/log/maillog logs
> Jun 27 00:35:33  sendmail[122]: g5QGZXnA000122: from=root, size=30, class=0,
> nrcpts=1, msgid=<200206261635.g5QGZXnA000122@localhost.my.domain>, relay=
> root@localhost
> Jun 27 00:35:33 sm-mta[123]:g5QGZXWM000123: from=<root@localhost.my.domain>,
> , size=349, class=0, nrcpts=1, msgid=<200206261635.g5QGZXnA000122@localhost.
> my.domain>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
> Jun 27 00:35:33  sendmail[122]: g5QGZXnA000122: to=qjzhu, ctladdr=root 
> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30025, relay=loca
> lhost.my.domain. [127.0.0.1], dsn=2.0.0, stat=Sent (g5QGZXWM000123 Message 
> accepted for delivery)
> Jun 27 00:35:33  sm-mta[124]: g5QGZXWM000123: to=<qjzhu@localhost.my.domain>,

> ctladdr=<root@localhost.my.domain> (0/0), delay=00:00:00, xdelay=00:00:00, 
> mailer=local, pri=30625, relay=local, dsn=2.0.0, stat=Sent

  Then, I add hostname="qjzhu.headsun.net" to /etc/rc.conf,
  change /etc/hosts into
  127.0.0.1		localhost qjzhu.headsun.net
  and in /etc/mail/sendmail.cf I add
  Cwlocalhost qjzhu.headsun.net
  Now root is UNABLE to send mail to qjzhu with 'mail' MUA,
  /var/log/maillog logs
> Jun 27 00:42:20 qjzhu sendmail[122]: g5QGgKcm000122: from=root, size=30, 
> class=0, nrcpts=1, msgid=<200206261642.g5QGgKcm000122@qjzhu.headsun.net>, 
> relay=root@localhost
> Jun 27 00:42:20 qjzhu sendmail[122]: g5QGgKcm000122: to=qjzhu, ctladdr=root 
> (0/0),delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30025, relay=qjzhu.
> headsun.net., dsn=4.0.0, stat=Deferred: Connection refused by qjzhu.headsun.
> net.

  Then I dial up and start fetchmail, sendmail seems ok to receive incoming 
  mails, /var/log/maillog logs:
> Jun 27 00:51:28 qjzhu sm-mta[156]: g5QGpEoe000156: from=<owner-cvs-all@free
> bsd.org>, size=2610, class=-60, nrcpts=1, msgid=<200206261646.g5QGkoSI00090
> 5@freefall.freebsd.org>, proto=ESMTP, daemon=MTA, relay=localhost[127.0.0.1]
> Jun 27 00:51:28 qjzhu sm-mta[175]: g5QGpEoe000156: to=<qjzhu@localhost>, del
> ay=00:00:00, xdelay=00:00:00, mailer=local, pri=140821, relay=local, dsn=2.0
> .0, stat=Sent

 So, what's the reason of "connection refused"? How to resolve? Can anybody
 explain the logs?
 Please shed some light on it. Thanks.


>Alexander V Zubchenko <stalker@hermes-comp.zp.ua> wrote:
>> Also want to notate: in prev. mail in second case (with 'mail' MUA)
>> clearly two moments:
>> a) mailer is relay (not local)
>> b) this may b just mistype in letter, not in real output, but there r
>> relay=localhost.heasun.net not headsun.net
>> 
>> Also i'm not sured it is correct 'Cwlocalhost'. Try to change it to
>> real host name or domainname. Other ideas some later...:)


__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020626173848.46342.qmail>