fail2ban 有効化†
# --- Postfix SASL ---
[postfix-sasl]
enabled = true
port = smtp,submission,465
filter = postfix[mode=auth]
logpath = %(postfix_log)s
# --- Dovecot ---
[dovecot]
enabled = true
port = pop3,pop3s,imap,imaps,submission,465
filter = dovecot
logpath = %(dovecot_log)s
- fail2ban 起動状況確認
[AWS MX2(sudo)]:~# sudo systemctl status fail2ban
● fail2ban.service - Fail2Ban Service
Loaded: loaded (/lib/systemd/system/fail2ban.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2026-01-08 11:09:35 JST; 9s ago
Docs: man:fail2ban(1)
Process: 28396 ExecStop=/usr/bin/fail2ban-client stop (code=exited, status=0/SUCCESS)
Process: 28397 ExecStartPre=/bin/mkdir -p /var/run/fail2ban (code=exited, status=0/SUCCESS)
Main PID: 28409 (fail2ban-server)
Tasks: 7 (limit: 4680)
CGroup: /system.slice/fail2ban.service
└─28409 /usr/bin/python3 /usr/bin/fail2ban-server -xf start
Jan 08 11:09:35 ip-172-31-22-38 systemd[1]: Stopped Fail2Ban Service.
Jan 08 11:09:35 ip-172-31-22-38 systemd[1]: Starting Fail2Ban Service...
Jan 08 11:09:35 ip-172-31-22-38 systemd[1]: Started Fail2Ban Service.
Jan 08 11:09:35 ip-172-31-22-38 fail2ban-server[28409]: Server ready
メール送信ポートの変更( 465 → 587 )†