Fail2Ban emails on reboot of nas

    • OMV 2.x
    • Resolved
    • Fail2Ban emails on reboot of nas

      I am a newcomer to openmediavault after coming from WHS 2011 and have found most of my answers for my problems from just reading the forums. I recently installed fail2ban 1.1.4 plugin and everytime I reboot I get about 120-130 emails saying jails started and stopped. All I have enabled is nginx-404, owncloud, ssh, and ssh-ddos. I have went into /etc/fail2ban/action.d and commented out the actionstart and actionstop in all the conf files in there. I even uninstalled and purged the fail2ban plugin with apt-get --purge and manually by tracing down the folders and I still get the emails. Can anyone point me in the general direction on how to make fail2ban only send emails on banned ips and not on start and stop of the jails. Thanks in advance! OMV version is 2.2.3 BTW
    • I had experienced what seems like a similar problem. Every boot I'd get the same e-mails sent to me. It didn't matter if I had uninstalled the component, each restart the same e-mails would be sent. The issue for me was that the mail program's, postfix, directory was corrupted. This was due to the 'Flash Memory' bug that moved it's directory while the service was active.

      Do you have the plug-in 'Flash Memory' installed or did you do something with the mail directory? If so the only thing I found to reliably fix it was to:

      1) Stop the postfix service.
      2) Uninstall the postfix service.
      3) Manually delete the postfix directory (if it is still there).
      4) Reinstall postfix
      5) Restart the postfix service (if necessary).

      This worked for me 100% of the time. Then I just had to make sure nothing corrupted the directory again.
    • Yes I have the flash memory plugin installed. Never would have tied the two together!? And before I royally screw up, I am not totally up to snuff on linux as of yet. Here are some questions....
      1. I can stop the service with "service postfix stop" I understand that
      2. When I went to uninstall postfix with "apt-get --purge remove postfix" and it was about to uninstall alot of my other plugins like sabnzbd, docker-gui, nginx, and etc and I chickened out and aborted. What is the correct way to uninstall it?
      3. Is the directory "/var/spool/postfix" the one I delete?
      4. If I uninstall postfix is reinstalling just as easy as "apt-get install postfix"?


      Sent from my Nexus 6 using Tapatalk
    • Yeah, it took me quite a while to debug. The connection isn't obvious. In the pre-fixed version it would immediately move all the directories to memory and it would corrupt the postfix directory.

      I'll post the exact commands when I get back home in a few hours. My above directions were from memory. I also forgot to mention that before you fix it you'll need to move postfix out of memory and back on the disk or it might be broken again next boot if the fixed directory doesn't copy back to disk properly.

      The flash memory plugin should have been fixed back in February. So maybe you have the old version still installed.
    • Okay, I have my notes:

      1) Disable 'Flash Memory' Plugin from the OMV Web Interface. Just use the disable button and 'Apply'. You need to have the postfix directories on the actual disk and not in memory. If they are cached when you apply the fix you are only fixing what's being cached and it doesn't copy the solution back to the actual disk. (Optional: If you are unsure whether disabling has taken effect you can reboot after disabling which should put the issue to rest definitively.)

      2) Disable postfix. This can be accomplished by disabling notifications in the OMV Web Interface (and 'Apply').

      3) Remove the corrupted directory: rm -rf /var/spool/postfix

      4) Reinstall postfix: apt-get install --reinstall postfix

      5) Re-enable 'Flash Plugin'. (Optional: Reboot if you want to be sure this has moved the directories to memory.)

      6) Re-enable notifications.

      The reboots for 'Flash Plugin' may not be necessary, but I'm unsure which version you are using.
    • Thank you buddy! I went from having 214 emails to 0 on reboot of my nas. It literally made it boot faster! Just for clarification does the omv-extras plugins (ie. Flash Memory) update through the update manager on the WEBUI or do you have to do it manually somewhere else? That may be a stupid question it just cant remember seeing any updates come through in the WEBUI for plugins.