Docker-mailserver: How to reload without restart

Created on 17 Aug 2016  路  7Comments  路  Source: tomav/docker-mailserver

Well the title is pretty explanatory but I was wondering how to reload the config easily without docker exec -ti mail bash then modifying the files manually and reloading each services individually?

Thanks for this great container!

question

Most helpful comment

SQLite as indeed the advantage not to rely on a server. File can be consumed directly.

All 7 comments

Thank @YouriT!
Regarding your question, currently I reload postfix process when I add an alias directly in the /etc/postfix/ folder using docker exec mail /etc/init.d/postfix reload.

If your change is related to an account a low level configuration, you have to restart your container which takes few seconds.

Perhaps few things can be improved, I'm open to suggestions and pull requests.

I used to have postfix linked to mysql and I needed no restart to load new accounts. This is really a problem (the need to stop the whole service to add an email account or change a password).
Is there any way of changing the postfix-accounts.cf file and reload postfix without having to restart the whole service?

I must agree with @citec on that point.
The use case is pretty simple, you don't want to restart your service (even if it's fast) each time you add a new mailbox to your system. Hopefully MX will try again later but that should not be the regular use-case I'd say. A simple DB even with SQLite would help solving this problem @tomav isn't ?

@citec I found another one that works with MariaDB if that's what you're looking for: https://github.com/hardware/mailserver

Hi guys, just to be clear, I do agree with you 馃槃
It's just that it doesn't exist right now in the proposed features.

A database will go against the concept of this image which is supposed to be based on static files, at least by default. I'm not opposed to any other approach as options in the image.

The feature you request could be added with a refactor of bin/start-mailserver.sh if you want to look at it.

And what about a SQLite? You would still rely on static files while having a database :)

As I mentioned in another issue, we could set the auth method using an env var and the bin/start-mailserver.sh script can do the rest

SQLite as indeed the advantage not to rely on a server. File can be consumed directly.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

InsOpDe picture InsOpDe  路  4Comments

H4R0 picture H4R0  路  3Comments

42wim picture 42wim  路  4Comments

cottonthread picture cottonthread  路  4Comments

nekrondev picture nekrondev  路  3Comments