ezmlm-web-archiv/ezmlm-web-3.2/examples/multidomain.conf.dist
lars 3c02ffac2f updated changelog date
removed TODO file from release
tagged the v3.2 release
2007-08-15 17:39:45 +00:00

56 lines
1.9 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.
#
{
# 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",
},
bar => {
name => "Example Domain Bar",
list_dir => "/data/lists/bar",
dot_dir => "/var/vpopmail/lists/bar",
mail_domain => "lists.bar.org",
mail_prefix => "lists-",
},
);
# this simple code defines $LIST_DIR and $DOTQMAILDIR 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'});
} else {
$LIST_DIR = '';
}