Added postfix and dovecot for fail2ban#476
Added postfix and dovecot for fail2ban#476Spitfireap wants to merge 3 commits intomodoboa:masterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #476 +/- ##
=======================================
Coverage 50.07% 50.07%
=======================================
Files 10 10
Lines 681 681
=======================================
Hits 341 341
Misses 340 340 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
port 587 , can also be written as "submission". so you could use : also filter names in jail.d/[doveot|postfix].conf should be "dovecot-modoboa" and "postfix-modoboa" edit] actually, filters dovecot-modoboa.conf and postfix-modoboa.conf are identical with fail2ban defaults dovecot.conf and postifx.conf, so maybe those are not needed at all.. just use fail2ban defaults (?) |
|
The It may be good to split Since RFC 8314 the SMTPS port 465 with implicit TLS is the default MTA entrypoint. This means Further I agree to use the default, packaged configuration files and remove them here, if they are not to be altered. |
|
About RFC 8314, also see #564 . |
| }, | ||
| { | ||
| "option": "ports_blocked", | ||
| "default": "http,https,pop3,pop3s,imap,imaps,587" |
There was a problem hiding this comment.
This variable seems overloaded with specifics, and might be split into
- ports_blocked_mta: smtp,smtps,ssmtp,submission,submissions
- ports_blocked_mda: pop3,pop3s,imap,imaps
- ports_blocked_web: http,https
and be applied separately in the places where used.
There was a problem hiding this comment.
I'm using this:
[dovecot]
enabled = true
port = imap,imaps,pop3,pop3s
maxretry = 3
bantime = 1h
findtime = 1h
filter = dovecot[mode=aggressive]
logpath = /var/log/mail.log
ignoreip = ::1 127.0.0.1/8
How to find sane defaults?
There was a problem hiding this comment.
This seems to work:
[postfix]
enabled = true
port = smtp,ssmtp,smtps,submission,submissions
maxretry = 3
bantime = 1h
findtime = 1h
filter = postfix[mode=aggressive]
logpath = /var/log/mail.log
ignoreip = ::1 127.0.0.1/8
|
|
||
| journalmatch = _SYSTEMD_UNIT=postfix.service | ||
|
|
||
| # Author: Cyril Jaquier No newline at end of file |
There was a problem hiding this comment.
| # Author: Cyril Jaquier | |
| # Author: Cyril Jaquier | |
|
How can we test that fail2ban rules are successfully applied to network filter tables? When instead using default packaged |
Not tested yet.