Hi guys i’ve already configure my centos 6.5 (plesk) with postfix and dkim milter and if i send mail from webmail in my case roundcube dkim pass but if i try to send some email with phpmailer last version fail.
i’ve read there http://dkim.worxware.com/ that is not necessary do another operations but not work anyway so i try to use tools in the bottom of page to create private and public keys and set another txt record
i’ve already tried to add params like these:
$mail->DKIM_domain = 'dominio.it';
$mail->DKIM_private = 'class/.htkeyprivate';
$mail->DKIM_selector = 'phpmailer';
$mail->DKIM_passphrase = '1407195281';
also txt record in dns are correct and i also tried to use existing and work key genereted by dkim milter like this….
$mail->DKIM_domain = 'dominio.it';
$mail->DKIM_private = 'class/default.private';
$mail->DKIM_selector = 'default';
with my working (only with roundcube not with phpmailer) txt record
default._domainkey.quotalo.it
TXT
“v=DKIM1; g=*; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQ UAA4GNADCBiQKBgQCz2F9VF2 D2jFtlKPbjufdTBpF+2Qraw8Tr20 dSkHcP7DGb0rMjZYeeK7ysmj2R Go75/HnPga2Xbjy87Hg/xIDMQIc Ep8cN9WsOkUe7Rzx/jIhdwnV5u alHwlx0hJQ16LwgGv1Xtt1iw+X7 sDwRlZ+Tq2tyq0cXYz34RvAy22 GRiwIDAQAB”
but problem is the same….please help me i’ve tried one entire day 🙁
2
Answers
i've solved by adding
$mail->Encoding = "base64";
To phpmailer array.For anybody who is trying to set this up, I’ve just ‘resolved’ the PHPMailer DKIM issue, which in effect allows the DKIM signature to be “signed-by:mydomain.com” by following the steps below:
I used http://dkimcore.org/tools/ to create the necessary keys. Take the raw private key and paste everything from –BEGIN to END– and save it to a .txt file named private.key (without the *.txt).
I did the same thing with the public key, for a personal backup copy(in case I need to retrieve it later) and saved it as public.key. ~again this is just for a backup copy.
Take the two files that you just created and add them to your server/site, for example in the Apache > Conf folder.
Using the Public Key, you will need to create a TXT Record in your domains DNS settings. The public keys going to look something like this:
The Host Name: 1450071.mydomain._domainkey
The Value: v=DKIM1;p=EBAQUAA4GNADCBiQKBgQC2uPmYVUJZvxxoYQqyygJMP0jqRKQLJ2QRN1k1HLrNCc13yK7ReDY3KmuZH+pgUNzXpfKHz0PGVLTMUAKpsqAPtkMfll8DSZawrFrny/jQIzEc03gTrEKCwp/k0iaL/Pwcha7pZEiN+wIDA
The TTL: 1 Hour(3600)
4. Add the following DKIM lines to PHPMailer *after the setFrom
..
Final result: Success!