Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Apr 2001 21:02:08 -0500 (CDT)
From:      Sean Farley <sean-freebsd@farley.org>
To:        <freebsd-net@freebsd.org>
Subject:   Sendmail outgoing bind() fails on PPP
Message-ID:  <20010426205613.L28093-100000@thor.farley.org>

next in thread | raw e-mail | index | archive | help
I previously posted this on comp.mail.sendmail and freebsd-questions.
After no answer and some extra testing, I believe this probably belongs
here.

--------

I need some help debugging a problem I am having with setting up Sendmail.
Previously, I have been using Exim, but I have decided to try my hand with
a different MTA.  :)

Here is the error I just cannot seem to get around (with indenting):

Apr 21 16:10:14 gw sendmail[1985]: starting daemon (8.11.2):
                SMTP+queueing@00:30:00
Apr 21 16:10:15 gw sendmail[1986]: f3LK0XL00702: SYSERR(root):
                makeconnection: cannot bind socket [216.140.158.72]:
                Invalid argument
Apr 21 16:10:15 gw sendmail[1986]: f3LK0XL00702: to<ME@blackhat.net>,
                delay1:09:42, xdelay0:00:01, maileresmtp, priR80326,
                relaymail.blackhat.net. [216.140.158.10], dsn4.0.0,
                stat=Deferred: Invalid argument

My setup consists of FreeBSD-4.2, Sendmail v8.11.2, a multi-home system
with a cable modem, analog modem, and a LAN.

I only wish it to receive on the LAN (192.168.1.0) and the analog modem
(216.140.158.72).  This is easy to change (DAEMON_OPTIONS), but I just
can't get confCLIENT_OPTIONS to work.  From looking at sendmail.cf, I can
see that it is being set:

# SMTP client options
O ClientPortOptions=Family=inet, Addr=216.140.158.72

Here are my files, interfaces, and routing tables.  I have Exim working
with this, but I would like to get sendmail running.  Also, I use IP
Filter to actually route the packets from the cable modem over to the
analog modem, but this is not the problem.


sendmail.mc:
divert(-1)
# Lots of comments.  :)
divert(0)dnl
VERSIONID(`@(#)freebsd.mc	$Revision: 1.4.2.1 $')
OSTYPE(bsd4.4)
DOMAIN(generic)
FEATURE(relay_entire_domain)
FEATURE(`dnsbl')
FEATURE(`always_add_domain')

define(`confCLIENT_OPTIONS', `Addr=216.140.158.72')
define(`confNO_RCPT_ACTION', `add-to-undisclosed')
define(`confPRIVACY_FLAGS', `authwarnings,novrfy')
define(`confDONT_PROBE_INTERFACES', `true')
MODIFY_MAILER_FLAGS(`LOCAL', `+S')

dnl Mailers.
MAILER(local)
MAILER(smtp)


ifconfig -a:
vx0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        inet6 fe80::220:afff:fef0:e85d%vx0 prefixlen 64 scopeid 0x1
        inet 66.25.132.129 netmask 0xfffffc00 broadcast 255.255.255.255
        ether 00:20:af:f0:e8:5d
ed0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        inet 192.168.1.2 netmask 0xffffff00 broadcast 192.168.1.255
        inet6 fe80::200:c0ff:fec2:cfdd%ed0 prefixlen 64 scopeid 0x2
        inet6 fec0::1:200:c0ff:fec2:cfdd prefixlen 64
        inet6 fec0:0:0:1:: prefixlen 64 anycast
        ether 00:00:c0:c2:cf:dd
faith0: flags=8041<UP,RUNNING,MULTICAST> mtu 1500
        inet6 fe80::220:afff:fef0:e85d%faith0 prefixlen 64 scopeid 0x3
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
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
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x8
        inet6 ::1 prefixlen 128
        inet 127.0.0.1 netmask 0xff000000
ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
stf0: flags1<UP> mtu 1280
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
        inet6 fe80::220:afff:fef0:e85d%tun0 --> :: prefixlen 64 scopeid 0xb
        inet 216.140.158.72 --> 216.140.158.15 netmask 0xffffff00
        Opened by PID 139


netstat -nr:
Routing tables

Internet:
Destination        Gateway            Flags     Refs     Use     Netif
Expire
default            66.25.132.1        UGSc       21     1303      vx0
66.25.132/22       link#1             UC          0        0      vx0 >
66.25.132.1        0:30:7b:f8:3c:8c   UHLW       19        0      vx0 1175
127.0.0.1          127.0.0.1          UH          3     1456      lo0
192.168.1          link#2             UC          0        0      ed0 >
192.168.1.2        0:0:c0:c2:cf:dd    UHLW        0    22511      lo0
192.168.1.5        0:a0:cc:53:1:43    UHLW        2     3873      ed0  686
192.168.1.255      ff:ff:ff:ff:ff:ff  UHLWb       3       81      ed0
216.140.158.15     216.140.158.72     UH          0        0     tun0

Internet6:
Destination                       Gateway            Flags      Netif
Expire
::/96                             ::1                UGRSc       lo0
::1                               ::1                UH          lo0
::ffff:0.0.0.0/96                 ::1                UGRSc       lo0
fe80::/10                         ::1                UGRSc       lo0
fe80::%vx0/64                     link#1             UC          vx0
fe80::%ed0/64                     link#2             UC          ed0
fe80::%faith0/64                  link#3             UC       faith0
fe80::%lo0/64                     fe80::1%lo0        Uc          lo0
fe80::%tun0/64                    link#11            UC         tun0
fe80::220:afff:fef0:e85d%tun0     ::1                UH          lo0
fec0:0:0:1::/64                   link#2             UC          ed0
fec0::1:200:c0ff:fec2:cfdd        0:0:c0:c2:cf:dd    UHLW        lo0
fec0::1:2a0:ccff:fe53:143         0:a0:cc:53:1:43    UHLW        ed0
ff01::/32                         ::1                U           lo0
ff02::/16                         link#1             UCS         vx0
ff02::%vx0/32                     link#1             UC          vx0
ff02::%ed0/32                     link#2             UC          ed0
ff02::%faith0/32                  link#3             UC       faith0
ff02::%lo0/32                     fe80::1%lo0        UC          lo0
ff02::%tun0/32                    link#11            UC         tun0


I am now using FreeBSD-4.3 with Sendmail v8.11.3 without any change.  I
even wrote a little program to see if everything was going alright.  With
my test program I am able to bind a random port with a problem.  It just
appears Sendmail does not want to.

Using GDB I compared the two sockaddr_in structures in my program and
Sendmail (daemon.c:2095).  The values were exactly the same.

I just don't see why this bind would fail on the PPP device and not the
ethernet cards.  Hopefully, this problem is user-oversight and someone
sees what it is. <hint, hint>.  :)


TIA,

Sean
-----------------------
sean-freebsd@farley.org
PGP key:  http://www.farley.org/~sean/pgp.key



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




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