At  6:10 AM EST on March 22 Nicolas Rachinsky sent off:
> * Rob Reid <[EMAIL PROTECTED]> [2002-03-21 19:10:40 -0500]:
> > macro index "H" "|/home/reid/bin/stripmime.pl >> /var/spool/mail/reid"
> 
> What happens if some mail is delivered to your inbox while you are
> executing this macro? I think your mailbox will get corrupt.

I'm not completely sure what happens, but my mail comes in through sendmail
which passes it to procmail.  My reading of the procmail man page indicates
that it locks the inbox when delivering to it.  And the purpose of lockfiles is
to force other processes to wait before writing, right?  Even if no queue is
formed and stripmime's output gets trashed, I can just redo it.

Not that I cared when I wrote the macro.  I was pretty ticked at the time.
More explicit (and therefore more trustworthy) solutions would be to use
procmail with a lock like someone suggested in this thread (but then all HTML
mail gets the treatment) or 

macro index "H" "|stripmime.pl >> dehtmled"

Thanks for the warning.

-- 
All men are mortal.  Socrates was mortal.  Therefore, all men are Socrates.
 - Woody Allen
Robert I. Reid <[EMAIL PROTECTED]>     http://astro.utoronto.ca/~reid/
PGP Key: http://astro.utoronto.ca/~reid/pgp.html

Reply via email to