procmail
[Top] [All Lists]

Re: Odd error.

1997-03-28 13:57:42
| >I have a problem with my procmail setup, which only occurs sometimes, ie
| >lots of times it works fine.
| >
| >Well here's the recipe I have problem with:
| >======================================================================
| >:0B
| >* 1^1 ^(.|$)
| >{
| >        VAR8 = $=
| >}
| >VAR9 =  `/usr/local/bin/formail -zx from:`
| >VAR10 =  `/usr/local/bin/formail -zx subject:`
| >
| >:0c:lock
| >|echo $VAR8 lines, `/usr/local/gnu/bin/date +%e`/`/usr/local/gnu/bin/date 
+%m`
| /`/usr/local/gnu/bin/date +%y`, `/usr/local/gnu/bin/date 
+%k`:`/usr/local/gnu/b
| in/date +%M`, $VAR9, $VAR10 | gzip >> log.gz
| >======================================================================
| >
| >Please do not commment the layout, it is generated automaticly.
| >It works fine most of the time, but once in a while I get the following
| >message:

| The second recipe needs the 'i' flag, since it doesn't actually read
| the message that procmail tries to feed to it.  
Ok, now I understand the i flag ;-)
but shouldn't the recipe always fail then? (which it doesn't)

| For consistency with
| the rest of the universe you should probably use "log.gz.lock" as the
| lockfile instead of just "lock" (procmail will choose this name
| automatically if you leave the name of the locallockfile empty, and
| just put the second colon in).  
Does it matter? Doesn't it just mean that another process may wait (for no
reason) if it waits for a lock on the file called lock too? Even though it
has to go to a different file.

| You should also fix the automatic
| generator to collapse those date calls into one:
| 
| :0 ci:
| |echo $VAR8 lines, `/usr/local/gnu/bin/date "+%e/%m/%y, %k:%M"`, $VAR9, 
$VAR10 | gzip >>log.gz
I would hope it was that simple, but the tool (The Dotfile Generator)
works in a way, which will make this sort of optimazation hard. The only
alternativ is peekhole optimization, which I do not wish to start on due
to time limits. I doesn't matter that much to me anyway as the tool is
ment for persons with relative few incomming letter (max a few hundred per
day). It's more an issue for me that it will be easy to setup a few
recipes (even for a person who is not used with programming at all), than
that the recipes is optimized.

Kind Regards, and thanks for the answer
Jesper.

-----
Do you need help with configuring those awful dot files?
Please consult 

                  The Dotfile Generator

at http://www.imada.ou.dk/~blackie/dotfile/
help is avilable for bash, elm, emacs, fvwm, procmail, rtin and tcsh.

<Prev in Thread] Current Thread [Next in Thread>