procmail
[Top] [All Lists]

Trimming an extra header.

2003-03-28 08:48:30
I'll start by saying I'm a procmail newbie... I've searched the lists
and man pages, but haven't found quite what I'm looking for. 

My company has GroupWise handling corporate mail. I'm able to setup
groupwise to forward the mail to my unix account, and can get procmail
to sort it into it's own folder.

The problem is Groupwise adds a header as it forwards the message. So
each mail looks like I've read it and forwarded it with the Groupwise
client. I'd like to setup procmail to remove the header that Groupwise
added so the message would act like it was sent directly to my unix
account. I don't need to change the To address, I just want to remove
the first header.

A while ago, someone was trying to trim Groupwise headers to get them to
a pager, I tried to mod that with no luck. Here is the closest I've
gotten.

:0: fhw
*^From:(_dot_)*(_at_)ccf\(_dot_)org\>
{
  :0Afwh
  |sed -e '/^$/,$!b' -e '/./,$!d'

  :0
  Groupwise
}

This trimmed some of the header correctly (Got the addressing correct),
but still left an empty header and lost the subject and the first line
of the body out.

Any suggestions? Should I be learning more about sed? I'll take pointers
as well.

Thanks for your help,
John Ehrlinger

-- 
John Ehrlinger <jehrling(_at_)bio(_dot_)ri(_dot_)ccf(_dot_)org>


_______________________________________________
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>