I have a newly configured Virtualmin host Ubuntu 20.04 all the basics are configured and the first domain deployed.
Working on fail2ban config I cannot get any email notifications even though the correct action_mw or action_mwl are set and the default root@localhost destemail is set with mta = sendmail
What am I missing? Lots of google searching turned up a lot of conflicting information. But no solutions worked. I don;t want to start installing things that may break my virtualmin install which is working fine apart from no fail2ban notifications.
I tested sendmail from the command line using echo “Subject: test” | /sbin/sendmail -v root@localhost
This works fine and I get the email in the root account.
I have other virtualmin installs and this works OOTB on earlier Ubuntu versions.
Any help would be appreciated as I am drawing a blank.
Postfix is installed by virtualmin. Sendmail is still installed and works at the command line level as I have tested. As fail2ban is working under the root account with root privileges so should be able to be used as per the default fail2ban behaviour.
By experimentation I have managed to get email output. If I set the destemail to another mail system I have control over with a valid email account. e.g. destemail = validaccount@realmailserverontheinternet and send it from root@FQDN of the virtualmin host even though it is on a private subnet. I get email.
However if I try and get it to send to the root account of the virtualmin host server I get nothing.
This is weird. Does anyone have any explanation as to why this might be happening.