On 11/30/12 11:17 AM, Noel Jones wrote:
On 11/30/2012 10:45 AM, l...@airstreamcomm.net wrote:
On 11/30/12 10:22 AM, Wietse Venema wrote:
l...@airstreamcomm.net:
I am setup a 2.6.6 server with virtual domains and the entries in an
alias_maps file (/etc/postfix/aliases) which look like this:
localuser :include:/etc/postfix/massmail/localuser
localuser2 :include:/etc/postfix/massmail/localuser2
As documented this format is supported in ALIAS_MAPS not
VIRTUAL_ALIAS_MAPS
Wietse
Understood, however I am wondering why the alias_maps are not
working in my instance as it appears as if they are not being used
at all. I am not sure if this is a symptom of my configuration, or
the intended functionality.
alias_maps are used by local(8) during delivery of local mail, and
is not used by virtual domains.
In my configuration is have:
alias_database = hash:/etc/aliases, hash:/etc/postfix/aliases
This defines the databases to be rebuilt when you issue the
"newaliases" command. This has no effect on what alias databases
are used during local(8) delivery.
http://www.postfix.org/postconf.5.html#alias_database
alias_maps = hash:/etc/aliases, hash:/etc/postfix/aliases
List of databases used during local(8) delivery.
http://www.postfix.org/postconf.5.html#alias_maps
http://www.postfix.org/aliases.5.html
Either of these maps appear to be recognized?
These maps are not used during virtual delivery. Please see
virtual_alias_maps; note the format is different.
http://www.postfix.org/postconf.5.html#virtual_alias_maps
http://www.postfix.org/virtual.5.html
It might be helpful to review
http://www.postfix.org/ADDRESS_REWRITING_README.html
-- Noel Jones
Thanks for the clarification Noel, from your explanation it appears my
relay is virtual so the alias_maps are not going to be recognized for
the domains that are hosted virtually. I just created a mysql table
with a source and destination column like so:
massmailaddr -> destaddr1
massmailaddr -> destaddr2
...
Added virtual_alias_map = mysql:/etc/postfix/massmail.cf:
hosts = x.x.x.x, y.y.y.y
user = user
password = password
dbname = massmail
query = SELECT destination FROM entries WHERE source = '%s'
postmap -q massmailaddr mysql:/etc/postfix/massmail.cf:
destaddr1, destaddr2, ...
And had success. I also had to update the value for
virtual_alias_expansion_limit as my customer needed to deliver to more
than the default 1000 addresses.