As a test change the 2nd mailinform to a 1
Code:
my $mailinform = 1;
[skip down]
$mailinform = "0" unless $mailinform;
And if you want, try : instead of = in the below so it would be mail:s (to make it optional on the line & just use the current value)
Random thought, does GetOptions in perl require a double dash -- instead of a single - ?
Though you would be the first to complain, so it makes me wonder if it's not something else on your end.
Code:
GetOptions ('mail=s' => \$mailinform,
'warning=s' => \$warning,
'critical=s' => \$critical
);
if ($mailinform !~ /^(0|1)$/) {
print "ERROR : the mail value must be '1' or '0' to disable mail notification\n";
print_usage();
} Out of curiosity have you tried with an older version of that script because this probably needs to be fixed to reflect the 1/0 usage instead of yes/no:
Code:
print "Utilisation: ./quota_zimbra.pl -mail [yes | no]
print "\t-mail [yes | no]\n";