LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 10-06-2006, 11:52 AM   #1
bitpail
LQ Newbie
 
Registered: Oct 2006
Distribution: Fedora 6/SUSE 10
Posts: 20

Rep: Reputation: 0
Postfix integration with Exchange 2003


Hello everyone,
I'm new to these forums, any help that you can provided will be very appreciated. Currently we use Exchange 2003 for all our email services. We find the license for Exchange very restrictive but it is still desired that we use it for certain people in the company. However we need to provide everyone with a basic email account, this is where Postfix comes in. I want to setup a linux box (FC5) as our main MTA. Some user's mailboxes will reside on the linux box while others will remain in Exchange 2003. What I would like is for the linux box to just forward any mail for the Exchange users to the Exchange server, I don't want to user the pop connector from Exchange to pull the mail off the linux box because its limited to checking only every 15 minutes. The idea is that the Exchange SMTP server will still listen for incoming emails internally with Postfix feeding it for the Exchange users. Is this configuration possible with Postfix? If so can someone give me some pointers as to how I would go about doing this? I'm really new to Postfix, I need a kick in the right direction.
 
Old 10-06-2006, 12:43 PM   #2
ghight
Member
 
Registered: Jan 2003
Location: Indiana
Distribution: Centos, RedHat Enterprise, Slackware
Posts: 524

Rep: Reputation: 30
Well, it is possible, but to have some on one machine and some on another and forward between the two based on the username could get nasty. I'm rather positive you'd do this through the "virtual" table. Local accounts will need to be put in the "virtual" table to tell Postfix that everything gets forwarded but these. This is from the postfix website:
Code:
1 /etc/postfix/main.cf:
2     virtual_alias_maps = hash:/etc/postfix/virtual
3 
4 /etc/postfix/virtual:
5     root     root@localhost
I guess you could alias anyone going to the Exchange server as well
 
Old 10-10-2006, 11:32 AM   #3
bitpail
LQ Newbie
 
Registered: Oct 2006
Distribution: Fedora 6/SUSE 10
Posts: 20

Original Poster
Rep: Reputation: 0
By forwarding everything else do you mean by using the transport_maps parameter? What I'd like to do is forward only the exchange users as you mentioned last, that way I'm not forwarding unnessarily. How would you forward only the exchange users?
 
Old 10-13-2006, 09:00 PM   #4
WindowBreaker
Member
 
Registered: Oct 2005
Distribution: Slackware
Posts: 228

Rep: Reputation: 40
The simple way to implement this is with the optional transport table, as mentioned by another user. The downside is that it's not self updating, and you will have to manually update this table when new users are added, or old users are deleted.

That said, here's how it basically works. You determine where the majority of mailboxes will live (linux or exchange), and set that as the default destination. Then use the tranport table to override the default for all other users.

SCENARIO 1:
Most mailboxes will reside on linux, and a smaller number of mailboxes will reside on Exchange.

Assumptions:
Domain name: question.com
Exchange IP: 192.168.1.66
Some users to forward to exchange: larry, moe, and curly.

/etc/postfix/main.cf:
mydomain = question.com
myorigin=$mydomain
mydestination = localhost localhost.$mydomain $myhostname $mydomain
transport_maps = /etc/postfix/transport

/etc/postfix/transport:
larry@question.com smtp:[192.168.1.66]
moe@question.com smtp:[192.168.1.66]
curly@question.com smtp:[192.168.1.66]

Then run:
Code:
postmap hash:/etc/postfix/tranport
and
Code:
postfix reload

SCENARIO 2:
Most mailboxes will reside on exchange, and a smaller number of mailboxes will reside on linux. You want to deliver Moe, Larry, and Curly locally.

/etc/postfix/main.cf:
mydomain = question.com
myorigin=$mydomain
mydestination = localhost localhost.$mydomain $myhostname
relay_domains = $mydomain
relay_transport = smtp:[192.168.1.66]
transport_maps = /etc/postfix/transport

/etc/postfix/transport:
larry@question.com local
moe@question.com local
curly@question.com local

Then run:
Code:
postmap hash:/etc/postfix/tranport
and
Code:
postfix reload

Either way, every time you change /etc/postfix/transport, remember to run:
Code:
postmap hash:/etc/postfix/tranport
and
Code:
postfix reload
Again, this has a simpler setup, with higher maintenance overhead.

The alternative is a more complicated setup, with simpler (or none) maintenance overhead. This involves compiling Postfix with ldap support, and looking up exchange users via ldap queries to your domain controller. Again, this is not a simple setup and I don't know how exactly I'd implement it, so it would take some digging ( and a lot of testing) to get it to work.

Cheers,

Pablo

Last edited by WindowBreaker; 10-13-2006 at 09:01 PM.
 
Old 10-16-2006, 10:32 AM   #5
bitpail
LQ Newbie
 
Registered: Oct 2006
Distribution: Fedora 6/SUSE 10
Posts: 20

Original Poster
Rep: Reputation: 0
Thanks

Wow, what a great response, thanks for your help this worked out nice. Since our office is small, I don't expect this to be too much maintainance.

Thanks again for your help!
 
Old 10-17-2006, 04:38 PM   #6
bitpail
LQ Newbie
 
Registered: Oct 2006
Distribution: Fedora 6/SUSE 10
Posts: 20

Original Poster
Rep: Reputation: 0
Another related question...

On a related note....
I'm using dovecot for POP and IMAP. I would like to set it up so that all POP and IMAP requests go through the Linux box (ports 110, 143), however for the Exchange users I would like dovecot to forward those requests to the Exchange server. Can this be done?
 
Old 10-17-2006, 05:02 PM   #7
ghight
Member
 
Registered: Jan 2003
Location: Indiana
Distribution: Centos, RedHat Enterprise, Slackware
Posts: 524

Rep: Reputation: 30
Wow I really misread your last post so I'm going to delete what I just wrote,...

Sorry

Last edited by ghight; 10-17-2006 at 05:04 PM.
 
  


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
Active Directory 2003 Integration (Winbind dead) matthewhardwick Fedora 2 09-16-2006 04:54 PM
LXer: Mandriva Postfix Anti-Spam, Anti-Virus Relay Server for Exchange Server 2000/2003 LXer Syndicated Linux News 0 06-29-2006 10:21 AM
Evolution Exchange integration Broken after FC5 Installation and Update dave_mwi Fedora 1 06-16-2006 09:36 AM
Problems with Exchange Integration ian benoit Linux - Software 3 02-26-2005 07:00 AM
Using mail filters with Exchange 2003 ? tux1982 Linux - General 0 06-07-2004 08:15 PM

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

All times are GMT -5. The time now is 10:13 AM.

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