[TriLUG] more spamassassin, procmail, sendmail

Scott G. Hall ScottGHall at BellSouth.Net
Fri Apr 18 03:21:59 EDT 2003


Turnpike Man <turnpike420 at yahoo.com> wrote:
 > > If you don't use the trailing colon on an "mbox" format file (the
 > > default, traditional Unix mailbox format), you could end up with big
 > > problems if multiple instances of procmail try to write to the folder
 > > at the same time.  (Or if your MUA tries to write to it while procmail
 > > also does.)  The :0: tells it to lock the file, so that nothing else
 > > can write to it while procmail does.  (It releases the lock when it's
 > >  done.)
 > >
 > > You don't need the colon for recipes that don't involve mbox files,
 > > like the $DELIVERTO macro when using procmail on TriLUG, or sending
 > > mail through a pipe to spamassassin, or to /dev/null, etc.
 > >
 > > --Jeremy
 >
 > I think that is more confusing Jeremy, for a lesser like me!  If it
 > locks the file, won't the next process queue up?  I mean, as far as
 > ~/mail/inbox, only one message can be written at a time if it expects to
 > keep order.

If you read the man page for mbox(5), you will find the following section:

UNSPECIFIED DETAILS
       There are many locking mechanisms for mbox files.   qmail-
       local always uses flock on systems that have it, otherwise
       lockf.  On UNIX  sys-V systems,  a  lock file  is  created
       when writing the user's inbox, /var/mail/locks/.$LOGIN
       sendmail and  mailsurr use this method.   Lock  files  for
       $MAIL directory mbox files use the name: mboxname.lock

       The delivery date in a From_ line does not specify a  time
       zone.  qmail-local always creates the delivery date in GMT
       so that mbox files can be safely transported from one time
       zone to another.

       [...]

-- 
Scott G. Hall,
Raleigh, NC, USA
ScottGHall at BellSouth.Net




More information about the TriLUG mailing list