Re: Sendmail and /var/spool/mqueue

2004-06-19 Thread Charles Swiger
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.

This client is not having any problems getting/sending mail, and the 
mailq
command only shows one mail in the queue, but I have 3867 files in this
directory.
Hmm.  Sendmail tends to accumulate spam-related bounces which can't be 
delivered because the spam used forged headers, and I've seen some 
signs that sendmail doesn't always manage to clean up the queue files 
of such messages after they can't be delivered for 5 days.

[ I seem to recall that the sendmail operations guide recommends moving 
mqueue to oqueue, creating a new mqueue, and then processing the oqueue 
by hand.  Once that is completed, delete oqueue and any leftover 
files ]

--
-Chuck
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Sendmail and /var/spool/mqueue

2004-06-18 Thread Bill Moran
Charles Swiger [EMAIL PROTECTED] 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?

Caused quite a stir, actually ... folks were getting order requests from a
year ago.

  This client is not having any problems getting/sending mail, and the 
  mailq
  command only shows one mail in the queue, but I have 3867 files in this
  directory.
 
 Hmm.  Sendmail tends to accumulate spam-related bounces which can't be 
 delivered because the spam used forged headers, and I've seen some 
 signs that sendmail doesn't always manage to clean up the queue files 
 of such messages after they can't be delivered for 5 days.
 
 [ I seem to recall that the sendmail operations guide recommends moving 
 mqueue to oqueue, creating a new mqueue, and then processing the oqueue 
 by hand.  Once that is completed, delete oqueue and any leftover 
 files ]

I think this is a good argument for Postfix ...

-- 
Bill Moran
Potential Technologies
http://www.potentialtech.com
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Sendmail and /var/spool/mqueue

2004-06-18 Thread Matthew Seaman
On Fri, Jun 18, 2004 at 09:57:22AM -0400, Bill Moran wrote:
 Charles Swiger [EMAIL PROTECTED] 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.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   26 The Paddocks
  Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614  Bucks., SL7 1TH UK


pgpS2gOtTf39q.pgp
Description: PGP signature


Re: Sendmail and /var/spool/mqueue

2004-06-18 Thread Bill Moran
Matthew Seaman [EMAIL PROTECTED] wrote:
 On Fri, Jun 18, 2004 at 09:57:22AM -0400, Bill Moran wrote:
  Charles Swiger [EMAIL PROTECTED] 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
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Sendmail and /var/spool/mqueue

2004-06-17 Thread Steve Bertrand
 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.

I believe the q is for messages that have failed, but have not yet
expired...don't quote me though.

sb


 This client is not having any problems getting/sending mail, and the mailq
 command only shows one mail in the queue, but I have 3867 files in this
 directory.

 --
 Bill Moran
 Potential Technologies
 http://www.potentialtech.com
 ___
 [EMAIL PROTECTED] mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
 [EMAIL PROTECTED]



___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Sendmail and /var/spool/mqueue

2004-06-17 Thread Jerry McAllister
 
  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.
 
 I believe the q is for messages that have failed, but have not yet
 expired...don't quote me though.

Pretty close. 
All Email messages seem to go their first - anyway, if the mailer doesn't
call sendmail on them right away directly - and then sendmail or whatever 
picks them out of there at its periodic intervals.  

 
 sb
 
  This client is not having any problems getting/sending mail, and the mailq
  command only shows one mail in the queue, but I have 3867 files in this
  directory.

Yah, all those extra messages in the mqueue are most likely ones that 
failed to get delivered for some non-permanent reason.   You can take 
a look at the 'q' files and see where they are supposed to go.  It is 
highly likely that they are bogus in some way and can be nuked.  But, 
it is also possible that some server was temporarily down and they will 
get delivered when it comes back up.

There should be a 'd' file for each 'q' file and vice versa.  We have
had occasions where some seemed to get orphanned with one file but
missing the other.  I don't remember if we ever figured out a reason.
I always nuked any orphans.

jerry

 
  --
  Bill Moran
  Potential Technologies
  http://www.potentialtech.com
  ___
  [EMAIL PROTECTED] mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-questions
  To unsubscribe, send any mail to
  [EMAIL PROTECTED]
 ___
 [EMAIL PROTECTED] mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]