Fail2ban not sending mail

DDuek

New member
Joined
Jul 10, 2022
Messages
7
My fail2ban setup works perfectly except it refuses to send mail to me.
I use sendmail and anything going to root is aliased to my email address. I know it works, because Logwatch send me mail every day and if I create a mail to root@localhost it arrives in my mailbox so ergo, it's something to do with fail2ban.

I've set jail.local.conf
destemail = root@localhost
sender = root@localhost
sendername = Fal2Ban
mta = mail (I've also tried mta = sendmail)
action = %(action_mwl)s

I've even tried logging in as root, but still no mail.

Can anyone spot where I've boobed?
 
I'm not using fail2ban, but I read that they use jail.local in their example and not jail.local.conf and also they use sendmail as mta.

Maybe it's worth trying to change the filename and the mta and see if that helps?
 
I tried sendmail and mta and mail, none work'
I can't see what changing the name of the folder from,local would make any difference
 
I can't see what changing the name of the folder from,local would make any difference
Not the name of the folder, the name of the file. From jail.local.conf to just jail.local. What that would make difference?
As far as I seen, Fail2ban reads the overrule files, the example given on the site of Fail2ban themselves was jail.local and not jail.local.conf so maybe F2B only reads .local files? I don't know.
As said, I don't work with F2B, it's just what I found at their site what should work.

Look at this other site, also using only .local and not .local.conf so what is the problem trying it? If can't hurt trying.

If yo tried and nothing works, then I've no clue. Don't know if any mail logs or other logs show anything.
 
I'm gonna back it up first and then I'll try it. I'll get back to you.
 
Backed it up, changed the name. Fail2ban refuses to start comes up with red errors, I named it back to .conf and all was well again,

It was worth a try. Thanks, but it didn't work.
 
That would mean Exim is not working. Is there no /var/log/maillog either?
Are you even running Directadmin?
 
Hi Richard. Yes there is a mail log, no there is no exim and I don't have a clue even what DirectAdmin is.

I'm not a linux gurus, I'm was eDirectory/NDS Guru. All I use the server for is to run two Name-based, virtual apache forums. I have managed to get Let's encrypt Certificates. After weeks of battling, I got fail2ban working. I have a GroupWise Mail Server running on NetWare, so I only installed and configured Sendmail to SEND mail (for the forums) and not to receive mail.
It's been sending Logwatch to root, which is aliased to my GroupWise email address, but for some reason it either isn't getting to root@localhost OR Sendmail isn't sending it.
My Linux skills are minimal. NetWare and Windows I don't need help.
 
It could be you are posting question and dont realize this forum is for community support of Directadmin web panel.

Fail2ban is not supported Natively on this panel.

GroupWise
Now there is a name I haven't heard since 2000.
 
and I don't have a clue even what DirectAdmin is.
Well I'm just asking because you're here on the Directadmin support forums. I only tried to help because some users here also use fail2ban, but it's not a core part of Directadmin, so in fact you would be on the wrong forums to ask this anyway. ;)
Unfortunately I can't help you any further as there should be some errors in some log and as said, I'm no fail2ban user.

You maybe might best ask over at a general Linux support site like serverfault.com which also has more fail2ban questions present already.
 
Back
Top