Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Jan 2008 16:25:42 -0700
From:      Andrew Falanga <af300wsm@gmail.com>
To:        Derek Ragona <derek@computinginnovations.com>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: sendmail is broken, how do I fix
Message-ID:  <200801041625.42685.af300wsm@gmail.com>
In-Reply-To: <6.0.0.22.2.20080102151441.023c22d8@mail.computinginnovations.com>
References:  <200801011017.21412.af300wsm@gmail.com> <200801021403.18813.af300wsm@gmail.com> <6.0.0.22.2.20080102151441.023c22d8@mail.computinginnovations.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 02 January 2008 14:18:53 Derek Ragona wrote:
> At 03:03 PM 1/2/2008, Andrew Falanga wrote:
> > > While you think there is nothing on that port something is running not
> > > letting that socket connection.  Try rebooting the system and see if
> > > the problem is still there.
> > >
> > >          -Derek
> >
> >I did try that too.  Didn't work.
>
> Have you tried telnet to the IP and port 25?  If it is sendmail, you can
> see that from the banner, also you can watch the maillog file in /var/log.
>
> I suspect you have another process tying up that port.
>
>          -Derek

The problem seems to be sendmail itself.  Here's what I've done to isolate the 
problem.

1) changed /etc/rc.conf to NOT start sendmail or anything mail related
      -- sendmail (external stuff, the local daemon still starts in
                           /etc/defaults/rc.conf)
      -- dovecot
      -- saslauthd

    I know that saslauthd isn't exactly mail related but I installed it for 
sendmail

2) rebooted the computer (and verified that it did actually reboot by using 
uptime).  I'm not sitting in front of this computer, I'm "ssh-ing" into it.

3) once restarted, I wrote a little C program to open a socket and then bind 
the ip address 192.168.2.23 (the machines IP) and port 25 to that socket.  
The effectiveness of this program was verified using sockstat.  If necessary, 
I will post the source code, but didn't see much need to now.  The program 
worked and the bind(2) call made no complaints.

4) Stopped ALL sendmail processes (/etc/rc.d/sendmail stop)

5) edited /etc/rc.conf and re-enabled the "external" sendmail process

6) Started sendmail and now see the exact same problems in /var/log/maillog:  
see below

Jan  4 17:36:42 whitbap sm-mta[975]: starting daemon (8.13.8): 
SMTP+queueing@00:30:00
Jan  4 17:36:42 whitbap sm-mta[975]: NOQUEUE: SYSERR(root): opendaemonsocket: 
daemon MTA: cannot bind: Address already in use
Jan  4 17:36:42 whitbap sm-mta[975]: daemon MTA: problem creating SMTP socket
Jan  4 17:36:42 whitbap sm-msp-queue[979]: starting daemon (8.13.8): 
queueing@00:30:00
Jan  4 17:36:42 whitbap sm-mta[978]: m010sNBM004564: 
to=<jqyuehutmqluz@epilot.com>, delay=3+23:42:19, xdelay=00:00:00, 
mailer=esmtp, pri=2555114, relay=mail02.interchangeusa.com. [63.251.210.81], 
dsn=4.0.0, stat=Deferred: Connection refused by mail02.interchangeusa.com.
Jan  4 17:36:47 whitbap sm-mta[975]: NOQUEUE: SYSERR(root): opendaemonsocket: 
daemon MTA: cannot bind: Address already in use
Jan  4 17:36:47 whitbap sm-mta[975]: daemon MTA: problem creating SMTP socket
Jan  4 17:36:52 whitbap sm-mta[975]: NOQUEUE: SYSERR(root): opendaemonsocket: 
daemon MTA: cannot bind: Address already in use
Jan  4 17:36:52 whitbap sm-mta[975]: daemon MTA: problem creating SMTP socket
Jan  4 17:36:57 whitbap sm-mta[975]: NOQUEUE: SYSERR(root): opendaemonsocket: 
daemon MTA: cannot bind: Address already in use
Jan  4 17:36:57 whitbap sm-mta[975]: daemon MTA: problem creating SMTP socket
Jan  4 17:37:02 whitbap sm-mta[975]: NOQUEUE: SYSERR(root): opendaemonsocket: 
daemon MTA: cannot bind: Address already in use
Jan  4 17:37:02 whitbap sm-mta[975]: daemon MTA: problem creating SMTP socket
Jan  4 17:37:07 whitbap sm-mta[975]: NOQUEUE: SYSERR(root): opendaemonsocket: 
daemon MTA: cannot bind: Address already in use
Jan  4 17:37:07 whitbap sm-mta[975]: daemon MTA: problem creating SMTP socket
Jan  4 17:37:12 whitbap sm-mta[975]: NOQUEUE: SYSERR(root): opendaemonsocket: 
daemon MTA: cannot bind: Address already in use
Jan  4 17:37:12 whitbap sm-mta[975]: daemon MTA: problem creating SMTP socket
Jan  4 17:37:17 whitbap sm-mta[975]: NOQUEUE: SYSERR(root): opendaemonsocket: 
daemon MTA: cannot bind: Address already in use
Jan  4 17:37:17 whitbap sm-mta[975]: daemon MTA: problem creating SMTP socket
Jan  4 17:37:22 whitbap sm-mta[975]: NOQUEUE: SYSERR(root): opendaemonsocket: 
daemon MTA: cannot bind: Address already in use
Jan  4 17:37:22 whitbap sm-mta[975]: daemon MTA: problem creating SMTP socket
Jan  4 17:37:27 whitbap sm-mta[975]: NOQUEUE: SYSERR(root): opendaemonsocket: 
daemon MTA: cannot bind: Address already in use
Jan  4 17:37:27 whitbap sm-mta[975]: daemon MTA: problem creating SMTP socket
Jan  4 17:37:32 whitbap sm-mta[975]: NOQUEUE: SYSERR(root): opendaemonsocket: 
daemon MTA: cannot bind: Address already in use
Jan  4 17:37:32 whitbap sm-mta[975]: daemon MTA: problem creating SMTP socket
Jan  4 17:37:32 whitbap sm-mta[975]: NOQUEUE: SYSERR(root): opendaemonsocket: 
daemon MTA: server SMTP socket wedged: exiting

What does one do when sendmail is it's own worst enemy?

Any help is greatly appreciated because I don't understand at all what I could 
have done to this.  If necessary, I'll post my <hostname>.mc file for all to 
read.  Heck, I'll post whatever is necessary because this has to be working.

Andy



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