Promail recipe help (was [H-CHAT] Re: [H-GEN] Installing multiple Linuxes)
Anthony Towns
aj at azure.humbug.org.au
Mon Oct 7 05:11:18 EDT 2002
On Mon, Oct 07, 2002 at 10:39:40AM +0200, Bruce Campbell wrote:
> You could also do:
> :0
> *^X-Loop: \/[^ ]*@lists.humbug.org.au
> {
> # Grab the match found in the above.
> LISTNAME="$MATCH"
> DUMMY=`test -d $MAILBASE/lists/all || mkdir -p $MAILBASE/lists/all`
> # Seperate it out into files with no dots in the names, and those without.
> :0
> * ^Sender:.*\.\..*
^^^^^^
This should be X-Loop presumably.
Note that \/ sets MATCH to _everything_ after the regexp matches after
the \/, so you end up with LISTNAME="chat at lists.humbug.org.au" which
mightn't be what you want. Another option is:
:0
* ^X-Loop: [a-z_-]*@lists.humbug.org.au
* ^X-Loop: \/[^@]*
list-mail/$MATCH
which will save messages to list-mail/chat, automagically, also avoiding
security problems. You can probably generalise this for Sender: with
something like:
:0
* ^Sender: \/[^./@][^@/]*@[^/][^/]*$
list-mail/$MATCH
You can't mess with stuff outside list-mail since you can't use any "/"es,
and you can't put stuff in hidden files since you can't start with a ".".
You can make horribly named files with spaces and stuff, but those aren't
security risks in and of themselves, and hey, users do that anyway...
Cheers,
aj
--
Anthony Towns <aj at humbug.org.au> <http://azure.humbug.org.au/~aj/>
I don't speak for anyone save myself. GPG signed mail preferred.
``If you don't do it now, you'll be one year older when you do.''
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 350 bytes
Desc: not available
URL: <http://lists.humbug.org.au/pipermail/general/attachments/20021007/e4cf51d7/attachment.sig>
More information about the General
mailing list