I am wondering if it is possible to configure postfix master.cf file from database. Same as, for example, in main.cf one can set

alias_maps = pgsql:/etc/postfix/pgsql-aliases.cf

What I'm specifically trying to do is to have several SSL certificates. It can be done fairly easily by modifying master.cf as shown here.

However, I am trying to avoid having to restart the server. I though that the cleanest way to do that would be to configure the master.cf from a database.

If this is not possible, is there any way around restarting the server, or in the worst case, making sure that no mail is lost?

Thank you.

  • Do you want to have several main.cf configurations and activate one or the other? what about just copying or soft linking the right one? And for getting the new configuration you don't need to restart, you can just reload postfix. Also even if you restart you wouldn't be losing email since messages tend to be re-sent if something went wrong (also you want to have a backup mail server) Apr 23 '14 at 17:38
  • So if I am reloading postfix, is still able to receive and save mail? I'm ok with having several main.cf files.
    – Anton
    Apr 23 '14 at 17:42
  • Yes, reload just re-reads configuration files, postfix still runs. Even if you restart it it's very unlikely that you'll lose any email. Apr 23 '14 at 17:46
  • Sweet. That, in my books is an answer, so if you want to post it as an answer, I'll accept it.
    – Anton
    Apr 23 '14 at 18:01

For getting the new Postfix configuration you don't need to restart, you can just reload postfix as recommended : "in order to refresh the Postfix mail system after a con- figuration change, do not use the start and stop commands in succession. Use the reload command instead."

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.