fail2ban looks in wrong log for postfix

Bug #1656856 reported by Walt Mankowski
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
fail2ban (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

The postfix jails in fail2ban look in the mail.warn log. But the default install of rsyslog has the mail.warn rule commented out, so nothing gets logged there. Also I think the messages it's looking for go to mail.log, not mail.warn.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in fail2ban (Ubuntu):
status: New → Confirmed
Revision history for this message
scnaifeh (scnaifeh) wrote :

This may also be related to the following bugs.

#1482899
#1669512
#1645693

If postfix jail is enabled at time of upgrade, upgrading fails because when fail2ban attempts to restart after upgrade, it can't find the postfix log file now set in paths-delian.conf.

Also occurs if dovecot jail is enabled, because by default, dovecot jail looks in the same log file as postfix jail.

Revision history for this message
Jonathan Kamens (jik) wrote :

Seven months old and no progress on fixing this SECURITY BUG?

Revision history for this message
Bill McGonigle (bill-launchpad-net) wrote :

Seems to have been fixed upstream with the package:
 https://github.com/fail2ban/fail2ban/commit/57ea38c342b2caa17b61a8cd17f142c218fd0742

and in 0.10.2-2.1 in Debian, but not backported to 0.9.6-2 in Debian or 0.9.3-1 in Ubuntu 16.04.5 LTS, so this is still failing to detect certain attempted intrusions.

Revision history for this message
ñull (erniecom) wrote :

on 18.04 LTS this is still an issue. mail.warn just does not include all the intrusion attempts making it complicated to jail them. An example is on of the default filter rules:

^%(__prefix_line)sNOQUEUE: reject: RCPT from \S+\[<HOST>\]: 554 5\.7\.1 .*$

It simply does not appear in mail.warn but it does in mail.log .

What would be a work around in stead of waiting for a fix?

Revision history for this message
ñull (erniecom) wrote :

Still present in 18.04LTS. For instance the first postfix jail filter rule catching RBL blacklisted intruders:

^%(__prefix_line)sNOQUEUE: reject: RCPT from \S+\[<HOST>\]: 554 5\.7\.1 .*$

It simply does not appear in mail.warn making the rule basically useless.

I will repost this on https://github.com/fail2ban/fail2ban/issues

Revision history for this message
ñull (erniecom) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.