Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

changing "host name" to vlan domain and IP address for sending email

We are using Mountain Lion Server as an email server on a MacMini. We are sharing the one high speed ethernet interface on the MacMini for both internal and external ip connections. The server is setup up using "System Preferences" "Network" / "Ethernet" set to the LAN IP address. Using the "gear" to get to "Manage virtual interfaces" vlan2 is set as TAG 2 on the Ethernet Interface and to handle the WAN IP traffic. The ethernet cable from the Mac Mini is plugged into a CISCO Switch that has several ports grouped into a VLAN that sends TAG 2 traffic to the upstream ISP gateway. Untagged traffic stays on the switch as LAN traffic. This setup works perfectly for using the one physical 1 Gbit ethernet interface for both WAN and LAN traffic, which we prefer over moving the WAN traffic to a USB interface using a USB to Ethernet adapter.


Unfortunately, the server.app GUI does not show vlan interfaces in the "machine"/Network screen. We temporarily have the Host Name set to the LAN domain name since the connections to the WAN are tied to the VLAN ip address that the GUI doesn't show. When using the LAN ip address and host name, PostFix sends email upstream through the LAN switch to the LAN router to the ISP for delivery. We would like to have Postfix connect directly to the WAN virtual interface so that outbound email traffic from PostFix goes directly to the ISP gateway rather than getting routed through the switch to the internal router.


Since the vlan interface is not available via the GUI to associate with the WAN ip address, what is the best way to configure a Mac Mini using the one ethernet interface? Is it best to change the PostFix configuration or the HostName? If so, what terminal commands did you use to do this? Afterward, did the server.app GUI still work? Did the changes "stick" when you rebooted the Mac Mini?



Mac mini, OS X Server, 10.8.4 Mountain Lion Server

Posted on Jun 24, 2013 7:16 AM

Reply
1 reply

Jun 24, 2013 1:32 PM in response to Paul Derby

I figured out how to get this configuration to work with Mountain Lion Server.


The steps that worked:


1) On the server, go to System Preferences, Network. Unlock the control panel and in the "gear" icon, select "Set service order...". Drag the vlan entry for the WAN interface to the top. Drag the Ethernet entry for the LAN interface to next to the top.


2) use terminal to verify the hostname and Primary IP address: sudo changeip -checkhostname


3) if the names match and are your WAN domain name and IP address you are good to go. If not make the corrections using changeip


4) use BBEDIT or whatever to edit: /Library/Server/Mail/Config/postfix/main.cf


toward the bottom find the entry for "mynetworks" it should be something similar to this:


mynetworks = 127.0.0.0/8, [::1]/128


add your external IP address replacing where the x's are below so that you now have:


mynetworks = xx.xxx.xxx.xxx, 127.0.0.0/8, [::1]/128


Save the file, stop and start mail with server.app


Send an email from your server address to another address. Check the header and mail should be sent directly from your server to the internet instead of routing through your LAN gateway.

changing "host name" to vlan domain and IP address for sending email

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.