Commit ea37d57b authored by BowTyTroll's avatar BowTyTroll

Add missing require directive for Mail::IMAPClient

Add missing require directive for Mail::IMAPClient, when '-useimap' is
given. This prevents ugly dependency errors later, by clearly indicating
the requirement.
parent 28a2223b
#!/usr/bin/perl
#
my $scriptversion = "1.4.4";
my $scriptversion = "1.4.5";
my $scriptdate = "2018-07-11";
#
# check_email_loop Nagios Plugin
......@@ -84,6 +84,9 @@ my $scriptdate = "2018-07-11";
# - Correct missing require for IO::Socket::SSL if using explicit IMAP SSL
# - Make "INBOX" the default $imapfolder
#
# 2018-07-11 v1.4.5 BowTyTroll, TheTroll@BowTyTroll.com
# - Add missing require directive for Mail::IMAPClient, when '-useimap' given
#
#
# This software is licensed under the terms and conditions of the GPLv2 license
# https://www.gnu.org/licenses/gpl-2.0.html
......@@ -208,6 +211,7 @@ usage() if ($showversion || $status == 0 || ! ($pophost && $popuser && $poppassw
my @required_module = ();
push @required_module, 'Email::Date::Format';
push @required_module, 'Mail::IMAPClient' if $useimap;
push @required_module, 'Net::SMTP::SSL' if $usesmtpssl;
push @required_module, 'IO::Socket::SSL' if $usessl;
push @required_module, ('MIME::Base64','Authen::SASL') if $usesmtpssl && $smtpuser;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment