Config example for multiple domains with different settings

Nicki Messerschmidt, Linksystem Muenchen GmbH n.messerschmidt at buero.link-m.de
Thu Sep 15 18:03:05 CEST 2016


Christian Rößner schrieb:
>> Am 03.08.2016 um 12:17 schrieb Nicki Messerschmidt, Linksystem
>> Muenchen GmbH <n.messerschmidt at buero.link-m.de>:
>> 
>> [DEFAULT] action = settings account_type = email
> 
> You can use this section for default settings that are mapped to
> _all_ other sections. So everything you specify here, will also
> exist in any other section. Os this what you looked for?
Not quite. I was looking for your secound example. :)

> Another way is to specify follow statements:
> 
> [my_wonderful_settings] backend = static_append foo = bar {...}
Is there a way to have these settings dynamic? Like a sql query or a
filter?

I want to have several generic sections that are referenced to several
domains. Most of the time I have not direct mapping of the username to
the eMail adress.

And I don't quite understand how the filter system works. I found the
thread https://is.gd/xb8KlB , but it seems that there was no solution
for the same problem.

So right now I have the following working:
######### start config #########
[DEFAULT]
action = settings
account_type = email
sign_mobileconfig = yes
sign_cert = /etc/ssl/certs/cert.pem
sign_key = /etc/ssl/private/key.pem

#main server
[global]
backend = sql
host = mysql://user:pass@host/db
query = SELECT user,email_address from lm_email_address where
email_address='%s';
result_attrs = user, email_address

account_name = ${email_address}
account_name_short = ${user}

# all main server setting
<...>

[main-domain.tld]
backend = global

[second-domain.tld]
backend = global

[settings_second_server]
backend = static_append
#second server settings username = email adress
<...>

[third_domain.tld]
follow = settings_second_server

#### NOT WORKING - Start
#### testing section with dynamic username from email adress
[settings_third_server]
backend = static_append
#third server static settings no username
<...>

[dynamic-domain.tld]
follow = settings_third_server
backend = filter
username = /usr/bin/automx/third_server_filter.sh %s #result: username
#### NOT WORKING - End
######### end config #########

But the above does not work. How can this be achieved?


Cheers
Nicki

-- 
Linksystem Muenchen GmbH                    We make the Net work
Ludwig-Richter-Str. 29                      Tel. 089 / 890 518-0
80687 Muenchen                              Fax 089 / 890 518-77
info at link-m.de                              http://www.link-m.de
Handelsregister:                Amtsgericht Muenchen, HRB 129182
Geschaeftsfuehrung:           Christine Wittig, Mathias Zunterer
PGP Keys:                             https://www.link-m.de/pgp/


More information about the automx-users mailing list