varad gupta: > Hi All > > > I need to replace all occurences of "text1" in mailbody with "text2". > > The regexp => > > /^(.*)text1(.*)$/ REPLACE $1text2$2 works if there is only one > occurence of "text1" in a line. > > It changes only the last occurence of "text1" in a single line which > has multiple occurences of "text1" in the same line. > > Kindly advise how to replace "text1" with "text2" for multiple > occurences of "text1" in the same line
As documented, REPLACE text... Replace the current line with the specified text, ***and inspect the next input line.*** As documented, Postfix header/body_checks rules are not applied to their own result. This avoids surprises with endless loops. Wietse