On 04-11-16 15:47, Dave Macias wrote:
> Hello,
> 
> Currently we have a basic postfix setup to send mail from the local box.
> 
> This works:
>> echo "message" | mail -s subject [email protected] <mailto:[email protected]> 
> 
> i have a jail under jail.d called sshd2.local
> 
>> [DEFAULT]
>> ignoreip = 127.0.0.1/8 <http://127.0.0.1/8> <ip-ranges>
>> destemail = <[email protected] <mailto:[email protected]>>
>> sendername = Fail2Ban
>> mta = sendmail
>> #mta = mail
>> action = %(action_mwl)s
>> 
>> [sshd2]
>> enabled = true
>> filter = sshd2
>> port = 2222
>> findtime = 3600
>> logpath = /var/log/sshd2
>> maxretry = 6
>> # 24 hours
>> bantime = 86400
> 
> I configured sendmail to work but i prefer using postfix. (dont want to
> maintain multiple methods of sending mail)
> 
> when i set mta=mail fail2ban fails to start and i dont get much output:

The config option 'mta' is a misnomer, since it does not set an actual
MTA to use, but a commandline tool that provides email sending service.

Both SendMail (the mta, not the spelling) and postfix provide a
'sendmail' binary, and have compatible commandline interfaces. the
'mail' command is a different binary, provided by a typical non-mta
package  (on ubuntu: mailutils).

If you want to use postfix, remove all of SendMail, install postfix, and
check that you have a 'sendmail' binary (e.g.: sudo which sendmail).
Then configure fail2ban to use 'sendmail'.

KInd regards,
        Tom

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Fail2ban-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fail2ban-users

Reply via email to