AFP548

10.4 Tiger – Setup of Virtual Hosts for Mail

I am trying to setup Virtual Hosting for postfix, which was thankfully added to the GUI of Tiger Server.

I have checked the "Enable virtual hosting" box, and added the virtual hosting domains to the list below. (For abstraction purposes, let's say "virtualsite1.com" and "virtualsite2.com".)

This has seems to have a few effects:

"/etc/postfix/virtual_domains" is created with the following lines:

virtualsite1.com allow
virtualsite2.com allow

"/etc/postfix/virtual_domains" is hashed as "/etc/postfix/virtual_domains.db".

The following postfix settings are set in main.cf:

virtual_mailbox_domains = hash:/etc/postfix/virtual_domains
virtual_transport = lmtp:unix:/var/imap/socket/lmtp

Now, all that's left to be done, according to Apple's Documentation (Page 43 of "Mail_Service_v10.4.pdf"):

[QUOTE]
To associate a user to a virtual host using Postfix-style aliases:
1 Add a Virtual Host Name using the directions in section “Adding or Removing Virtual
Hosts” on page 42.
2 Create a file to be used as an alias list in /etc/aliases, if none exists.
3 For each alias, make a line in the file with the following format:
alias@virtualhost:localaddress1,localaddress2,...
For example, if your domain is “example.com” and you are running a virtual host for
“server.com,” and if you want to have the user “bob” get mail sent to
“postmaster@server.com,” you should enter:
postmaster@server.com: bob
This will take mail sent to your mail server for postmaster@server.com and send it to
user “bob.” Mail sent to postmaster@example.com will be sent to some other
designated recipient.
4 Save your file changes.
5 In Terminal.app, enter the following command:
postalias /etc/aliases
The text file is processed into a database for faster access.
[/QUOTE]

But doing this yields the following error from postalias:

postalias: warning: ../aliases, line 205: name must be local

...and postfix's own author states that "/etc/aliases" is not the appropriate location for a non-local alias:

[QUOTE]
Aliases are used by the LOCAL delivery agent only, so you cannot use the alias map for aliasing a remote address.



In order to alias a remote address, use the virtual map instead.


Wietse
[/QUOTE]

Is Apple's documentation just flat out wrong here, or is there a piece of the puzzle missing?
Exit mobile version