procmail
[Top] [All Lists]

Re: procmail blues: half-shod solution...

2002-12-30 07:59:55
# username (I assume this was what your MUSER variable was supposed to be -
# in a review of the logs from an initial test though, your MUSER was almost
# ALWAYS empty).
:0
* FROM ?? ^\/[^(_at_)]+
{
         MUSER=$MATCH
}


Ah I see, I just sent a mail asking how to do the domain thing as below, I
still don't undertand how it works... but the MUSER is actually the FROM
in the cases when I want to use it:

UserName <login>

Is when it's sent from within the system, so the FROM won't have a @ and
the FROM itself should hopefully be the username, this bit isn't needed in
my case.

# domain
:0
* FROM ?? @\/.*
{
         DOMAIN=$MATCH
}

Like I said - thanks! This works but I still don't understand why :(
What's with the ?? ? why isn't there a \/ before the @?

The big time suck with your recipe is in using AWK, which is abysmally
slow.  It may be versatile, but I use it only for onesey-twosie things,
never for a frequent process (and even there, I'm more likely to churn out
a perl script to do the task).

I see the time's for your system! I like the method without calling
formail or awk which works great, the from is extracted with a match on
^^From, like I said in another reply, if it's from a list it doesn't
matter if From=list and From:=poster as it will end up in the same box
anyway when I grep for Precedence: List and that kind of stuff

AWK I always imagined mightily faster than the "bloat" of perl - in fact
it's the reason I started messing with it when I wrote a script for doijng
something mundane like parsing /tmp dumps in perl - which was SLOW and
then wrote it in awk which was very very fast - mainly as I was using
arrays and file handles... But then, I don't know much about all of this
;)

Luckily for me (he says :) this system is running dual 64bit alphas with a
"combined processing power" (I don't write this stuff) of 21.1 glfops -
apparently my pentium is about 3glops or something, no, 2 I think...
doesn't make much sense to me!

However, when there's a large user load things can really slow down so
thanks!

Yeah, thanks for all the time you're putting into this. When I'm done I'll
hopefully have an ok procmail rc :)

Poff

poff(_at_)sixbit(_dot_)org
SDF Public Access UNIX System - http://sdf.lonestar.org


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