LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-02-2007, 11:41 PM   #1
doctorcisco
Member
 
Registered: Nov 2003
Posts: 70

Rep: Reputation: 17
Postfix Rewrite Destination Domain Name?


All,

I'm installing an Ubuntu spam-filter front-end for a customer's badly configured M$ Exchange email server. The Exchange server has all the user accounts in a non-canonical domain (domain.local) in Active Directory. Of course, Postfix receives and relays mail for domain.com, not domain.local.

Is it possible to tell Postfix to accept mail for domain.com, have it rewrite the destination from user@domain.com to user@domain.local, and then relay it to Exchange? The only alternative, it appears, is to export all the user data on the AD side, and create the properly named AD domain.

TIA,
doctorcisco
 
Old 11-03-2007, 12:26 AM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
See if anything here does what you're after

http://www.postfix.org/ADDRESS_REWRITING_README.html
 
Old 11-03-2007, 11:02 AM   #3
doctorcisco
Member
 
Registered: Nov 2003
Posts: 70

Original Poster
Rep: Reputation: 17
Thanks for the help, Billy. The correct way to do this:

In main.cf:

recipient_canonical_maps = hash:/etc/postfix/myrecipientmap

In myrecipientmap:

@mydomain.com @mydomain.local

Then postmap /etc/postfix/myrecipientmap
postfix reload

(To change inbound user@domain.com to user@mydomain.local).

Later,
doc
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Top-Level Domain rewrite using mod_rewrite in Apache2 subcon Linux - Server 0 06-24-2007 11:33 PM
Postfix -- Allowing SMTP Connections Based on Destination Domain zok Linux - Networking 1 02-28-2007 09:25 PM
Postfix: Is it possible to rewrite sender address only for selective recipient? Akhran Linux - Software 3 08-15-2006 10:48 AM
Apache 2 Rewrite One Domain To Another thunder04 Linux - Software 10 04-19-2006 01:38 AM
need a mail relay that rewrite the sender's domain linuxboy123 Linux - Networking 3 04-20-2005 03:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration