From b1d492603530bb47f2f5e348c1bb8fccb0cf0814 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sun, 12 May 2024 09:53:28 -0700 Subject: [PATCH] Only mailman 3 adds the domain name to the list name https://github.com/virtualmin/virtualmin-mailman/issues/3 --- virtualmin-mailman-lib.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virtualmin-mailman-lib.pl b/virtualmin-mailman-lib.pl index bbf163c..3e683ea 100755 --- a/virtualmin-mailman-lib.pl +++ b/virtualmin-mailman-lib.pl @@ -93,9 +93,12 @@ sub list_lists &read_file($lists_file, \%lists); opendir(DIR, $lists_dir); my ($f, $fdom); +my $ver = &get_mailman_version(); while($f = readdir(DIR)) { next if ($f eq "." || $f eq ".."); - ($f, $fdom) = split(/\./, $f, 2); + if ($ver >= 3) { + ($f, $fdom) = split(/\./, $f, 2); + } next if (!$lists{$f}); my ($dom, $desc) = split(/\t+/, $lists{$f}, 2); if (!$desc && $f eq 'mailman') {