procmail
[Top] [All Lists]

Re: Limiting extraction with \/

1999-01-07 01:29:40
|Wed 1999-01-06 Bill McClatchie <wmcclatc(_at_)primenet(_dot_)com> list.procmail
| I am re-doing most of my procmail filters; and have been using the
| following for most of my mailing lists.  How can I eliminate the sed
| command?
| 
| :0:
| * ^From[      ]owner-\/.*@
| {
|         LIST=`echo $MATCH|sed -e 's/@/\.gz/'`
| 
|         :0 w:
|         |gzip -fc >> $LIST
| }
| 
| I know its basic, but it compleately eludes me at this time.  

May I recommend you to use procmail list detection module: 

-- List detection is done with procmail means (efficient and fast)
-- no external processes
-- it will detect any new mailing list you may subscribe to in the future

Send message. See file Server in my X-info header and get pm-code.shar.

The sed command can be avoided with

    :0
    * LIST ?? ^^\/[^(_at_)]+
    {
        name = $MATCH
    }


    LIST = "$name.gz"

jari

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