procmail
[Top] [All Lists]

Re: Not scaling well

2003-09-16 23:00:20

#Define getting the sender's address, Discard any leading and trailing whitespaces
FROM_=`formail -rt -xTo: \
  | expand | sed -e 's/^[ ]*//g' -e 's/[ ]*$//g'`


OMG.  Why all the cruft?  I see a shell, formail, expand, and sed.

Check out '-z' in the formail manpage (i.e. "formail -rtzxTo:")


I have seen this before and (unfortunately) used it-- because I am lazy and this stuff is all over the procmail pages out there on the web:

http://www.uwasa.fi/~ts/info/proctips.html

sed -e 's/^[ ]*//g' -e 's/[ ]*$//g

is mentioned 27 times on this page!

I have noticed on your own page (http://www.professional.org/procmail/sandbox.html) that you have:

        :0
        * ^To:[         ]*\/[^  ].*
        {
                TO=$MATCH
        }

        :0
        * ^From:[       ]*\/[^  ].*
        {
                FROM=$MATCH
        }

Which seems like the way to go....

culley



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

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