You would only need Anomy if what you want to filter is in an attachment,
such as a Base64 encoded HTML file.
If the text is in the actual message body, a Postfix filter script can do
it without Anomy. Take a look at the file FILTER_README in the readme
directory of the Postfix distribution (mirror at
http://advosys.ca/papers/FILTER_README )
This would be more on topic for the Postfix Users mailing list, but a
simple filter shell script the could do what you want might be:
#!/bin/sh
# Exit codes from <sysexits.h>
EX_TEMPFAIL=75
EX_UNAVAILABLE=69
SEARCHFOR='Please log on to http:\/\/www\.somesite\.com\/logon\.asp to
approve the order'
REPLACEWITH='Hey, visit http:\/\/someothersite\.com\/login\.asp to continue'
cat | sed "s/$SEARCHFOR/$REPLACEWITH/g" | $SENDMAIL "$@" ||
{ echo Message content rejected; exit $EX_UNAVAILABLE; }
exit 0
We have a long-winded paper describing how to install a filter into Postfix
( http://advosys.ca/papers/postfix-filtering.html ... it shows a script
that filters mail through Anomy and SpamAssassin, but it could be replaced
or extended with the above.
For more help, it might be best to search the postfix.users mailing list
archives at (http://groups.google.ca/groups?group=mailing.postfix.users)
At 01:04 AM 15/03/2003, Aaron Martinez wrote:
>Hello all,
>
>I'm new to anomy and have looked through some of the archives but
>didn't see anything relevant, so here goes.
>
>I'm wanting to use anomy with my postfix 2.0.6 installation to do what
>i initially thought would be a very simple body text substitution. I
>have one line of text in the body of the incoming emails that reads as
>follows:
>
>"Please log on to http://www.somesite.com/logon.asp to approve the
>order"
>
>I need that line replaced with some other pre-selected text. Can anomy
>do this? If so..any and all help is GREATLY appreciated.
-- Derrick Webber Advosys Consulting Inc. Ottawa http://advosys.ca/ --