mailcow / mailcow-dockerized

mailcow: dockerized - ๐Ÿฎ + ๐Ÿ‹ = ๐Ÿ’•
https://mailcow.email
GNU General Public License v3.0
8.59k stars 1.15k forks source link

Feature Requests: Health Checks, Remediation, Backup/Restore Support, Import Mail #228

Open philip-ulrich opened 7 years ago

philip-ulrich commented 7 years ago

Hey andryyy,

As mentioned before, <3 mailcow. I have some feature requests that I was not sure if they had crossed your mind or might be something you are interested in:

I've noticed that some of these have been mentioned in the old repo, but haven't seen much traction. I'm wondering if they still have a place in the dockerized version as there seems to be a bit of difference in the directions of both.

Along the same lines, I'd like to eventually help with this project if you're looking for assistance. I don't have the bandwidth at the moment though. I haven't found a contributing guide and see that PRs seem to be hit and miss. Is assistance with this something that you desire and do you have a list of things that you are currently working on or plan to do that you need help with?

- Phil

andryyy commented 7 years ago

Hi Phil,

you can import mail as mailbox user (login with mail credentials to mailcow UI).

Backup and Restore may return, it is just that I try to avoid messing with mails from within the UI. Or any task that requires higher access rights. :)

Health checks sound great, I already tried this or that. I would love to hook the Docker API to the UI and start providing image versions or hash-check the images in use. We would have to place the web UI files into the image to not break updates from within the UI itself then (or you would need to git pull after updating the containers). A backup process of Dovecot (or other containers) would be easier though.

Problems I see with Docker API:

Portainer is not bad for monitoring Docker health, too. Brad added a how-to to the docs. :)

philip-ulrich commented 7 years ago

Much like @chaosbunker, I never actually realized you could import either. Very good to know!

For portainer, it was good for the little while I used it. Unfortunately when I was using it; it would reset the password each restart and I couldn't find a way around that. It does provide good health information, but IIRC I don't believe it had notification options or auto-recovery. A good point though. If I could find out how to retain the password, I would install it again. ๐Ÿ˜†

Braintelligence commented 7 years ago

How about using an external healthcheck service like https://healthchecks.io/ or https://github.com/cantino/huginn/blob/master/README.md

You would need to think of a testing strategy for each service then, though. Testing http access is easy, though :D.

Maybe @andryyy has an idea on how to create cron healthchecks for mail sending and receiving?

andristeiner commented 7 years ago

Take a look at http://buhacoff.net/software/check_email_delivery/ which will check the whole SMTP/IMAP pipeline. You could run this either in a existing Nagios/Icinga setup, or just somewhere locally through a cronjob.

catcun commented 7 years ago

To check email delivery problems with alerting I am thinking of evaluating https://www.everycloudtech.com/free-mail-flow-monitor

discofris commented 7 years ago

I'm using Monit in non-docker environments. You could include/install the binary/package in every container and have Monit check the pid/port/ ... . https://mmonit.com/wiki/Monit/ConfigurationExamples#postfix

And then maybe display everything in the MailCow UI?

philip-ulrich commented 7 years ago

I like all the ideas everyone is putting out! Hopefully we can get something implemented inside mailcow eventually. For now, https://www.everycloudtech.com/free-mail-flow-monitor seems to be the best/easiest option at no cost.

marrco commented 7 years ago

+1 for monit in non docker environment

mkuron commented 7 years ago

Monit I find a bit dangerous because it automatically restarts services it considers unhealthy. If you manually stop a service for maintenance but forget to tell Monit, it will restart the service, potentially causing data loss.

marrco commented 7 years ago

@mkuron you can set monit to just send an email if you don't like automatic restarting. Or create an advanced check able to tell maintenance mode from a service crash

thomas126 commented 3 years ago

Would be interested in this too. Since there is a Monitor Page ok the Web for Mailcow isnโ€™t it possible to send an internal mail if some container is down?

andryyy commented 3 years ago

watchdog-mailcow does, see mailcow.conf :)