Notice: This method is now considered outdated.
You can now use the built-in cPFence Backup and Restore feature to automatically copy your SMTP configuration (and all other settings) between servers in one step.
For updated instructions, see: How to Back Up and Restore cPFence Settings?
If you need to apply the same SMTP settings across multiple servers, you can configure it once on one server and then manually copy the configuration to the others.
Step 1: Configure SMTP on the First Server
To set up SMTP on your first server, run the following command:
cpfence --set-email [email protected]
This will prompt you to enter your SMTP details, and cPFence will automatically generate the configuration file.
Step 2: Copy SMTP Settings to Other Servers
Once configured, locate the SMTP settings in the following file:
/etc/s-nail.rc
At the bottom of the file, you will see the SMTP configuration added by cPFence:
# cPFence SMTP Configuration - START
set v15-compat
set from="[email protected] (your-server-name)"
set mta=smtps://your-encoded-username:[email protected]:465
# cPFence SMTP Configuration - END
To apply the same settings to another server:
- Open the same file on the new server:
nano /etc/s-nail.rc
- Paste the copied configuration at the bottom of the file.
- Update the server name inside the
set from
field to reflect the new server. - Save and close the file.
Once done, the SMTP settings will be active immediately.
Need Further Assistance?
If you encounter any issues or need additional help, feel free to reach out to our support team via your client portal.