Add qpsmtpd jail

tags/0.0.1
Daniel Berteaud 12 years ago
parent f9e841e5c2
commit 2bc85614b1
  1. 2
      root/etc/e-smith/templates/etc/fail2ban/jail.conf/15MaxRetries
  2. 26
      root/etc/e-smith/templates/etc/fail2ban/jail.conf/30Service20qpsmtpd
  3. 9
      root/etc/fail2ban/filter.d/qpsmtpd.conf

@ -1,5 +1,5 @@
{ {
my $maxretry = $fail2ban{'MaxRetry'} || '5'; our $maxretry = $fail2ban{'MaxRetry'} || '5';
$OUT .= "maxretry = $maxretry"; $OUT .= "maxretry = $maxretry";

@ -0,0 +1,26 @@
{
my $status = $smtpd{'status'} || 'disabled';
return "" if ($status ne 'enabled');
my @ports = ();
push @ports, ($smtpd{'TCPPort'} || '25');
push @ports, ($ssmtpd{'TCPPort'} || '465')
if (($ssmtpd{'status'} || 'disabled') eq 'enabled');
my $port = join (",", @ports);
my $max = $maxretry*3
$OUT .=<<"EOF";
[qpsmtpd]
enabled = true
filter = qpsmtpd
logpath = /var/log/*qpsmtpd/current
action = smeserver[port="$port",protocol=tcp,bantime=$bantime]
maxretry = $max
EOF
$OUT .= " sendmail[name=\"Qpsmtpd\",dest=$maildest]\n"
if ($mail eq 'enabled');
}

@ -0,0 +1,9 @@
[INCLUDES]
before = common.conf
[Definition]
_daemon = qpsmtpd
failregex = ^\s*\d+\s*logging::logterse plugin \(deny\): ` <HOST>\s*.*901.*msg denied before queued$
ignoreregex =
Loading…
Cancel
Save