ansible-fail2ban icon indicating copy to clipboard operation
ansible-fail2ban copied to clipboard

fail2ban_sendername and fail2ban_sender not taken into account when using sendmail as MTA

Open eHanseJoerg opened this issue 6 years ago • 1 comments

I am using the sendmail command (via SSMTP) as MTA. I made sure to configure sendmail/SSMTP in such a way that the FROM address is overwriteable by the service using the MTA (e.g. by fail2ban).

my fail2ban action is %(action_mwl)s

This will result in the action at /etc/fail2ban/actions.d/sendmail-common.conf to be executed.

I observe that fail2ban_sendername and fail2ban_sender are not taken into account. Replacing /etc/fail2ban/actions.d/sendmail-common.conf with a correctly configured /etc/fail2ban/actions.d/sendmail-common.local will resolve the problem.

Is this an error in the role or in fail2ban itself?

eHanseJoerg avatar Jan 12 '19 14:01 eHanseJoerg

Afaics this is an issue with the action configuration in jail.local which does not set the sender / sendername: https://github.com/fail2ban/fail2ban/issues/2071#issuecomment-371796715

deveth0 avatar Jul 18 '19 11:07 deveth0