Monthly Archive: July 2022

Helpful CWP Hints

I host a number of sites using the Control Web Panel (CWP), an open source alternative to CPanel. Even though I have support on CWP, there are a bunch of little things that are either not documented or not well documented. This post is collecting up my notes on things that are not or not well documented.


CWP has a built-in capability to backup configuration and end user data. It backs it up to a local directory, which you can then configure to rsync out to a different server. It even has a convenient way to test your ssh configuration (because of course the rsync tunnels via ssh). The odd thing is that you cannot test the configuration until after you save it. If you try testing before you save it, it uses the saved values (oh wait, there aren’t any saved values) and the test fails. So save before you test.

Mail Server Configuration

MailServer Manager

Note that the function to Rebuild Mail Server in reality builds a brand new configuration based on the options you selected. Any local customizations, such as setting a relayhost or updating so you don’t get duplicate DKIM headers will be lost when you click the Rebuild Mail Server button, so keep a good log of local changes or never use this button.

Helpful postfix Hints

On the servers I manage I use the postfix MTA (mail transfer agent). I occasionally find things about it that are not documented. I am adding this post to track those things so I can find them when need them. I hope some others can benefit from my notes.


After setting up CWP (Control Web Panel) I found that users could not send email. It was being rejected due to a duplicate DKIM header. Literally the same, exact DKIM header appearing twice in the headers. CWP uses postfix with opendkim. Postfix was calling opendkim twice, both before and after the Amavis anti-virus scan. The fix was a modification to to skip the milters call (where opendkim lives) after the Amavis call. inet n - y - - smtpd
-o smtpd_milters=

Add the -o smtpd_milters= entry in the inet n - y - - smtpd block of the configuration file and the duplicate DKIM headers go away.

I found this solution via this StackExchange post: