289791Re: alias_maps are not being read correctly
- Nov 30, 2012On 11/30/12 11:17 AM, Noel Jones wrote:
> On 11/30/2012 10:45 AM, list@... wrote:Thanks for the clarification Noel, from your explanation it appears my
>> On 11/30/12 10:22 AM, Wietse Venema wrote:
>>>> 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
>> 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.
>> alias_maps = hash:/etc/aliases, hash:/etc/postfix/aliases
> List of databases used during local(8) delivery.
>> 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.
> It might be helpful to review
> -- Noel Jones
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.
- << Previous post in topic Next post in topic >>