Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to start out saying that I know enough Linux commands to be dangerous :-) With that warning out of the way, here is what I am trying to figure out how to handle.

Currently I have a single server running Ubuntu 12.04 and Postfix. I would like to have a second server running for redundancy, and set a second MX record in my DNS for this server.

I'm trying to minimize the chance of error in having two separate servers with the possibility of two different configurations. Specifically with regard to the custom relay_recipients and custom_replies files (along with the .db version of each of these files created from the postmap process).

Scheduling a rsync process would appear to be one method of getting the files synced between the servers. However this would leave a period of time after one system is updated that the other system is out of date, until the cron job ran. I am also presented with the problem of running the sudo postfix reload command if a new file is synced.

So I guess ideally I would like my "main" system to detect when a new relay_recipents.db file (or custom_replies.db) is created. Then push those files to the backup server. On the backup server once any new files are detected then sudo postfix reload should be executed to allow the changes to go into effect.

Any ideas on how to best accomplish something like this?

share|improve this question

This method is more or less what you're looking, for I think.

share|improve this answer
Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – MadMike Feb 13 '14 at 8:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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