[Gllug] Postfix and body_checks
Simon Morris
mozrat at gmail.com
Fri Nov 25 12:57:19 UTC 2005
On 25/11/05, Ian Lewis <ian.lewis at dlf.org.uk> wrote:
>
> The content filtering is intended to allow checking of headers, body, mime
> and so on. It uses the Regular Expressions to do the checking and action
> decision. Read this http://www.postfix.org/BUILTIN_FILTER_README.html it
> should clarify things.
>
> According to the manual, at least this bit
> http://www.postfix.org/header_checks.5.html, it is possible to do some form
> of substitution.
Thanks for your reply Ian,
I had read that link but it appears lack of knowledge of regex was my failing.
It isn't bulletproof but I've got as far as this in my body_checks file
/^(.+) foobar (.+)$/ replace $1 123 $2
Which replaces *just* the word foobar with the string 123.
> On balance it is better to use postqueue filtering, with Procmail maybe, to
> do your substitutions.
Yes, I considered procmail but this server is going to be a SMTP relay
so I didn't really want to hand the mail off to procmail.
Thanks again
--
~sm
Jabber: mozrat at gmail.com
www: http://beerandspeech.org
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list