Link to home
Start Free TrialLog in
Avatar of GraemeEvans1
GraemeEvans1

asked on

Setting up postfix for a split domain

I have a Linux/Postfix mail server currently handling email for many domains. For one of these domains I have 60 or so pop3 accounts most of which are accessed by the SBS POP3 connector for email, but some are accessed directly as the users are not part of the main network (so there are no SBS licences for them - the directors children are some of them)

I want the email for most of the accounts to be forwarded via smtp to the SBS/exchange server without using the pop3 connector but leave a few of the accounts local on the postfix server.

I know how to relay email for an entire domain and how to setup local mailboxes but not how to mix these within a domain. I also need to ensure that email sent from either server can reach recipients on the other server.

I believe this is called a split domain and can setup the exchange end no problem but don't know the postfix config.


Incidentally the server is Slackware 11 with Postfix/Dovecot
Avatar of Bryan_Gabriel
Bryan_Gabriel

You need to utilize the Transport Map.

You can specify specific accounts to go to certain ip's(servers) or hostnames.
accounts you want to have delivered locally you need not add to the transport map.

Example:

you SBS server ip is (10.10.10.99) - replace with your servers real ip.

in the transport file make an entry like the following

someuser@somedomain.com

Sorry got cut off:

in the transport file make an entry like the following

someuser@somedomain.com     SMTP:[10.10.10.99]

OR

someuser@somedomain.com RELAY:[sbsHostname.yourdomain.com]

Repeat for each user you want to forward to the SBS server.

make sure you have:

transport_maps = hash:/etc/postfix/transport

in your config

Either should work to move mail to the sbs server.
A few other notes about your scenario.
You probably want to make the SBS servers' smart host your postfix server. That way all mail in and out is relaying through your postfix box.

Avatar of GraemeEvans1

ASKER

Transport map? I have a relay_maps and a transport file.

The transport file is formatted as:
----------------------------------------------
somedomain.com relay:[10.10.10.99]
----------------------------------------------

the relay_maps:
----------------------------------------------
#catch all relay
@somedomain1.com RELAYALL

#specified relay
someuser@somedomain.com OK
----------------------------------------------

However after configuring this and postmap each file I just get "Recipient address rejected: User unknown in virtual mailbox table" bounced when I try to send email
I do have the domain in my vdomains file but I require this for the local accounts that need to remain, I think?
you can Append the transport file:
-----------------------------------------------------
somedomain.com relay:[10.10.10.99] - IF you are NOT forwarding the entire domain remove this line
userToForward@somedomain.com relay:[sbsServerIP]
anotherUserToFor@anotherdomain.com relay:[sbsServerP]
auser@somedomain.com relay:[sbsServerip]
-----------------------------------------------------------------------------
just keep adding per user forwarders

when you try that you are getting the error?
ASKER CERTIFIED SOLUTION
Avatar of GraemeEvans1
GraemeEvans1

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial