====== dkim plugin ====== ---- plugin ---- description: Adds DKIM header to emails author : Duncan Cameron type : lastupdate : 2023/10/16 compatible : depends : conflicts : similar : tags : sourcerepo : https://github.com/bramley/phplist-plugin-dkim/ ===== Purpose ===== This plugin adds a DKIM header to emails sent by phplist. It simply passes-on the settings fields to phpmailer, which does the actual generation of the DKIM header. If your mail server already adds a DKIM header to outgoing mail then you probably do not need to use this plugin. The plugin can also be used to generate a DKIM header for the domain of the From address. This can help with DMARC verification as DMARC will fail when the From address is a different domain to that used for DKIM and SPF. Usually the DKIM header is for the domain on which phplist is installed. You need to create a DKIM private/public key pair, then create a DNS TXT record holding the public key. You can usually do this using the control panel of your web server. Otherwise you can use this DKIM record generator https://easydmarc.com/tools/dkim-record-generator ===== Installation ===== Install on the Plugins page (menu Config > Manage Plugins) using the package URL ''%%https://github.com/bramley/phplist-plugin-dkim/archive/master.zip%%'' ===== Configuration ===== The plugin adds a section to the Settings page where you can enter * the DKIM domain * the DKIM selector * the DKIM identity (optional) * the private key * the path to a file containing the private key * the passphrase for the private key file (optional) * whether to include the field values in the DKIM header. * or enter one or more sets of DKIM fields in a text area when you want to use the From address. ==== Generating DKIM header for the domain ==== You must enter the domain, the selector and either the private key or the path to a file containing the private key. The private key field takes precedence over the private key path. For example, if the name of your DKIM record is ''default._domainkey.mydomain.com'' then * the domain is ''**mydomain.com**'' * the selector is ''**default**'' * the private key is the text of the private key. Copy and paste that from the generated private key, including the BEGIN and END lines -----BEGIN RSA PRIVATE KEY----- MIICXQIBAAKBgQDY0g55Ks4QWc1JyiwdMDIKV9NpQzk5aDhIpD5boaKu80C3WrIy ... MLumvW5nNkpiQbvwx3SnlKM3RCLU1rUARePSnSnsYY56 -----END RSA PRIVATE KEY----- ==== Generating DKIM header for the From address ==== The section on the Settings page has a text area where you can enter the domain, the selector and the private key for one more domains that you will be using as the From address for campaigns. Each set of fields must be separated by a blank line. othersite1.com phplist -----BEGIN RSA PRIVATE KEY----- MIICXQIBAAKBgQDY0g55Ks4QWc1JyiwdMDIKV9NpQzk5aDhIpD5boaKu80C3WrIy ... MLumvW5nNkpiQbvwx3SnlKM3RCLU1rUARePSnSnsYY56 -----END RSA PRIVATE KEY----- othersite2.com phplist -----BEGIN RSA PRIVATE KEY----- MIICXQIBAAKBgQDY0g55Ks4QWc1JyiwdMDIKV9NpQzk5aDhIpD5boaKu80C3WrIy ... MLumvW5nNkpiQbvwx3SnlKM3RCLU1rUARePSnSnsYY56 -----END RSA PRIVATE KEY----- The plugin will use the domain of the From address to choose the selector and private key for generating the DKIM header. If the From domain is not found then a DKIM header for the domain will be generated.