On Mon, 8 Dec 1997, era eriksson wrote: re. my recipe:
TMP=$HOME/tmp$$
:0 chiw:$DEFAULT$LOCKEXT
* (^From foo(_at_)bar [[a-z0-9]+)
* ^Command: sortmail$
| cp $DEFAULT $TMP \
&& cp /dev/null $DEFAULT \
|| echo 'Oops! Your mail may be in $DEFAULT and\or $TMP'
(The echo should use double quotes so that $TMP gets expanded, and
probably redirect echo to standard error with >&2.)
Ok...
:0 aw:$TMP$LOCKEXT
| rm -f $DUPCACHE\
&& cat $TMP|$FORMAIL +0 -I"X-Sortmail: $$" -s $PROCMAIL \
&& rm $TMP \
||echo 'Oops! All of your mail may still be in $TMP'
(Useless Use of Cat Award)
Thanks! but how do ^ _,,,---,,_
aviod it? I have ZZZzzz /,`.-'`' -. ;-;;,_
to feed $TMP to |,4- ) )-,_. ,\ ( `'-'
formail some how. '---''(_/--' `-'\_)
... this recipe should have an i flag, too. Possibly, both of these
recipes should share the same regional lock file.)
Ok on the 'i' flag, but how do I do the regional lockfile? I don't like
the way the first recipe doesn't lock $TMP during the transfer anyway.
("sorted" -- perhaps this somewhat misleading term should be abandoned?)
Only the triggering mail is abandoned, the contents of the mailbox get
'sorted' by procmail.
If I were David, I would really, really try to persuade my admin to
reinstall Procmail and/or fix the permissions on the spool directory
so that this wouldn't be necessary.
I don't have much persuasiveness around here yet... and I rarely run the
script. It's only for when I've turned off procmail and have a mailbox
full of stuff that never got sorted by procmail.
Thanks for help, Era.
David Hunt <dh(_at_)west(_dot_)net>