Ok, thank you for your help. I have tested it, but when an e-mail has more than one links, the body_checks changes only one.
P.S.: can you indicate some fast sheet to learn some regexp? Ediconsul Informatica S.r.l. System Administrator Gianluca Gargiulo e-mail: ggargi...@ediconsul.it Tel: 081.3176326 | Fax: 081.3415110 Avvertenze ai sensi del D.lgs. 196/2003 px; Tutte le informazioni contenute nella presente e-mail sono riservate esclusivamente al destinatario. È proibito a chiunque legga la presente comunicazione, che non sia l’effettivo destinatario, qualsiasi uso, copia, distribuzione e/o divulgazione di quanto in essa contenuto. Se questa comunicazione è pervenuta per errore, si è tenuti ad informare il mittente con sollecitudine e distruggere l’intera e-mail. ----- "Ralf Hildebrandt" <ralf.hildebra...@charite.de> wrote: > From: "Ralf Hildebrandt" <ralf.hildebra...@charite.de> > To: postfix-users@postfix.org > Sent: Friday, 10 December, 2010 14:43:23 GMT +01:00 Amsterdam / Berlin / Bern > / Rome / Stockholm / Vienna > Subject: Re: postfix body_checks replace > > * Gianluca Gargiulo <gianluca.gargi...@ediconsul.it>: > > Hello, > > > > i hope somebody can help me > > I must to replace any sub-string in every mail processed by postfix. > > I set my postfix so: > > in main.cf > > > > body_checks=regexp:/etc/postfix/body_checks > > > > and then in Body_checks > > > > # aaa > > /www.mydomain.it/ REPLACE www.otherdomain.it > > > > > > but this way provide to replace all the line about the match. I wan to > > replace only match. > > /^(.*)www\.mydomain\.it(.*)$/ REPLACE ${1}www.otherdomain.it${2} > > -- > Ralf Hildebrandt > Geschäftsbereich IT | Abteilung Netzwerk > Charité - Universitätsmedizin Berlin > Campus Benjamin Franklin > Hindenburgdamm 30 | D-12203 Berlin > Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962 > ralf.hildebra...@charite.de | http://www.charite.de > >