procmail
[Top] [All Lists]

Re: Extracting Email Address In From: Field

1997-05-25 23:55:00
On Mon, 26 May 1997, era eriksson wrote:

On Sun, 25 May 1997 20:06:59 -0700 (PDT),
Dave/WebMaster <ddave(_at_)ddave(_dot_)com> wrote:
 > I have run into a brick wall (in my mind) trying to simplify this procmail
 > recipe. The line below, where formail is called, needs to strip everything
 > in the From: field except the actual email address in <>'s. I can't seem
 > to come up with a way to do this with formail and figure sed would have to
 > be called. Sed is a bit beyond my comprehension. Any ideas? 
 >    FROM=`formail -ztxFrom:`

You see this used a lot;

    FROM=`formail -rtzxTo:`

I use this in my working listserv recipe because it does look for the 
real reply to address, minus the colon: so procmail extracts from the To 
pseudo header field. There is a special case, read further into my original 
post, where I need to match the address in the From: field. I'm just 
trying to save a bit of fingerwork on my part. If I bounce a message to 
the list, I don't get a cc but the original poster does; which I am 
trying to avoid. I want to strip the name and <> brackets so I can keep a 
file of the bare email addys. 

      FROM=`formail -rtzxTo`


 >            * ? test -x "$SENDMAIL"

I haven't really looked at your recipe, but this caught my attention.
Is this a smart thing to do? I mean, if you didn't explicitly check
for the availability of Sendmail, you'd at least get an error message
in the log (in the unlikely event that other things are working AOK
while apparently some fairly central utilities are out to lunch :-)
but this one will just fail silently. 

I'll try the recipe without it and see what pops up.

Regards,

Dave/Webmaster

    Sick And Tired Of SPAM? | Enjoy Great Humor?
         Join www.cauce.org | Join Joke-L
Hit SPAMMERS Where It Hurts | Listserv <listserv(_at_)ddave(_dot_)com>

           "So many SPAMMERS; so few comets."