Plan:
- Content of some other config files under $SYSCONFDIR will also be included.
- Schema for list config and site/robot config may be merged together.
Example:
domain mail.example.org
listmaster user@example.org
lang ja
db_type SQLite
db_name /var/lib/sympa/sympa.sqlite
archive.quota 1024
bounce.warn_rate 50
wwsympa_url https://web.example.org/sympa
auth.generic_sso.0.service_name InQueue Federation
auth.generic_sso.0.service_id inqueue
auth.generic_sso.0.http_header_prefix HTTP_SHIB
auth.generic_sso.0.email_http_header HTTP_SHIB_EMAIL_ADDRESS
auth.generic_sso.1.service_name SSO in my organization
auth.generic_sso.1.service_id mysso
auth.generic_sso.1.http_header_prefix HTTP_SHIB
auth.generic_sso.1.email_http_header HTTP_SHIB_EMAIL_ADDRESS
auth.user_table.regexp .*
auth.user_table.negative_regexp evil-user@.+
Notes:
archive.quota
: Currently nameddefault_archive_quota
corresponding toarchive.quota
in list config.bounce.warn_rate
: Currently namedbounce_warn_rate
corresponding tobounce.warn_rate
in list config.auth.*
: Currently they are included inauth.conf
with "paragraph" format as:generic_sso service_name InQueue Federation service_id inqueue http_header_prefix HTTP_SHIB email_http_header HTTP_SHIB_EMAIL_ADDRESS generic_sso service_name SSO in my organization service_id mysso http_header_prefix HTTP_SHIB email_http_header HTTP_SHIB_EMAIL_ADDRESS user_table regexp .* negative_regexp evil-user@.+
Deserialization:
This will be decoded and stored in memory as following structure.
$site_config = {
domain => 'mail.example.org',
listmaster => 'user@example.org',
lang => 'ja',
db_type => 'SQLite',
db_name => '/var/lib/sympa/sympa.sqlite',
archive => {
quota => '1024',
},
bounce => {
warn_rate => '50',
},
wwsympa_url => 'https://web.example.org/sympa',
auth => {
generic_sso => [
{
service_name => 'InQueue Federation',
service_id => 'inqueue',
http_header_prefix => 'HTTP_SHIB',
email_http_header => 'HTTP_SHIB_EMAIL_ADDRESS',
},
{
service_name => 'SSO in my organization',
service_id => 'mysso',
http_header_prefix => 'HTTP_SHIB',
email_http_header => 'HTTP_SHIB_EMAIL_ADDRESS',
},
],
user_table => {
regexp => '.*',
negative_regexp => 'evil-user@.+',
},
},
};