procmail
[Top] [All Lists]

Re: Determining a message's size in Procmail

2006-12-13 06:51:58
=- Ruud H.G. van Tol wrote on Tue 12.Dec'06 at 23:26:34 +0100 -=

Yes, for the embedded recipes, but they have their own h's.
I'll test later and report if procmail complains.

No need yet, thanks, can test myself. ;)

No, because it applies to a "|" not a file. Since there is no
implicit lockfile for pipes, you have to specify one.
And as you noted yourself, $LOCKEXT is implicit.

I interpret this differently, but didn't test:
<quote src="procmailrc(5)"> {...}

Right, somehow I managed to overread the () bit regarding >>.
Thanks to all who pointed (or wanted to ;) this out.

So you've been lucky. ;)

I was talking about a single assignment to LOG. If there are more
  LOG = "blahblah"
occurences, then they can get interleaved by other procmail processes.
That is why I use a $ToLOG that I append to, and only at delivery I do
   LOG = $ToLOG

No disagreement on the multi write-line logging per delivery case.

=- Patrick Shanahan wrote on Tue 12.Dec'06 at 18:14:21 -0500 -=

* Ruud H.G. van Tol <rvtol(_at_)isolution(_dot_)nl> [12-12-06 17:52]:
I was talking about a single assignment to LOG. If there are more
  LOG = "blahblah"
occurences, then they can get interleaved by other procmail processes.
That is why I use a $ToLOG that I append to, and only at delivery I do
   LOG = $ToLOG

Please explain this (in layman terms :^) ).  I frequently observe
mixing data in the $LOGFILE.
LOGFILE="$PMDIR/log"
LOGABSTRACT=all
LOG="$NL++++++++++++++$$+++++++++++++++++$NL"

Hi paka,

as already pointed out by others, with LOGABSTRACT=all you get
multiple write-line operations per delivery logged, but concurrent
deliveries don't lock the logfile, so they can get mixed up.

On the other hand, if instead of using multi write-line operation
logging you use LOGABSTRACT=no single write-line operation per LOG
or TRAP (the written line containing \n: the output is the same in
both cases, just number of operations reduced to 1), then people
believe (or not, in my case ;) that this is corruption safe.

Even though this might be a single write-line operation, still
each char has to be written. Is there some locking active to avoid
char race condition between 2 write-line operations?

-- 
© Rado S. -- You must provide YOUR effort for your goal!
Even if it seems insignificant, in fact EVERY effort counts
for a shared task, at least to show your deserving attitude.

____________________________________________________________
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