From 60847413eff9f120eda5b061b0911ecaa2064464 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Wed, 29 May 2024 13:24:51 -0700 Subject: [PATCH] Always load the postfix module https://github.com/virtualmin/virtualmin-mailman/issues/2 --- virtualmin-mailman-lib.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/virtualmin-mailman-lib.pl b/virtualmin-mailman-lib.pl index 3e683ea..aa53f22 100755 --- a/virtualmin-mailman-lib.pl +++ b/virtualmin-mailman-lib.pl @@ -12,6 +12,9 @@ eval "use WebminCore;"; &init_config(); &foreign_require("virtual-server", "virtual-server-lib.pl"); +if (&foreign_check("postfix")) { + &foreign_require("postfix"); + } my %pconfig = &foreign_config("postfix"); my $postfix_dir; @@ -159,7 +162,6 @@ sub mailman_check return &text('feat_efile', "$maillist_file") if (!-r $maillist_file); return $text{'feat_epostfix'} if ($vconfig{'mail_system'} != 0); - &foreign_require("postfix", "postfix-lib.pl"); my @files = &postfix::get_maps_files( &postfix::get_real_value($transport_map)); return $text{'feat_etransport'} if (!@files); @@ -259,7 +261,6 @@ sub create_list if (&get_mailman_version() >= 3) { # Setup Postfix to use Mailman LMTP - &foreign_require("postfix"); &postfix::lock_postfix_files(); my $lmtp = "hash:".$lmtp_map; my $domains = "hash:".$domains_map;