From owner-freebsd-questions@FreeBSD.ORG Fri Jun 18 15:18:22 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2137E16A4CE for ; Fri, 18 Jun 2004 15:18:22 +0000 (GMT) Received: from internet.potentialtech.com (h-66-167-251-6.phlapafg.covad.net [66.167.251.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id D517F43D39 for ; Fri, 18 Jun 2004 15:18:21 +0000 (GMT) (envelope-from wmoran@potentialtech.com) Received: from working.potentialtech.com (pa-plum1c-102.pit.adelphia.net [24.53.179.102]) by internet.potentialtech.com (Postfix) with ESMTP id 2D8DD69A39; Fri, 18 Jun 2004 11:17:49 -0400 (EDT) Date: Fri, 18 Jun 2004 11:17:47 -0400 From: Bill Moran To: Matthew Seaman Message-Id: <20040618111747.0c73f5f4.wmoran@potentialtech.com> In-Reply-To: <20040618150410.GA82217@happy-idiot-talk.infracaninophile.co.uk> References: <20040617143919.3c0835a5.wmoran@potentialtech.com> <8E443DE8-C090-11D8-A918-003065ABFD92@mac.com> <20040618095722.02ff5a1a.wmoran@potentialtech.com> <20040618150410.GA82217@happy-idiot-talk.infracaninophile.co.uk> Organization: Potential Technologies X-Mailer: Sylpheed version 0.9.10 (GTK+ 1.2.10; i386-portbld-freebsd4.9) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: questions@freebsd.org Subject: Re: Sendmail and /var/spool/mqueue X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jun 2004 15:18:22 -0000 Matthew Seaman wrote: > On Fri, Jun 18, 2004 at 09:57:22AM -0400, Bill Moran wrote: > > Charles Swiger wrote: > > > > > On Jun 17, 2004, at 2:39 PM, Bill Moran wrote: > > > > What does it mean when I have a lot of files in /var/spool/mqueue? I > > > > don't > > > > really understand what that particular queue is for. > > > > > > That is the queue of unsent messages which sendmail will periodicly > > > attempt to resend (every four hours, by default). You can try to flush > > > them via "sendmail -v -q". > > > > I appreciate the input, Chuck, but now I'm more confused. > > > > When I did this, folks suddenly started receiving emails from two years ago. > > I'm a bit confused as to _why_ sendmail would hang on to mails from years ago > > without either delivering them or bouncing them? Could the queue have been > > corrupt? > > Sounds like you aren't running a sendmail process to flush the queue > regularly. Which means that any message that cannot be delivered > immediately will be stuck into the /var/spool/mqueue directory and > forgotten about. > > Look at /var/run/sendmail.pid -- the second line shows what command > line sendmail was started with. Typically it will be something like: > > /usr/sbin/sendmail -L sm-mta -bd -q30m > > (You can't use ps(1) to extract this information, because sendmail is > one of those programs that futzes with its argv[][] array as it runs) > > Unless you have a -qNNN flag in there somewhere, sendmail won't be > processing any queued messages for you. Set this using the > 'sendmail_flags' variable in /etc/rc.conf if necessary, although the > value I've shown is the default. The trailing bit '30m' is how > frequently sendmail attempts to run the queue -- somewhere between 15m > and 30m is best: don't be tempted to set it too short, or you'll not > give any correspondents enough time to sort out any problems their end > before you try re-sending. > > If you end up with a load of messages stuck in > /var/spool/clientmqueue, you've got a similar problem with not running > a MSP queue daemon. The case is exactly analogous, except that the > sendmail flags are in /var/spool/clientmqueue/sm-client.pid and should > read: > > /usr/sbin/sendmail -L sm-msp-queue -Ac -q30m > > and you need to set 'sendmail_msp_queue_flags' in /etc/rc.conf to > override them. Thanks a lot Matthew. All these appear correct (exactly) with what you show. It makes it all the more mystery why these messages are getting hung up. I'm going to keep an eye on the server for a while and see if I can figure anything out. -- Bill Moran Potential Technologies http://www.potentialtech.com