postfix-users October 2010 archive
Main Archive Page > Month Archives  > postfix-users archives
postfix-users: Re: virtual_alias_domains

Re: virtual_alias_domains

From: mouss <mouss_at_nospam>
Date: Tue Oct 19 2010 - 21:18:28 GMT

  Le 18/10/2010 22:56, Jerrale G a écrit :
> On 10/18/2010 4:43 PM, Jeroen Geilman wrote:
>> On 10/18/2010 10:36 PM, Jerrale G wrote:
>>> On 10/18/2010 4:29 PM, The Doctor wrote:
>>>> REcently I have noted that virtual_alias_domains is growing.
>>>> Is their some way for to look a file up instead of
>>>> having to read a whole line?
>>> You are limited to using mysql, ONE file, ldap, postgresql, or mssql
>>> for each virtual_*_* parameter or any parameter that looks up
>>> something.
>> Certainly not.
>> All *_maps parameters can be specified as many times as necessary,
>> for instance:
>> virtual_alias_maps = hash:/etc/postfix/virtual,
>> mysql:/etc/postfix/my_virtual, ldap:/etc/postfix/ldap_virtual
>> They're not called mapS for nothing.
>> virtual_alias_domains is not a map setting per se, as it does nothing
>> with the RHS of the lookup - but it works the same way.
>> From the postconf(5) man page:
>> Specify a list of host or domain names, "/file/name" or "type:table
>> <>" patterns, separated by
>> commas and/or whitespace.
>> i.e. "a list of" any of the map types postfix supports.
>> --
>> J.
> yes, but that concats and looks in multiple places and it should NOT
> exist in more than one place. You MIGHT be able to do:
> virtual_alias_maps = hash:/etc/postfix/virtual,
> mysql:/etc/postfix/my_virtual, ldap:/etc/postfix/ldap_virtual,
> *hash:/etc/postfix/hasfiles/%s
> *

dunno what you mean, but for the archives:
- '%s' has no specific meaning here. so the above is interepreted as a
file named '%s'. which is really a bad idea.
- it is ok to use multiple maps. but using both mysql and ldap is at
least funny...

> * *If there is no variable available that you want to use, then no and
> I'm not saying you can use variables in the config.

do you refer to '%s'? This is not what we call a variable. other than
that, a lot of people use variables in postfix. I mean things like

sql = proxy:mysql/etc/postfix/mysql
re = pcre:/etc/postfix/pcre
db = cdb:/etc/postfix/cdb


foo_maps =

or in

submission ...
     -o myhostname=${submission_hostname}
     -o smtpd_client_restrictions=${submission_client_restrictions}
     -o foo_option=${submission_foo_option}

> In dovecot you can use variables globally, with respect to some
> variables being exclusive to certain libexec's, and I'm only saying to
> try it.

you can use -o options in, and you can also run postifx N
times, each with its own (on the same OS, inside
jails, in VMs or on different physical hosts). with that, you can
implement any combination of parameters. if an important config is
missing, please say it.