Take a look at this: http://www.postfix.org/ADDRESS_REWRITING_README.html There are a lot of examples and you'll find what you're looking for.
If you want to change the domain for incoming and outgoing e-mails you can do this with canonical_maps. If you only want to apply the rules for incoming mails, use recipient_canonical_maps or for outgoing mails sender_canonical_maps. The table/file you define after the parameter can contain the complete domain name (as wildcard) or full e-mail address which you want to rewrite: canonical_map: @abc.net @abc.org <- for all e-mail addresses of abc.net ma...@abc.net ma...@abc.org <- only single e-mail address On Fri, Nov 18, 2011 at 7:35 AM, Dilip Mishra // Viva < dilip.mis...@vivainfomedia.com> wrote: > Sorry for jumping in guys but I seem to face a similar problem where there > are domains which gets changed. For eg: some may move from abc.net to > abc.org etc. > > What I need is to replace such domains on my MTA's. How should I perfectly > achieve it? Also, how long could be the file? > > > On Tue, Nov 15, 2011 at 7:29 PM, Noel Jones <njo...@megan.vbhcs.org>wrote: > >> On 11/15/2011 3:44 AM, Adrian P. van Bloois wrote: >> > Hi All, >> > I'd like to catch ALL mail addressed to someth...@somedomain.blad and >> > rewrite that to something@certaindomain. >> > The point is .bla, I don't know what's in front of this. rH >> > how can I best do that? >> > >> > Regards >> > Adrian >> > >> > >> >> >> The general answer is to use a regexp or pcre table. For a more >> specific answer, we would need to know *exactly* what you're trying >> to rewrite and why it needs rewriting. >> >> http://www.postfix.org/ADDRESS_REWRITING_README.html >> http://www.postfix.org/regexp_table.5.html >> http://www.postfix.org/pcre_table.5.html >> >> >> >> -- Noel Jones >> > > > > -- > Incase of any further queries, Please feel free to mail me or contact me > on the numbers provided below. > > Thanks & Regards, > Dilip H.Mishra > Server Administrator > > Viva Infomedia Pvt. Ltd. > 242, Oshiwara Industrial Centre, > Opp. Oshiwara Bus Depot, New Link Road, > Goregaon West, Mumbai 400104. > > Direct: +91.22.4293 0162 > Board: +91.22.4293 0100 > > Email : dilip.mis...@vivaconnect.in > Web : www.vivaconnect.in > > Viva Infomedia: Awarded as Best SME (E-Commerce) at CNBC Emerging India > Awards 2009 > > Disclaimer: > This e-mail and any files transmitted with it are for the sole use of the > intended recipient(s) and may contain confidential and privileged > information. If you are not the intended recipient, please contact the > sender by reply e-mail and destroy all copies and the original message. Any > unauthorized review, use, disclosure,dissemination, forwarding, printing or > copying of this email or any action taken in reliance on this e-mail is > strictly prohibited and may be unlawful. The recipient acknowledges that > Viva Infomedia Pvt.Ltd. or its subsidiaries and associated companies are > unable to exercise control or ensure or guarantee the integrity of/over the > contents of the information contained in e-mail transmissions and further > acknowledges that any views expressed in this message are those of the > individual sender and no binding nature of the message shall be implied or > assumed unless the sender does so expressly with due authority of Viva > Infomedia Pvt.Ltd. Before opening any attachments please check them for > viruses and defects. > > >