Add qpsmtpd jail

This commit is contained in:
Daniel Berteaud 2013-05-02 19:10:31 +02:00
parent f9e841e5c2
commit 2bc85614b1
3 changed files with 36 additions and 1 deletions

View File

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

View File

@ -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');
}

View File

@ -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 =