Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

AusS2000

macrumors member
Original poster
Nov 12, 2009
33
0
I host quite a few OSX mail servers (10.4 and 10.6) so reasonably familiar with the setup. I host multiple domains so 'Enable virtual hosting' is enabled and a list of domains is entered below it.

Enable virtual hosting:
virtualdomain.com

Then for each user in the Workgroup Manager I enter a 'Short Name' for whatever alias/domain the user is accepting email.

myaccount
Short Names:
myaccount@virtualdomain.com

Then, under the Mail tab I Enable mail

This seems to be enough. Mail that arrives at the server for myaccount@virtualdomain.com is recognised as being for one of the local virtual domains (as opposed to an attempt to relay to another domain), and matches one of the aliases of an account. It goes into the users account and is accessible via IMAP or POP.

I also have relaying restricted to my internal network (123.456.789.0/24).

OSX Lion mail server is very similar. It has a place in Server Admin to enter Virtual Domains and a place in Workgroup Manager to enter Short Names (email aliases). However, it has no user Mail tab where I can specify to Enable mail or forward it. I have the same Relay rule.

HERE'S THE PROBLEM

Mail sent to the server from inside the network is accepted and delivered to the specified account. Mail sent from outside my network is treated as though it was a relay attempt and refused. This is mail to the same address, just originating from outside my network. It is not a firewall issue. I have ensured the server is accessible on port 25 from the outside world and can see the attempt and denial in the server log. It thinks it is an attempt to relay.

So the virtual host list is not being taken into account by the SMTP server when an outside SMTP server tries to contact it.

Now usually I write one of these long winded questions and by the time I have written 75% of it the answer comes to me and I just delete it. Not the case in this instance. So I would love to hear any other views or ideas on the differences in Lion mail server.
 
Last edited:

maxplus

macrumors newbie
Dec 6, 2006
4
0
Not that familiar with Mail on Lion Server but I would start by going to /etc/postfix and compare the settings there on the Lion Server with the settings on an older server that is working correctly. I would look particularly at the "mydomain" and "myhostname" settings. From what you describe it sounds like the system might be trying to reroute the mail back outside.
Turn off the restrictions on relaying temporarily and see if the system tries to send the message back out.
 

AusS2000

macrumors member
Original poster
Nov 12, 2009
33
0
I've been looking at the text files in /etc/postfix and watching which ones change when I make changes in the admin. But that's an ongoing process.

In the meantime I've had some success, although it doesn't completely meet my requirements. If I turn on virtual hosting and enter the domain, but not enter a full email address in the Workgroup Manager users account it works. The server accepts an email for 'mydomain.com' and if there is a user 'myaccount' it stores it in their mail box.

The problem that will arise though is when I have two accounts with the same username but different domains:

info@onedomian.com
info@anuferdomian.com

I'll play around with the text files. They are surprisingly similar to the text files I had to play around with in Sendmail in the mid 90s. Will be very disappointed if I find out we've come full circle.
 

AusS2000

macrumors member
Original poster
Nov 12, 2009
33
0
Looks like it's bugs in OSX Lion (not really a surprise).

https://forums.macrumors.com/archive/index.php/t-1193911.html

This thread suggests creating users in System Preferences:Users & Groups then adding the aliases via Workgroup Manager. Surprisingly it works.

It also suggests setting up LDAP and creating the users through there rather than /Local/Default but I haven't tried this yet.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.