procmail
[Top] [All Lists]

RE: Error while writing to <mbox file>

2005-10-04 09:31:51

From: mindfuq(_at_)verizon(_dot_)net
Sent: Monday, October 03, 2005 10:47 PM
[...]
It's 91% full.. so no issue there.  

Mutt takes a heck of a long time to load such a huge mbox, so I've
decided to break mythtv posts into quarterly files anyway.  

That's fine, and I do something similar, but I don't think procmail
is having trouble dealing with large mbox's ... it appends to them,
and the OS really doesn't have to work very hard to do that.  Further,
you're locking access to the mbox (as you should) so there is no
contention for the mbox at the OS level.

I'm using
this (abridged) recipe to determine what quarter of a year the post
belongs in:

   :0
   *$ 1^0 ^Date:.*(Jan|Feb|Mar)
   *$ 2^0 ^Date:.*(Apr|May|Jun)
   *$ 3^0 ^Date:.*(Jul|Aug|Sep)
   *$ 4^0 ^Date:.*(Oct|Nov|Dec)
   { STATED_QUARTER = $=}

Good job there ... though keep in mind that the Date field is
at the mercy of the sender.  I'd think about pulling the month
out of the From_ line.


#...a few thousand sloc later...#

   # Mailman and ezmlm lists
   #
   :0
   *$ ^List-Id:.*\/$MAILMAN_ML
   * MATCH ?? ()\/[^\.]+
   {
     LISTNAME=`echo $MATCH | tr '[:upper:]' '[:lower:]'`

     :0 fhw
     | $SED -e "/^Subject:/ s/ *\[$LISTNAME\] */ /I"

     :0:
     *$ ^List-Id:.*mythtv
     
mailing_lists/${LISTNAME:-no_list}_${YEAR:-0000}_QTR${STATED_QUART
ER:-0000}

The $ above is uneeded, probably left over from a previous
incarnation.


     :0:
     mailing_lists/${LISTNAME:-no_list}_${YEAR:-0000}
   }

Hopefully that helps.


I think it won't change anything, JMO.

The fact that the failure is sporadic may indicate that multiple
processes are competing for the same resource and sometimes losing.
Your logfile says the locking worked fine on mbox delivery.  We
should then also consider the log file, which must also be
interlocked.  Check again that the logfile isn't too big (ie, over
quota) or on a file system that is nearly out of space.

It's on the same filesystem.  I actually log each process (and
therefore message) to a seperate file, but the piece of code that
executes at the very beginning before the "LOGFILE = $LOGDIR/$$.log"
instruction executes all gets logged to an initial log file that grew
to 160 megs.  So I rotated that.  


I think the size of the logfile matters little, however contention for
the log file might matter a lot.  Were you doing a fair amount of logging
to the central mail log?  Also, I think this was asked before, but is
your mail and log directory located on an NFS or Samba mount?  Any
possibility that it is getting overloaded?

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail