procmail
[Top] [All Lists]

Procmail question...

2003-12-03 14:19:51
My lack of understanding of the matching operator in procmail is making
this difficult and I cannot seem to find a clear explaination of how the
matching operator works. As a result, i am throwing something out to see
if someone with a bit more savvy can help me.

I have an account on a Groupwise box which I have set to delegate all mail
which hits it to another account which I can filter with Procmail.

The problem is that this delegate function (there is nothing like .forward
on Groupwise) does some serious damamge to the message headers...it acts
more like a forward than a .forward.

When a message comes in, it is mangled to this:

  FROM: "Mike Neuharth" <mjn(_at_)groupwise(_dot_)system(_dot_)com>
  TO: mjn(_at_)umn(_dot_)edu
  Subject: Random subject-Delegated

  >>> username 12/02/03 14:51 >>>
  txt txt txt txt txt txt txt txt txt txt


Things to note in the above text:

->The FROM address shows up as my account on the groupwise system and not
the /original/ sender.
->The "username" contained within the line starting ">>>" is the username
of the original sender.
->Subject has "-Delegated" appended to it by the Groupwise system

Is there a way for me, with Procmail and formail, pull out "username",
attach an @groupwise.system.com to it, and then replace the FROM: string
in the message with that concotion...so the message comes out looking like
this (I know about formail -rt and -I but the match/substitution is
killing me):

  FROM: username(_at_)groupwise(_dot_)system(_dot_)com
  TO: mjn(_at_)umn(_dot_)edu
  Subject: Random subject

  >>> username 12/02/03 14:51 >>>
  txt txt txt txt txt txt txt txt txt txt


Anyone know how i can do this? I am 100% certain it can be done but i
am having one hell of a time getting the matching to work in procmail...

Any help is greatly welcome and much appretiated. Thanks.

--
_______________________________________________
Mike Neuharth
ADCS Technology Specialist
http://www.umn.edu/adcs
===============================================
E-Mail          : mjn(_at_)umn(_dot_)edu
Page Mail       : 6126486512(_at_)page(_dot_)metrocall(_dot_)com
_______________________________________________
"What is important, it seems to me, is not so much to defend a culture
 whose existence has never kept a man from going hungry, as to extract,
 from what is called culture, ideas whose compelling force is identical
 with that of hunger."  -Antonin Artaud

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