[Gllug] Postfix and body_checks

Simon Morris mozrat at gmail.com
Fri Nov 25 10:12:16 UTC 2005


Hello,

I'm playing with "body_checks" in postfix to do string replacement in
the body of emails.

It essentially works in that if postfix sees the string I am searching
for it will replace that entire line of the mail with text that I
specify.

However I only want to replace the single word that matches the
regular expression, not the whole line... Is this possible?

/etc/postfix/main.cf

body_checks = pcre:/etc/postfix/body_checks

/etc/postfix/body_checks

/foobar/ replace 123

So - if postfix reads a line of a mail

"This is a load of foobar"

I want it to read "This is a load of 123" - Currently the whole line
is scrubbed and replaced with "123"

It may be that I need to stop thinking about using body_checks and use
the content filtering module in postfix.

TIA

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