ezmlm-web-archiv/ezmlm-web-3.3.1/examples/multidomain.conf.dist

66 lines
2.3 KiB
Text

# This is a configuration file for ezmlm-web setups with more than one
# mailing list directory.
#
# If you want to use multi-domain support, then you should somehow know
# what you are doing. You have been warned! ;)
#
# Usually you just need to adjust the $DOMAIN setting below.
# Use the existing example as a template.
#
# If your setup is a little bit more exotic, then you can change the code, too.
# In the end, the setting $LIST_DIR should either be an empty string or
# the path of a mailing list directory. You may also want to take care for the
# $DOTQMAIL_DIR, $MAILDOMAIN and $MAIL_ADDRESS_PREFIX settings.
#
# BEWARE: you may not define new variables as - otherwise they could collide
# with the names of variables of the ezmlm-web program.
#
# AGAIN: you have to remove any setting defined in this multidomain setup from
# the ezmlmwebrc file. Otherwise the settings below get overriden and are ignored.
#
{
# we do not want to spoil our namespace - but we need CGI input
use CGI ();
$CURRENT_DOMAIN = new CGI->param('domain');
};
# domain names may not contain any special characters
# you must define at least "name" and "list_dir" for each domain
%DOMAINS = (
foo => {
name => "Example Domain Foo",
list_dir => "/data/lists/foo",
dot_dir => "/var/vpopmail/lists/foo",
mail_domain => "lists.foo.org",
mail_prefix => "lists-",
webusers_file => "/data/lists/foo/webusers",
},
bar => {
name => "Example Domain Bar",
list_dir => "/data/lists/bar",
dot_dir => "/var/vpopmail/lists/bar",
mail_domain => "lists.bar.org",
mail_prefix => "lists-",
webusers_file => "/data/lists/bar/webusers",
},
);
# this simple code defines the most common list specific parameters in a sane way
if (defined($CURRENT_DOMAIN) && defined($DOMAINS{$CURRENT_DOMAIN})) {
$LIST_DIR = $DOMAINS{$CURRENT_DOMAIN}{'list_dir'}
if (defined $DOMAINS{$CURRENT_DOMAIN}{'list_dir'});
$DOTQMAIL_DIR = $DOMAINS{$CURRENT_DOMAIN}{'dot_dir'}
if (defined $DOMAINS{$CURRENT_DOMAIN}{'dot_dir'});
$MAIL_DOMAIN = $DOMAINS{$CURRENT_DOMAIN}{'mail_domain'}
if (defined $DOMAINS{$CURRENT_DOMAIN}{'mail_domain'});
$MAIL_ADDRESS_PREFIX = $DOMAINS{$CURRENT_DOMAIN}{'mail_prefix'}
if (defined $DOMAINS{$CURRENT_DOMAIN}{'mail_prefix'});
$WEBUSERS_FILE = $DOMAINS{$CURRENT_DOMAIN}{'webusers_file'}
if (defined $DOMAINS{$CURRENT_DOMAIN}{'webusers_file'});
} else {
$LIST_DIR = '';
}