my $re_ipv4 = qr/\d{1,3}(?:\.\d{1,3}){3}/;
my $re_6g = qr/[[:xdigit:]]{1,4}/;
my $re_6s = qr/${re_6g}:/;
-my $re_ipv6 = qr/(?:${re_6s}){,7}${re_6g}(?:::(?:${re_6s}){,5}${re_6g})?/;
+my $re_ipv6 = qr/${re_6s}{,7}${re_6g}(?:::${re_6s}{,5}${re_6g})?/;
my $re_ip = qr/(?:${re_ipv4}|${re_ipv6})/;
###############################################################################
sub check_running_dovecot
{
-system('dovecot --version >/dev/null');
+system('dovecot --version >/dev/null 2>&1');
if ($? == 0)
{
print "Dovecot appears to be available\n";