• Resolved Anonymous

    (@lookya23)


    Hi,

    Tank you for your great plugin, i would like complete my DKIM validation, for this i need put my DKIM private key, can you tell me where i can put the code ?

    // Test of DKIM
    $this->DKIM_domain = ‘mydomain.ch’;
    $this->DKIM_selector = ‘s1’;
    $this->DKIM_private = ‘/home/clients/mix_numbers_and_letters/mydomain.ch/s1.mydomain.ch.pem’;
    $this->DKIM_passphrase = ‘’;
    $this->DKIM_identity = ‘[email protected]’;

    Or another way ?

    Thank you so much . Best regards

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • HI @lookya23,

    Thanks for reaching out. You can use the following custom codes and here’s how to easily add custom codes in your site.

    add_filter( 'wp_mail_smtp_custom_options', function( $phpmailer ) {
    	$phpmailer->DKIM_domain = 'mydomain.ch';
    	$phpmailer->DKIM_selector = 's1';
    	$phpmailer->DKIM_private = '/home/clients/mix_numbers_and_letters/mydomain.ch/s1.mydomain.ch.pem';
    	$phpmailer->DKIM_passphrase = '';
    	$phpmailer->DKIM_identity = '[email protected]';
    	return $phpmailer;
    } );

    I hope this helps!

    Thread Starter Anonymous

    (@lookya23)

    HI !

    thank for your reply,

    i have put this inside my template fonction.php

    add_filter( 'wp_mail_smtp_custom_options', function( $phpmailer ) {
    	$phpmailer->DKIM_domain = 'MON-DOMAINE.fr';
    	$phpmailer->DKIM_selector = 'k1';
    	$phpmailer->DKIM_private = '/wp-admin/user/k1.MON-DOMAINE.fr.pem';
    	$phpmailer->DKIM_passphrase = '';
    	$phpmailer->DKIM_identity = '[email protected]';
    	return $phpmailer;
    } );

    1/ when you see ” MON-DOMAINE ” is for privacy, of course normally is my real name domain

    2/ K1 is good selector, i have make a record TXT DNS with this selector k1._domainkey.MON-DOMAINE.fr : v=DKIM1;t=s;p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCvlJ6jGVLBb2fiq03vmmKx8Nk/YSP4rzwl9vgiHEGj5xiEWErwCd6TSmr3QgrpR4h/vYGk2tVElzLNCEvJHYiAqeXsM+il0lgXI1Z0Z/av33XzKMejGYY0yzEHCWVWoq1JsZf89bNDV2clMHWDDM3wOYsk2gPXMvhIyoOOIT+Z+wIDAQAB

    3/ ” /wp-admin/user/k1.MON-DOMAINE.fr.pem ” i dont know where pu this .pem file, i have put in this path … this file ” k1.MON-DOMAINE.fr.pem ” have the DKIM private key inside.

    4/ DKIM passphrase i don’t know what is it i leave blank space in this setting ..

    After that, When i check this setup with” DKIM Record Checker ” all looks good, this test don’t show any error.

    But ! When i send a test email with your plugin at a tools for analyse the email header for exemple (www.appmaildev.com/en/dkim) i get this feedback :

    DKIM-Result: none (no signature)

    Report-Id: c1cd2a9c
    Sender: <[email protected]>
    Header-From: <[email protected]>
    HELO-Domain: mout.kundenserver.de
    Source-IP: 217.72.192.74
    SSL/TLS: TLS secured
    Validator-Version: 1.09 
    
    x-sender: [email protected]
    x-receiver: [email protected]
    Received: from mout.kundenserver.de ([217.72.192.xx]) by appmaildev.com over TLS secured channel with Microsoft SMTPSVC(8.5.9600.16384);
    	 Mon, 31 Aug 2020 15:56:45 +0000
    Received: from MON-DOMAINE.fr ([82.165.83.xxx]) by
     mrelayeu.kundenserver.de (mreue107 [213.165.67.xxx]) with ESMTPSA (Nemesis)
     id 1Ml76o-1krdDs1jrg-00lVhn for <[email protected]>; Mon, 31 Aug
     2020 17:56:44 +0200
    Date: Mon, 31 Aug 2020 15:56:44 +0000
    To: [email protected]
    From: NAME OF MY WEBSITE <[email protected]>
    Subject: WP Mail SMTP: HTML E-mail de test pour [email protected]
    Message-ID: <[email protected]>
    X-Mailer: WPMailSMTP/Mailer/smtp 2.3.1
    X-Mailer-Type: WPMailSMTP/Admin/Test
    MIME-Version: 1.0
    Content-Type: text/html; charset=UTF-8
    X-Provags-ID: V03:K1:DpE0l+3F35/ck63gDSft70+jZq00RGoYSY8MIotl8EfsRaGVU49
     D2acBGuOVNikOFA1oLWvFVCxI7xyn0XlHqzzj1dVs66SqP9tdltQ2no7G8e6LZABcmKMj71
     sxpZDWea1x5R0AoiwvADF3JJYiUUMWMDu/UnarY/irOnkUim18GlCXqgGpMEpG3ZPn78VcG
     GeyacuUh8kznk8X5B68wA==
    X-Spam-Flag: NO
    X-UI-Out-Filterresults: notjunk:1;V03:K0:ReAhZvlsOfg=:WdVYhfr1IQY3LB3Et4XNPw
     AxSHoVilYJuOgeKDIB9TLykZ0wVvrUyOMODbgjJc9SDkb5TQf1k0dhkoZXVihapWnlFLytYlu
     jIGJ3CEj84O07fz5BpBFF+X50Kau6Vjqmsco4kkFqC69CiNbpKG7KnCIoEODyzDpsAXkR1Hja
     Aqx3Nh+B23THB0qQTEP1mlAtbJJDe4PO/siaBK0Y51psx6S4dfPdlb2t7gA1SIJ9FOw1dsXC2
     nf9fjbsKSJNIuTAe/WIXx2G087Bp1xCGAtu7AHGJD8sVrr4KOxgkI7GnundxiMg3lm9jJySuv
     6MpQd0bO/QJ4AP7aOMSPVaVUt0/Ye1old+HxRGIsuR837gP4Dmbf5uQyT0MKulCj2/gKcXtbE
     V4JlU8VplnC/Z/vLb0vgwixXXHc3gktWN8S6Tf+JK/KyyVhhxII1syDsmPPEKrEhDrXoXI7xu
     OObKoq04161qMAUxceXn8rh1dbMjsF3M2/nfR/mpkJ63xjlcluoIgou9Mu3xIu2nPZXjlBYgr
     IsOqYkKAlOxI1Vxrzws1kZyooCINMmmgP7Ota3aiRLggXs2d4mxVWHkoTGLXFNNmPsd6YUprP
     hEaol7WXCgZoMPiQSHju8E0O8vLpfdlYveIVcPFexSBosYjGAbQgrcD1/ib9FByex2N+OYBf7
     YinGva0eOQHRnUMXSJVmhHwRBOvpFSD9KathXd4p2vK5tw7mALlTfTZJLjSxv6YSYJUKKnv1b
     lKr416FW7LiEY9muKFNsAMpWRQu8RyB/g7Kb1EMLyh+gBIsRekSzsE9EcIA5TwsNTMWAA0uV6
     dQKq+kj7podX4zNa5F5MK7UvqCZ3UnjZt3txLX2SPwT/y2HQRD+9S1aNe2R9jpmn7FG4mjv6V
     x0aipy4Z9xbZq62Av+Yg==
    Return-Path: [email protected]
    X-OriginalArrivalTime: 31 Aug 2020 15:56:46.0445 (UTC) FILETIME=[544E99D0:01D67FAF]

    Do you know what happen ? Where i have make mistake ? I hope i can fix this beacause i like your plugin, simple to use and i’m interested for the premimum options in future, but if i cannot secure my email with dkim i need find another solution. I Hope it’s possible to fix !!

    Best regards !

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @lookya23,

    here is the official PHPMailer example with DKIM signing: https://github.com/PHPMailer/PHPMailer/blob/master/examples/DKIM_sign.phps#L23-L38

    The highlighted lines are the ones that you have to configure. I think your path to the pem file should be the absolute path to the pem file on your server.

    Also, use the password for the pem file (if you used a password protected pem file) -> DKIM_passphrase.

    I think once you correctly setup all DKIM parameters, it should work OK.

    Take care!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘DKIM Private key’ is closed to new replies.