procmail
[Top] [All Lists]

Re: Filtering outputs from multiple machines.

2000-08-14 15:59:51

An excellent starting point, Collin, thankyou... I adapted the recipe you
sent (I changed the '$FOLDER/.' to simply '$FOLDER'.

One thing I am curious of though, and it's perhaps my inability to
comprehend regexps without suffering brain overload, but the $MATCH
variable only seems to contain the project name, rather than the host
name. Continuing with the analogy below, $MATCH always seems to contain
zenith, no matter if the originating host is zenith-ny01, zenith-ga02 or
zenith-fl23.

How can I get $MATCH to be the hostname (e.g. zenith-ny01) rather than
just the project?

On Mon, 14 Aug 2000, Collin Park wrote:

I'd like procmail to be able to read the from line, and then shovel all
mail from each project into it's own folder. For instance, mail coming
from zenith-ny01, zenith-ga02 and zenith-fl23 will all be pushed into the
zenith folder. Anything else should be dropped in my inbox

Does anyone have any hints for a suitable recipie?

The following is completely untested but might be a starting point

    :0
    * ^Subject:.*cron
    * ^From (_dot_)*(_at_)\/[a-z0-9]+
    {
        FOLDER=$MATCH

        :0
        $FOLDER/.
    }


-- 
Steven Harrison
Unix Systems Administrator
US West, Seattle

B Integer out of range, 0:1



_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail