diff --git a/README b/README index c2352a9..4db007b 100644 --- a/README +++ b/README @@ -63,7 +63,7 @@ This version of ezmlm-web requires the following; * clearsilver v0.10.3 (only perl support is necessary) * Perl v5.004 and the following modules; + Mail::Ezmlm v0.07 - + Mail::Address v1.15 + + Mail::Address v1.15 OR Email::Address + CGI v2.6 + CGI::Carp v1.06 + DB_File v1.65 diff --git a/TODO b/TODO index 84559dd..be8a54d 100644 --- a/TODO +++ b/TODO @@ -9,3 +9,9 @@ add "only for plain text mails" to the TrailerText string check version history of Mail::Ezmlm +sort languages in selection + +define default interface in example/ezmlmwebrc? + +check ui_mode, ui_template in source + diff --git a/changelog b/changelog index e0a9b52..dd40f0b 100644 --- a/changelog +++ b/changelog @@ -18,8 +18,9 @@ Version 3.2 - 08/07/02007 * support regional language codes (e.g.: pt_BR) * allow to reset the "owner" attribute * the formerly required module "Encode" is now optional + * the perl module Email::Address can be used instead of Mail::Address * most importantly: a new color scheme! (red/blue instead of blue/gray) - (you can also use the "classic" color scheme) + (the "classic" color scheme is still supported) Version 3.1.4 - 03/26/02006 * new setting: DOTQMAIL_DIR (useful for multi domain vpopmail setups) diff --git a/examples/apache.conf.dist b/examples/apache.conf.dist index e140138..2ca8ca9 100644 --- a/examples/apache.conf.dist +++ b/examples/apache.conf.dist @@ -9,5 +9,5 @@ Alias /ezmlm-web/ /usr/local/share/ezmlm-web/www-data/ # write access to the mailing list directories # see 'man ezmlm-web-make-suid' for details # e.g.: 'ezmlm-web-make-suid ezmlm /usr/local/bin/ezmlm-web' -#ScriptAlias /cgi-bin/ezmlm-web /usr/local/bin/ezmlm-web +#ScriptAlias /ezmlm-web /usr/local/bin/ezmlm-web diff --git a/ezmlm-web.cgi b/ezmlm-web.cgi index 2e8367f..0564b3c 100755 --- a/ezmlm-web.cgi +++ b/ezmlm-web.cgi @@ -21,7 +21,6 @@ use strict; use Getopt::Std; use ClearSilver; use Mail::Ezmlm; -use Mail::Address; use File::Copy; use File::Path; use DB_File; @@ -33,8 +32,24 @@ use English; # optional modules - they will be loaded later if they are available #Encode #Mail::Ezmlm::Gpg +#Mail::Address OR Email::Address +my $mail_address_package; +# we can use either the Mail::Address or the Email::Address module +# "Mail::Address" was used exclusively until ezmlm-web v3.2, thus it is proven +# to work with ezmlm-web +# the downside of Mail::Address is, that it is not available in the debian +# distribution +if (&safely_import_module("Mail::Address")) { + $mail_address_package = "Mail::Address"; +} elsif (&safely_import_module("Email::Address")) { + $mail_address_package = "Email::Address"; +} else { + die "Failed to import the Mail::Address and the Email::Address module.\n" . + "At least one of these modules is required for ezmlm-web.\n"; +} + # the Encode module is optional - we do not break if it is absent my $ENCODE_SUPPORT = 1; unless (&safely_import_module("Encode")) { @@ -1511,7 +1526,12 @@ sub add_address { tie %pretty, "DB_File", "$LIST_DIR/" . $q->param('list') . "/webnames" if ($PRETTY_NAMES); foreach $address (@addresses) { - ($add) = Mail::Address->parse($address); + # call the "parse" function of either "Mail::Address" or "Email::Address" + # based on the perl cookbook (chapter 12_14) + # we have to disable 'strict refs' for the call + no strict 'refs'; + ($add) = ($mail_address_package . "::parse")->($mail_address_package, $address); + use strict 'refs'; if (($add->address() =~ m/^(\w[\w\.\!\#\$\%\&\'\`\*\+\-\/\=\?\^\{\|\}\~]*)@(\w[\-\w_\.]+)$/) && !($list->issub($add->address(), $part))) { # it seems, that we cannot trust the return value of "$list->sub" @@ -1654,7 +1674,7 @@ sub create_list { -user=>$USER) ) { # fatal error - $customError = $list->errmsg(); + $customError = "[ezmlm-make] " . $list->errmsg(); return (1==0); } @@ -2460,7 +2480,8 @@ sub safely_import_module { my ($mod_name) = @_; eval "use $mod_name"; if ($@) { - warn "Failed to load module '$mod_name': $@"; + # we do not need the warning message + # warn "Failed to load module '$mod_name': $@"; return (1==0); } else { return (0==0); diff --git a/www-data/color-blue-gray.css b/www-data/color-blue-gray.css index d0d4cfb..5362af3 100644 --- a/www-data/color-blue-gray.css +++ b/www-data/color-blue-gray.css @@ -74,10 +74,14 @@ body { background-color: #c0c0b0; } -#main_content div.success, +#main_content div.success { + color: #202020; + background-color: inherit; /* just to avoid css syntax warnings */ + } + #main_content div.warning, #main_content div.error { - color: #202020; + color: #eeeeec; /* the dark red background requires a light color */ background-color: inherit; /* just to avoid css syntax warnings */ } diff --git a/www-data/color-red-blue.css b/www-data/color-red-blue.css index 79c0b48..6b99584 100644 --- a/www-data/color-red-blue.css +++ b/www-data/color-red-blue.css @@ -78,10 +78,14 @@ body { background-position: left; } -#main_content div.success, +#main_content div.success { + color: #2e3436; + background-color: inherit; /* just to avoid css syntax warnings */ + } + #main_content div.warning, #main_content div.error { - color: #2e3436; + color: #eeeeec; /* the dark red background requires a light color */ background-color: inherit; /* just to avoid css syntax warnings */ } diff --git a/www-data/default.css b/www-data/default.css index 8d68b40..7014273 100644 --- a/www-data/default.css +++ b/www-data/default.css @@ -194,6 +194,7 @@ button, select { cursor: pointer; } padding: 2%; text-align: center; font-style: italic; + font-weight: bold; font-size: 90%; }