DKIM (Domain Keys Identified Mail) is an email authentication technique that allows the receiver to check that an email was indeed sent and authorized by the owner of that domain. This is done by giving the email a digital signature. This DKIM signature is a header that is added to the message and is secured with encryption.

Using DKIM involves 3 steps:

  • Creating a Private and Public Key pair
  • Configuring your Public Key in your DNS as a TXT record
  • Adding your Private Key to mail servers which will sign email on your behalf

The script below shows how to create your key pair and what records to add at Metawerx:

# Generate key pair
openssl genrsa -out /tmp/metawerx.key 1024
openssl rsa -in /tmp/metawerx.key -pubout -out /tmp/

# Strip -----BEGIN/END PUBLIC KEY----- lines
sed -i "/-----/c\\" /tmp/metawerx.key
sed -i "/-----/c\\" /tmp/

# Strip CRLF
sed -z -i "s/\r//g" /tmp/metawerx.key
sed -z -i "s/\n//g" /tmp/metawerx.key
sed -z -i "s/\r//g" /tmp/
sed -z -i "s/\n//g" /tmp/

# Show results and clean up tmp files
echo; echo "Use this in Metawerx Mail Administrator as the DKIM Private Key:"; echo; cat /tmp/metawerx.key; echo; echo; echo "Use this as the TXT record metawerx._domainkey in Metawerx DNS Editor:"; echo; echo "\"v=DKIM1; k=rsa; p=`cat /tmp/`\""; echo; rm /tmp/metawerx.key; rm /tmp/;

The output should look something like this:

Use this in Metawerx Mail Administrator as the DKIM Private Key:


Use this as the TXT record metawerx._domainkey in Metawerx DNS Editor:

"v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQTGuM5svLwxJQua+CjwtwBM0EN7VPTM0rLmE+edZBT7ttuXzntOcP3oXnxtjNH4Vl+6Xc2A+JvsBDPWp+IMV1YETTEsJEUqD+oLWRlFc4QtIjLaaCv8ekTrQoZijGQy7RzE7iRWpvlUsr/Y3X9cuUIJcBQIDAQAB"

Log in to SiteWinder and:

  • in Mail Administrator, Domain Settings, under DKIM Private Key, enter the Private Key
  • in Domain Administrator, DNS Editor, add a new TXT record named metawerx._domainkey, leave the TTL empty and enter the "v=DKIM1; ..." text above and Save Changes
  • wait about 5 minutes for the changes to propogate, then use the testing tools below to verify everything looks correct
  • please contact support if you need any help or have any questions!


metawerx specific

referring pages