DKIM Plugin Issue

I’ve added Duncan’s DKIMplugin.php code to my admin/plugins folder and activated it in PHPlist. However, I’m still not seeing the DKIM header info added to the emails. I’m thinking there is a setting in the config that needs changed but can’t figure out what.

Your help would be appreciated but not a rush item as we are definitely headed into Christmas.

Thanks all,
Doug Davis

I just used a DKIM Header test tool and it says my DKIM is NONE. This means it is not sending the DKIM content. Two things come to mind: Does the DKIM Plugin get run when sending a TEST from the campaign template & is there a debug switch I can use to verify that the DKIM Plugin is being run

Thanks for any help,
Doug

ps: If you wish to communicate privately, I will share the full code of the DKIM plugin (trusting you won’t abuse the private key it contains)

Persistence … I had capitalized the S in selector!! Yeah, that picky.

It’s working PERFECTLY now. In honor of the inventor of it … I will post the source code here.

1 Like

Here is the SOURCE code for the DKIM Plugin:

<?php

class DKIMplugin extends phplistPlugin
{
public $name = ‘DKIM Plugin’;
public $authors = ‘Duncan Cameron’;
public $enabled = 1;
public $version = ‘1.00’;
public $description = ‘Adds the DKIM/Private Key to outgoing messages’;

public function messageHeaders($phpmailer)
{
	$phpmailer->DKIM_selector = 'default';
	$phpmailer->DKIM_identity = 'username@mydomain.com';
	$phpmailer->DKIM_passphrase = '';
	$phpmailer->DKIM_domain = 'mydomain.com';
	$phpmailer->DKIM_copyHeaderFields = true;
	$phpmailer->DKIM_extraHeaders = [];
	$phpmailer->DKIM_private = '';
	$phpmailer->DKIM_private_string = <<< 'KEYALL'

-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAxJiQvSM2YHQH5vI7C6f254aUyp/fWV6rYY5/+1T61+e4YFR+
(INCLUDE THE FULL PRIVATE KEY IN HERE)
1PgylUF3j4LKd531+Uq+aEp4xGFFTaGeT/lx5RvCUjvId7vM7Zh5
-----END RSA PRIVATE KEY-----
KEYALL;

	return array();
}

}

Build this into a file called: DKIMplugin.php

Use your own SELECTOR and EMAIL ADDRESS and DOMAIN.

Place that file into the ADMIN folder under LISTS (or whatever you named yours)

Now, check to make sure the plugin is ACTIVE and SUCCESS!!

Hope someone else finds this helpful …
Doug

2 Likes