Re: can anomy do this?

From: Derrick Webber (
Date: Sat 15 Mar 2003 - 15:34:42 GMT

  • Next message: Thomas Wheeler: "Droping Attachments"

    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 )

    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:

    # Exit codes from <sysexits.h>

    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
    ( ... 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 (

    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
    >"Please log on to to approve the
    >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

    hosted by