diff --git a/changelog b/changelog index a310519..4b07433 100644 --- a/changelog +++ b/changelog @@ -4,12 +4,13 @@ Version 3.2 - 04/14/02006 * support for multi-domain setups * detect preferred interface language * user-specific interface language selection - * handling of empty settings for ezmlm-idx 5.0 fixed (closes #21) + * support for listing of subscription log + * a prefix for the local part of mailing list addresses is now configurable * script for creating binary suid wrappers added + * handling of empty settings for ezmlm-idx 5.0 fixed (closes #21) * bug in MySQL support fixed * handling of the special character "dot" in listname and list address fixed * the formerly required module "Encode" is now optional - * support for listing of subscription log Version 3.1.4 - 03/26/02006 * new setting: DOTQMAIL_DIR (useful for multi domain vpopmail setups) diff --git a/examples/ezmlmwebrc.dist b/examples/ezmlmwebrc.dist index 577ffae..702066e 100644 --- a/examples/ezmlmwebrc.dist +++ b/examples/ezmlmwebrc.dist @@ -33,7 +33,7 @@ $LIST_DIR = "$HOME_DIR/lists"; # Where is the webusers file for access-permissions # defaults to "$LIST_DIR/webusers" -$WEBUSERS_FILE = "$LIST_DIR/webusers"; +#$WEBUSERS_FILE = "$LIST_DIR/webusers"; # Where are the language files # usually something like /usr/local/share/ezmlm-web/lang @@ -57,6 +57,10 @@ $QMAIL_BASE = $Mail::Ezmlm::QMAIL_BASE . '/control'; # default mailing list domain name (optional) #$MAIL_DOMAIN = "lists.someserver.org"; +# default prefix of the local part of the addresses of mailing lists +# useful for some qmail-ldap setups +#$MAIL_ADDRESS_PREFIX = "lists-"; + # Do we want to allow ``pretty'' names - ie more human readable ones # This will slow ezmlm-web down a bit for large lists $PRETTY_NAMES = 1; diff --git a/examples/multidomain.conf.dist b/examples/multidomain.conf.dist index e76e3ce..f81e2aa 100644 --- a/examples/multidomain.conf.dist +++ b/examples/multidomain.conf.dist @@ -10,7 +10,7 @@ # 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 and $MAILDOMAIN settings. +# $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. @@ -29,14 +29,13 @@ foo => { name => "Example Domain Foo", list_dir => "/data/lists/foo", - dot_dir => "/data/lists/foo", - mail_domain => "lists.foo.org", }, bar => { name => "Example Domain Bar", list_dir => "/data/lists/bar", - dot_dir => "/data/lists/bar", + dot_dir => "/var/vpopmail/lists/bar", mail_domain => "lists.bar.org", + mail_prefix => "lists-", }, ); @@ -49,6 +48,8 @@ if (defined($CURRENT_DOMAIN) && defined($DOMAINS{$CURRENT_DOMAIN})) { 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 = ''; } diff --git a/ezmlm-web.cgi b/ezmlm-web.cgi index 38f529e..47df7fb 100755 --- a/ezmlm-web.cgi +++ b/ezmlm-web.cgi @@ -22,7 +22,6 @@ use CGI; use IO::File; use POSIX; use English; -# TODO: uncomment it later use Time::localtime (); # gettext support is optional @@ -77,7 +76,7 @@ use vars qw[$DEFAULT_OPTIONS $UNSAFE_RM $ALIAS_USER $LIST_DIR]; use vars qw[$QMAIL_BASE $PRETTY_NAMES $DOTQMAIL_DIR]; use vars qw[$FILE_UPLOAD $WEBUSERS_FILE $MAIL_DOMAIN $HTML_TITLE]; use vars qw[$HTML_CSS_FILE $TEMPLATE_DIR $LANGUAGE_DIR $HTML_LANGUAGE]; -use vars qw[$DEFAULT_HOST]; +use vars qw[$DEFAULT_HOST $MAIL_ADDRESS_PREFIX]; # some settings for encrypted mailing lists use vars qw[$GPG_SUPPORT]; # settings for multi-domain setups @@ -606,7 +605,7 @@ sub set_pagedata_domains { my ($domain_name); # multi-domain setup? - if (defined($CURRENT_DOMAIN)) { + if (defined($CURRENT_DOMAIN) && ($CURRENT_DOMAIN ne '')) { $pagedata->setValue("Config.UI.LinkAttrs.domain", $CURRENT_DOMAIN); $pagedata->setValue("Data.CurrentDomain", $CURRENT_DOMAIN); $pagedata->setValue("Data.CurrentDomain.Description", @@ -674,6 +673,11 @@ sub set_pagedata { $username = "$USER-" if ($USER ne $ALIAS_USER); $hostname = $DEFAULT_HOST; } + # maybe a local prefix was configured? + if (defined($MAIL_ADDRESS_PREFIX)) { + $username = $MAIL_ADDRESS_PREFIX; + } + $pagedata->setValue("Data.UserName", "$username"); $pagedata->setValue("Data.HostName", "$hostname"); diff --git a/template/config_admin.cs b/template/config_admin.cs index 2a66b95..5213737 100644 --- a/template/config_admin.cs +++ b/template/config_admin.cs @@ -9,14 +9,11 @@