I have postfix installed on one computer, with DKIM and SPF working properly. What I'd like to do is start using a different computer instead, with the minimal amount of fuss.

Mail servers have a way of baffling me, but I know there are things with cryptography going on here that I don't fully understand (and I don't really care to - I figured it out when I set up the last computer about a year ago, and am happy not to delve into it again).

Right now, I'm working on the early steps of this process -- installing postfix on the new machine, and getting it going.

Are there specific steps I could take to move the correct configs and key files and such to the new computer?


As you are already working on a fresh install, the first thing I would suggest is stop what you are doing, and immediately start documenting what you have done up to now. (history is your friend!), and continue to document the process as you progress, then if you ever end up having to perform the install again, you've got the process documented. We have a wiki on our internal network, and we document absolutely everything related to our servers and network infrastructure, and it pays dividends having this information available.

As you've still got the original install up and running, you can reference all your configuration files from that install. Once you've got postfix and anything else you need installed, start going through the config files (starting with /etc/postfix) on your working system, and examining the files one by one, and transferring them across as needed.

Ensure you fully test everything before you switch over to the new system, as user's won't be happy if you lose mail, or other mail servers start refusing email from you because you have an open relay.


Ultimately, the answer is roughly as follows (please add to this any missing details others come up with):

  1. Install postfix and opendkim.
  2. Move the opendkim file over to the new server from /etc/opendkim.conf
  3. Move the postfix configuration over to the new server from /etc/postfix/main.cf
  4. Move the dkim private key from the old server to the new one (check your opendkim.conf file to see where it is).
  5. Restart opendkim. Restart postfix.
  6. Send test email to verify that dkim and spf are working.

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.