Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Mar 2001 09:50:10 +1100
From:      Tony Landells <ahl@austclear.com.au>
To:        "Aleksandar Simic'" <alex@frustum.clara.co.uk>
Cc:        FreeBSD Questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Local mail sending problem 
Message-ID:  <200103202250.JAA18493@tungsten.austclear.com.au>
In-Reply-To: Message from "Aleksandar Simic'" <alex@frustum.clara.co.uk>  of "Tue, 20 Mar 2001 14:53:21 -0000." <20010320145320.A1844@frustum.clara.co.uk> 

next in thread | previous in thread | raw e-mail | index | archive | help
I'm assuming you're running a fairly new version of FreeBSD (and sendmail).

alex@frustum.clara.co.uk said:
> Thanks but that didn't solve the problem completley. Now instead of
> local mail hanging in the queue forever it "disappears". This is the
> message in /var/log/maillog:

> 8@myname.my.domain>, relay=alex@localhost Mar 20 14:47:03 myname
> sendmail[1768]: f2KEl3J01768: to=root, delay=00:00:00, mailer=local,
> pri=37472, stat=queued Mar 20 14:47:04 myname sendmail[1769]:
> gethostbyaddr(192.168.0.2) failed: 1

> And then it finaly gets sent somewhere, because I don't receive it in
> my mailbox or root's. This is the message: 

> Mar 20 14:47:49 myname sendmail[1801]: f2KEl3J01768: to=root,
> ctladdr=alex (1001/1001), delay=00:00:46, xdelay=00:00:00, mail
> er=local, pri=127472, dsn=2.0.0, stat=Sent
> Mar 20 14:47:56 myname sendmail[1803]: gethostbyaddr(192.168.0.2) failed: 1 

Cool--how broken is this???

The fundamental problem looks like name resolution--do you have anything
that would tell sendmail what 192.168.0.2 is?  Even /etc/hosts should
work, if you've got it enabled on /etc/host.conf...

Well, the message with "stat=Sent" is confirmation that sendmail believes
it has delivered the mail.  Since your original message said you had
set up procmail, you might find more information there...

If you still think something odd is happening, there are two things
you can do for debugging--the first is to run sendmail in debug mode,
but this is rarely useful to people that can't read sendmail.cf.
The other is to check what sendmail is really trying to do with the
mail by either telnetting to port 25 of your machine (assuming you're
running sendmail in daemon mode) or running "sendmail -bs" to put it
in SMTP mode:

$ telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 tungsten.austclear.com.au ESMTP Sendmail 8.11.3/8.11.3; Wed, 21 Mar 2001 09:43:14 +1100 (EST)
expn root
250 Tony Landells <ahl@tungsten.austclear.com.au>
quit
221 tungsten.austclear.com.au closing connection
Connection closed by foreign host.
$

Of course, the default sendmail.cf for FreeBSD doesn't permit the "expn"
command, so you'll need to hack sendmail.cf to make this one work (by
commenting out the line in sendmail.cf that starts "O PrivacyOptions="
but just remember to uncomment it afterwards, and sendmail won't see
your changes unless you restart it).

Personally, to avoid being stupid, I'd make a copy of sendmail.cf and
make the change there, then do the test with

	sendmail -bs -C /tmp/sendmail.cf.copy

(assuming you called the copy /tmp/sendmail.cf.copy).

Cheers,
Tony
-- 
Tony Landells					<ahl@austclear.com.au>
Senior Network Engineer				Ph:  +61 3 9677 9319
Australian Clearing Services Pty Ltd		Fax: +61 3 9677 9355
Level 4, Rialto North Tower
525 Collins Street
Melbourne VIC 3000
Australia



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?200103202250.JAA18493>