HELP! Sendmail 8.12.9 problems up the wazzoo on FreeBSD 4.3....
Steve Camp
steve at camp.com
Thu Aug 21 11:32:04 PDT 2003
Hi,
I am sending / posting this message to
FreeBSD questions mailing list
comp.mail.sendmail newsgroup
sendmail mailing list
possibly other comp.unix.bsd.* newsgroups
I am quite stumped. Any and all help is welcomed. I will be working on this
problem all day. Please feel free to contact me directly at 'steve at camp.com'
if you'd like to help me figure this puzzle out.
Sidenote: I have downloaded/configure/compiled/installed Sendmail 8.12.9
successfully on a Solaris 8 box within the past few weeks. Reading
all the fine documentation and working my way through that install
was painful enough as I found the learning curve pretty steep. Now
I seem to have hit a brick wall doing the same thing on FreeBSD 4.3.
Also... this seemed to be working just this past Tuesday (two days ago).
(Scratch that, it was working when I ran the FreeBSD 4.3 original
sendmail 8.11.3 binary... which I have unfortunately overwritten.)
You can find attached an e-mail I successfully sent myself by telnet'ing
to port 25 from my own domain on that day at the end of this message,
however.
Problem: Freshly compiled Sendmail 8.12.9 is not working on a FreeBSD 4.3
system: it does not accept local outbound mail, nor does it accept
inbound mail. Attempts to telnet to port 25 fail when the
connection is closed instantaneously the moment one hits <return>
after entering "data" on a line by itself.
More specifically, I am getting
"collect: premature EOM: Resource temporarily unavailable"
"collect: I/O error on connection from localhost..." messages.
I have read the fine documentation and cannot figure this out.
I do not believe this to be the FAQ 3.10 problem, nor do I suspect
an MTU problem: telnet, ftp, and ssh all work outbound, and I can
ssh inbound without problem. I do not believe FAQ 3.12 or 3.20 apply
either. In fact, just this past Tuesday (8-19-03), I was able to
successfully telnet to port 25 from an outside domain and successfully
sent myself a message. I can't figure out what changes have been
made that has broken sendmail so badly.
The above "collect:" messages occur whether I am sending mail, receiving
mail, whether I telnet to port 25 on the localhost or from outside
the domain, and whether I attempt to send mail using "Mail" or
/usr/sbin/sendmail (e.g. /usr/sbin/sendmail -fsteve at example.com
steve at somewhere.com). The "errors" occur all the time, 100% of the
time.
Recent changees ivolved tweaking some of the .mc files, but the
resulting files (shown below) seem OK to me. There is a mix of old
and new files in /etc/mail. Could this be a problem? Could a mix
of 8.12.9 binaries and older binaries still on the system (e.g.
mail.local) be causing these kinds of problems? But that doesn't
make sense... because telnet'ing to port 25 always fails now.
Grrrr....
As this system is running FreeBSD 4.3, and I do not have the complete
set of FreeBSD 4.3 CDROMs, and efforts to install the latest sendmail
8.12.9 from packages fails (because apparently FBSD 4.3 is somehow incomp-
atible with the current packages), I downloaded the source from
sendmail.org, and compiled it. I also downloaded, compiled and
installed the following prior to building sendmail:
m4 (GNU)
OpenSSL 0.9.7b 10 Apr 2003
Bind 9.2.2
BerkeleyDB.4.1
A sample of the messages I am getting follows. These messages
as shown in the following /var/log/maillog (FreeBSD 4.3) logfile:
Aug 21 06:17:26 city sendmail[1965]: h7LCHQvI001965: from=steve, size=41, \
class=0, nrcpts=1, msgid=<200308211217.h7LCHQvI001965 at city.example.com>\
, relay=steve at localhost
Aug 21 06:17:26 city sendmail[1966]: h7LCHQJF001966: collect: premature EOM: \
Resource temporarily unavailable
Aug 21 06:17:26 city sendmail[1966]: h7LCHQJF001966: SYSERR(root): collect: \
I/O error on connection from localhost, from=<steve at city.example.com>
Aug 21 06:17:26 city sendmail[1966]: h7LCHQJF001966: \
from=<steve at city.example.com>, size=0, class=0, nrcpts=1, proto=ESMTP, \
daemon=MTA, relay=localhost [127.0.0.1]
Aug 21 06:17:26 city sendmail[1965]: h7LCHQvI001965: to=steve at camp.com, \
ctladdr=steve (1024/20), delay=00:00:00, xdelay=00:00:00, mailer=relay, \
pri=30034, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection \
reset by [127.0.0.1]
NOTE: The "collect: premature EOM: Resource temporarily unavailable" and
"collect: I/O error on connection from..." occur no matter whether I
telnet localhost 25 (from the server itself)
telnet city.example.com 25 (from outside the domain)
Mail steve at city.example.com (from outside the domain)
Mail steve at camp.com (from the server city.example.com
itself)
When telnet'ing to port 25... the errors occur immediately (instantaneously)
after I hit the <return> key after having typed "data" on a line by itself.
Question(s):
(1) I *have* recently made some changes to hostnames in /etc/hosts and
/etc/rc.conf... Could some kind of a namespace collision / namespace
mismatch be causing the sudden demise of collect() ?
I have tried tweaking some /etc/hosts entries, and have modified the
external DNS server to match the name on the external interface, to
no effect. That is:
city-gw.example.com xx.xx.xx.xx (matches in /etc/hosts and DNS)
city.example.com 10.0.0.yy (in /etc/hosts only)
/etc/resolv.conf:
search some.server.clients_isp.net
nameserver uu.uu.uu.uu
nameserver tt.tt.tt.tt
NOTE: "clients_isp.net" is a different domain than my clients
domain for which I use "example.com" in this message.
/etc/host.conf:
# $FreeBSD: src/etc/host.conf,v 1.6 1999/08/27 23:23:41 peter Exp $
# First try the /etc/hosts file
hosts
# Now try the nameserver next.
bind
# If you have YP/NIS configured, uncomment the next line
# nis
(2) Has anyone compiled Sendmail 8.12.9 from scratch and been successful
installing it on FreeBSD 4.x ? Did you discover any gotchas?
(3) What other debugging commands can I run to try go get to the root of
this problem short of running sendmail in gdb? Or is that what it is
going to take? If so... can anyone point me to gdb crash-course
(pun intended) ... it has been awhile: in particular... can you
describe briefly how I would start sendmail in the debugger and have
it run normally otherwise? Can someone refresh my tired memory on
how I would set a breakpoint in the collect() routine?
Is it this easy:
sudo gdb /usr/sbin/sendmail -bD -q15m
or should I try:
sudo gdb /usr/sbin/sendmail -bD -qf
???
(4) Could a mismatch of original FreeBSD 4.3 binaries / new Sendmail 8.12.9
freshly compiled binaries be interacting in some unforeseen way to
cause these problems?
I am guessing no... because I get the collect: errors ALL the time,
even when I start sendmail binary by hand ( e.g. sudo /usr/sbin/
sendmail -bd -q15m) and then telnet to port 25...
Details:
Sendmail 8.12.9 downloaded from www.sendmail.org and compiled w/ OS native
compiler.
System : Generic PC (Pentium III 866Mhz)
OS : FreeBSD 4.3
Executables: elf
Compiler : FreeBSD 4.3 cc (gcc 2.95.3 ?)
% sudo /usr/sbin/sendmail -d0.1 -bt < /dev/null
Version 8.12.9
Compiled with: DNSMAP LOG MAP_REGEX MATCHGECOS MIME7TO8 MIME8TO7
NAMED_BIND NETINET NETUNIX NEWDB NIS PIPELINING SCANF USERDB
XDEBUG
============ SYSTEM IDENTITY (after readcf) ============
(short domain name) $w = city
(canonical domain name) $j = city.example.com
(subdomain name) $m = example.com
(node name) $k = city.example.com
========================================================
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
ldd /usr/sbin/sendmail
/usr/sbin/sendmail:
libdb-4.1.so => /usr/local/BerkeleyDB.4.1/lib/libdb-4.1.so (0x280de000)
libbind.so.1 => /usr/local/lib/libbind.so.1 (0x2817a000)
libutil.so.3 => /usr/lib/libutil.so.3 (0x281bc000)
libc_r.so.4 => /usr/lib/libc_r.so.4 (0x281c5000)
libc.so.4 => /usr/lib/libc.so.4 (0x28278000)
[ sendmail/devtools/Site/site.config.m4 ]
dnl
dnl Use Sleepycat's newdb db 4.1.25 database
dnl
dnl define(`confMAPDEF', `-DNEWDB -DDNSMAP')
APPENDDEF(`confINCDIRS', `-I/usr/local/include -I/usr/local/ssl/include')
APPENDDEF(`confINCDIRS', `-I/usr/local/bind/include -I/usr/local/\
BerkeleyDB.4.1/include')
APPENDDEF(`confLIBDIRS', `-L/usr/local/ssl/lib -L/usr/local/lib')
APPENDDEF(`confLIBDIRS', `-L/usr/local/BerkeleyDB.4.1/lib')
PREPENDDEF(`confLIBSEARCHPATH', `/usr/local/BerkeleyDB.4.1/lib \
/usr/local/ssl/lib /usr/local/lib')
[ sendmail/devtools/Site/site.FreeBSD.m4 ]
APPENDDEF(`confLIBS', `-ldb-4.1 -lc_r')
snippet from my last build log:
cc -O -I. -I../../include -I/usr/local/include -I/usr/local/ssl/include \
-I/usr/local/bind/include -I/usr/local/BerkeleyDB.4.1/include -DNEWDB \
-DNEWDB -DNIS -DMAP_REGEX -c util.c
cc -O -I. -I../../include -I/usr/local/include -I/usr/local/ssl/include \
-I/usr/local/bind/include -I/usr/local/BerkeleyDB.4.1/include -DNEWDB \
-DNEWDB -DNIS -DMAP_REGEX -c version.c
cc -o sendmail \
-L/usr/local/ssl/lib -L/usr/local/lib -L/usr/local/BerkeleyDB.4.1/lib \
main.o alias.o arpadate.o bf.o collect.o conf.o control.o convtime.o \
daemon.o deliver.o domain.o envelope.o err.o headers.o macro.o map.o mci.o \
milter.o mime.o parseaddr.o queue.o readcf.o recipient.o sasl.o savemail.o \
sfsasl.o shmticklib.o sm_resolve.o srvrsmtp.o stab.o stats.o sysexits.o \
timers.o tls.o trace.o udb.o usersmtp.o util.o version.o \
< snip >/sendmail/sendmail-8.12.9/obj.FreeBSD.4.3-RELEASE.i386/libsmutil/libsmutil.a\
< snip >/sendmail/sendmail-8.12.9/obj.FreeBSD.4.3-RELEASE.i386/libsm/libsm.a \
-ldb -lbind -lutil -ldb-4.1 -lc_r
[ sendmail/cf/cf/sendmail.mc ]
VERSIONID(`$Id: generic-bsd4.4.mc,v 8.10 1999/02/07 07:26:02 gshapiro Exp $')
OSTYPE(`freebsd4')dnl
DOMAIN(`Example.COM')dnl
FEATURE(`nouucp', `reject')dnl
MASQUERADE_AS(`example.com')dnl
FEATURE(`masquerade_envelope')dnl
MAILER(local)dnl
MAILER(smtp)dnl
[ sendmail/cf/domain/Example.COM.m4 ]
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')
% ifconfig -a
rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet xx.xx.xx.20 netmask 0xfffffff0 broadcast xx.xx.xx.31
ether 00:48:54:88:22:01
media: autoselect (none) status: active
supported media: autoselect 100baseTX <full-duplex> 100baseTX \
10baseT/UTP <full-duplex> 10baseT/UTP 100baseTX <hw-loopback>
rl1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet 10.0.0.yy netmask 0xffffff00 broadcast 10.0.0.255
ether 00:48:54:88:49:65
media: autoselect (100baseTX <full-duplex>) status: active
supported media: autoselect 100baseTX <full-duplex> 100baseTX \
10baseT/UTP <full-duplex> 10baseT/UTP 100baseTX <hw-loopback>
faith0: flags=8000<MULTICAST> mtu 1500
gif0: flags=8011<UP,POINTOPOINT,MULTICAST> mtu 1280
inet 10.0.0.yy --> 10.0.1.yy netmask 0xffffff00
gif1: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
gif2: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
gif3: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet 127.0.0.1 netmask 0xff000000
city.example.com% ls -l /bin/*ail*
-r-xr-xr-x 1 root wheel 11408 Apr 21 2001 /bin/rmail.orig (NOTE: OLD)
city.example.com% ls -l /sbin/*ail*
ls: No match.
city.example.com% ls -l /usr/sbin/*ail*
-r-xr-xr-x 1 root wheel 10732 Apr 21 2001 /usr/sbin/ctm_rmail
-r-xr-xr-x 1 root wheel 8928 Apr 21 2001 /usr/sbin/ctm_smail
-r-xr-xr-x 1 root wheel 3508 Apr 21 2001 /usr/sbin/jail
-r-xr-xr-x 1 bin bin 67866 Aug 19 15:54 /usr/sbin/mailstats (NEW - sm 8.12.9)
-r-xr-xr-x 1 root wheel 8204 Apr 21 2001 /usr/sbin/mailstats.orig (OLD)
-r-xr-xr-x 1 root wheel 4928 Apr 21 2001 /usr/sbin/mailwrapper (OLD)
-r-xr-xr-x 1 root wheel 4928 Apr 21 2001 /usr/sbin/mailwrapper.bakup.20030806 (OLD)
-r-xr-sr-x 1 root smmsp 558548 Aug 19 15:54 /usr/sbin/sendmail (NEW - sm 8.12.9)
-r-xr-sr-x 1 root smmsp 558548 Aug 7 06:02 /usr/sbin/sendmail_8.12.9 (NEW - sm 8.12.9)
city.example.com% sum /usr/sbin/sendmail*
50268 546 /usr/sbin/sendmail
50268 546 /usr/sbin/sendmail_8.12.9
city.example.com% ls -l /usr/bin/*ail*
-r-xr-xr-x 2 root wheel 65548 Apr 21 2001 /usr/bin/Mail (OLD)
-r-xr-xr-x 2 root wheel 65548 Apr 21 2001 /usr/bin/mail (OLD)
lrwxr-xr-x 1 root wheel 18 Aug 19 15:54 /usr/bin/mailq -> /usr/sbin/sendmail
city.example.com% ls -l /usr/local/bin/*ail* (NOTHING sendmail here!)
-r-xr-xr-x 1 root wheel 1343756 Apr 18 2001 /usr/local/bin/kmail
-r-xr-xr-x 1 root wheel 138152 Apr 18 2001 /usr/local/bin/kmailcvt
-r-xr-xr-x 1 root wheel 4272 Apr 18 2001 /usr/local/bin/kmailservice
-r-xr-xr-x 1 root wheel 41420 Apr 18 2001 /usr/local/bin/ksendbugmail
-r-xr-xr-x 1 root wheel 10376 Apr 18 2001 /usr/local/bin/thumbnail
city.example.com% ls -l /usr/local/sbin/*ail*
ls: No match.
city.example.com% ls -l /etc/mail
total 210
-rw-r--r-- 1 root wheel 3999 Apr 21 2001 Makefile
-rw-r--r-- 1 root wheel 840 Apr 21 2001 README
-rw-r--r-- 1 root wheel 411 Apr 21 2001 access.sample
-rw-r--r-- 1 root wheel 1410 Apr 21 2001 aliases
-rw-r--r-- 1 root wheel 24576 Aug 19 08:19 aliases.db
drwxr-xr-x 2 root wheel 512 Aug 19 08:09 bak
-rw-r--r-- 1 root wheel 46619 Apr 21 2001 freebsd.cf
-rw-r--r-- 1 root wheel 4221 Apr 21 2001 freebsd.mc
-r--r--r-- 1 bin bin 5588 Aug 19 15:54 helpfile
-rw-r--r-- 1 root wheel 97 Aug 19 08:13 local-host-names
-rw-r--r-- 1 root wheel 245 Apr 21 2001 mailertable.sample
-rw-r--r-- 1 root wheel 33 Aug 21 08:13 relay-domains
-r--r--r-- 1 root bin 38660 Aug 19 15:54 sendmail.cf
-r--r--r-- 1 root wheel 39135 Aug 7 06:01 sendmail.cf.new
-rw------- 1 root bin 0 Aug 19 15:54 statistics
-r--r--r-- 1 root bin 38844 Aug 19 15:54 submit.cf
-rw-r--r-- 1 root wheel 573 Apr 21 2001 virtusertable.sample
% ls -l /usr/sbin | grep "Aug 19"
-r-xr-xr-x 1 bin bin 77980 Aug 19 15:54 editmap
-r-xr-xr-x 1 bin bin 67866 Aug 19 15:54 mailstats
-r-xr-xr-x 1 bin bin 81199 Aug 19 15:54 makemap
-r-xr-xr-x 1 bin bin 80173 Aug 19 15:54 praliases
-r-xr-sr-x 1 root smmsp 558548 Aug 19 15:54 sendmail
[ NOTE: Aug 19 was the last time I had run "sudo sh ./Build install"
from the sendmail build directory. ]
city.example.com% cat /etc/mail/local-host-names
example.com
mail.example.com
city.example.com
gw.example.com
city
gw
city.example.com% cat /etc/mail/relay-domains
example.com
otherexample.net
[ E-mail that worked on Tuesday before this got screwed up: ]
From steve at somewhere.com Tue Aug 19 07:24:25 2003
Return-Path: <steve at somewhere.com>
Received: from somewhere.com (ulster.somewhere.com [###.###.##.##])
by gw1.example.com (8.11.3/8.11.3) with SMTP id h7JDN9s86276
for steve at gw1.example.com; Tue, 19 Aug 2003 07:23:47 -0600 (MDT)
(envelope-from steve at somewhere.com)
Date: Tue, 19 Aug 2003 07:23:47 -0600 (MDT)
From: steve at somewhere.com
Message-Id: <200308191323.h7JDN9s86276 at gw1.example.com>
Subject: test from somewhere.com (port 25)
To: undisclosed-recipients:;
Test to 'steve at gw1.example.com'
From steve at somewhere.com
Telnet port 25
NOTE: NEVERMIND... this was sendmail 8.11.3... so it was working with
the /etc/mail/* files *before* I put the 8.12.9 binary in place.
Unfortunately... I overwrote the original FreeBSD 4.3
/usr/sbin/sendmail binary.
Sorry this is so long. I've endeavoured to be as complete and thorough as possible.
Please feel free to contact me at 'steve at camp.com' with any questions, suggestions
etc.
--
Steve Camp
steve at camp.com
More information about the freebsd-questions
mailing list