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;