|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
pipe and regexp help
From: aaron (aaron
philngood.com)
Date: Wed Mar 12 2003 - 09:47:19 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello all,
I have somewhat of an odd situation and i am trying to avoid having
interaction from an outside program for some sorting, but from what i've
read, this won't be possible, hopefully i've misread.
I have a postifx 2.0.6 machine running accepting redirected emails for
some processing before final delivery, to an outside domain. I am using
virtual aliasing to accept the emails and then forwarding them on their
way.
My problem is that some of the emails will have a line in the body that
says:
"please log on to http://www.somedomain.com/login.asp"
i need to replace this text with:
"please log into your local intranet to approve the order"
I read the filter readme, but i'm just not understanding exactly how it
works. I have a body_check looking for the line of text that i need to
filter, and then i just wanted to pipe it out to some little shell
program that takes the message changes the line and then sticks it right
back in the queue.
/this is the text that i'm body_chekcing/ |/path/to/filter_script
but it doesn't seem to be working and even if it would, i'm not sure how
to get it back into postfix...(just a sendmail statement? if so, will
this send it on it's way as the original sender, as that is
important) I've seen references in here to amavisd.new, i guess i was
just hoping that it wouldn't be that big of an issue.
Couldn't i just use my body check to replace the text? I'm by no means
a regexp guru, but as i was looking through examples, i found a "find
and replace" example as such:
1/$/\([Oo]ccur\)ence/\1rence/g OK (wouldn't this look through the body
of my message fixing misspelled instances (good thing i have a spell
checker, i almost misspelled, misspelled) of occurrence? Couldn't i
just do the same only w/o the register like it is here, just give it
what i'm looking for and what i want?
Thanks
Aaron Martinez
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]