From owner-freebsd-questions@FreeBSD.ORG Fri Jan 4 23:46:18 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6089E16A41B for ; Fri, 4 Jan 2008 23:46:18 +0000 (UTC) (envelope-from pauls@utdallas.edu) Received: from smtp3.utdallas.edu (smtp3.utdallas.edu [129.110.10.49]) by mx1.freebsd.org (Postfix) with ESMTP id 3C96113C465 for ; Fri, 4 Jan 2008 23:46:18 +0000 (UTC) (envelope-from pauls@utdallas.edu) Received: from utd59514.utdallas.edu (utd59514.utdallas.edu [129.110.3.28]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp3.utdallas.edu (Postfix) with ESMTP id 98A2165503 for ; Fri, 4 Jan 2008 17:46:17 -0600 (CST) Date: Fri, 04 Jan 2008 17:46:17 -0600 From: Paul Schmehl To: FreeBSD Questions Message-ID: In-Reply-To: <200801041625.42685.af300wsm@gmail.com> References: <200801011017.21412.af300wsm@gmail.com> <200801021403.18813.af300wsm@gmail.com> <6.0.0.22.2.20080102151441.023c22d8@mail.computinginnovations.com> <200801041625.42685.af300wsm@gmail.com> X-Mailer: Mulberry/4.0.8 (Linux/x86) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Re: sendmail is broken, how do I fix X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 23:46:18 -0000 --On Friday, January 04, 2008 16:25:42 -0700 Andrew Falanga wrote: > 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=, 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 .mc file for > all to read. Heck, I'll post whatever is necessary because this has to be > working. With sendmail generating the errors above, post the results of this: # sockstat | grep ":25" -- Paul Schmehl (pauls@utdallas.edu) Senior Information Security Analyst The University of Texas at Dallas http://www.utdallas.edu/ir/security/