Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-04-27, 18:09:59

Author Topic: Problem with dkim validation by phpmail  (Read 5810 times)

0 Members and 1 Guest are viewing this topic.

Offline lolpop

  • Junior Member
  • *
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Problem with dkim validation by phpmail
« on: 2016-03-06, 03:23:24 »
Hi,

i have problem with dkim validation with mail send by php.

When i send mail by webmail, i obtain a result : pass

But when i send email by php (my newsletter) i have result : fail message has been altered

I don't know why and what to do?

Someone can help me?

Thanks a lot

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Problem with dkim validation by phpmail
« Reply #1 on: 2016-03-06, 03:37:49 »
Inform here 'sh /script/sysinfo'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline lolpop

  • Junior Member
  • *
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Re: Problem with dkim validation by phpmail
« Reply #2 on: 2016-03-06, 12:21:20 »
Code: [Select]
A. Kloxo-MR: 6.5.0.f-2016021402

B. OS: CentOS release 6.7 (Final) x86_64

C. Apps:
   1. MySQL: mysql55-5.5.48-1.ius.el6.x86_64
   2. PHP: php53u-5.3.29-1.ius.el6.x86_64
   3. Httpd: httpd-2.2.31-1.mr.el6.x86_64
   4. Lighttpd: --uninstalled--
   5. Nginx: --uninstalled--
   6. Qmail: qmail-toaster-1.03-1.3.55.mr.el6.x86_64
      - with: courier-imap-toaster-4.1.2-1.3.18.mr.el6.x86_64
   7. Dns: bind-9.9.7-1.mr.el6.x86_64

D. Php-type (for Httpd/proxy):

E. Memory:
                total       used       free     shared    buffers     cached
   Mem:          1829       1096        733          0        136        585
   -/+ buffers/cache:        373       1455
   Swap:            0          0          0

it's a fresh install

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Problem with dkim validation by phpmail
« Reply #3 on: 2016-03-06, 12:42:25 »
Hi,

i have problem with dkim validation with mail send by php.

When i send mail by webmail, i obtain a result : pass

But when i send email by php (my newsletter) i have result : fail message has been altered

I don't know why and what to do?

Someone can help me?

Thanks a lot
Did you check your domain and IP with mxtoolbox.com?.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline lolpop

  • Junior Member
  • *
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Re: Problem with dkim validation by phpmail
« Reply #4 on: 2016-03-06, 14:50:54 »
Yes all is OK.

Even when i send mail by ssh with mail command; i obtain SPF : pass, DKIM : pass

I have juste problem when i send email by mail fonction in php.

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Problem with dkim validation by phpmail
« Reply #5 on: 2016-03-06, 15:42:34 »
Give me info relate to send mail from ssh and mail() related to spf and dkim.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline lolpop

  • Junior Member
  • *
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Re: Problem with dkim validation by phpmail
« Reply #6 on: 2016-03-07, 16:43:38 »
Here de dkim test:

WORK :

Code: [Select]
DKIM Signature

Message contains this DKIM Signature:
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=ptpexpert.fr; h=message-id
:from:date:to:subject:mime-version:content-type
:content-transfer-encoding; s=private; bh=/edzoYuyn17WXm8KeqcX/R
+khdQ=; b=hbya5yGCIslNrEVLgID8jPMsMpEgr3xBwwLqThwN/qySsHbiSDmJbN
AKso70fWMGhPC7o9rs9P0rl2N3r7RiPSTllUy08Si/DAVNLgXGu3u0lKeaTs38Io
ewJhA6+KoX9NV4LRodsFtay/8gQZmSbSNfxTthzAcmDWkg5kdovgk=


Signature Information:
v= Version:         
a= Algorithm:       rsa-sha1
c= Method:          nofws
d= Domain:          ptpexpert.fr
s= Selector:        private
q= Protocol:        dns
bh=                 
h= Signed Headers:  Received:Message-ID:From:Date:To:Subject:User-Agent:MIME-Version:Content-Type:Content-Transfer-Encoding
b= Data:            UNtMaaR8PnwBhgzenTPM8MgJ6GgOq18azLFrq2rmrrkusg3Xo2mg/0PJbH0hXmB4+rZr7s8WxbVa6rmKPjdxe8yP0zspNHzKF6mr8QqN8+5NF45asR68b3baro0ahM9wA7paK71B5oy0Yn3OtjBJFzpZ1ee5Yh9JtQEgiw4B94I=
Public Key DNS Lookup

Building DNS Query for private._domainkey.ptpexpert.fr
Retrieved this publickey from DNS: v=DKIM1; g=*; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCs6sSAiR0Za+zkimvfJpXdiSBxR9DDoTciWfltQQoY4KIhyRwKFQoc7AdtpT6Zh6K1ZIa94dUPHDDbXinakIEu4bOHKS0L6UuB8c1yjHDTlvezpB0/be1EHCDrp3AkrlcAgbQNek/Xs9Qy1s7dLcDAfpFO/H5HnGzA3HtLC+OrowIDAQAB
Validating Signature

result = pass

Code: [Select]
SPF Information:

Using this information that I obtained from the headers

Helo Address = serveur.ptpexpert.fr
From Address = root@serveur.ptpexpert.fr
From IP      = 164.132.198.12
SPF Record Lookup

Looking up TXT SPF record for serveur.ptpexpert.fr
Found the following namesevers for serveur.ptpexpert.fr:
Retrieved this SPF Record: zone updated 20160307 (TTL = 21061)
Using local nameserver for SPF resolution.  This will probably be cached!
Result: pass (Mechanism 'a' matched)

Result code: pass

NOT WORK :

Code: [Select]
DKIM Information:

DKIM Signature

Message contains this DKIM Signature:
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=ptpexpert.fr; h=message-id
:from:date:to:subject:mime-version:content-type
:content-transfer-encoding; s=private; bh=Ef0BvkT+DZAk0h2hXiuPGJ
e/0vI=; b=fPui0DJD+ZCxMuCjMOdvEbw97vhfyZNCzolpaScADYPr0PLpG5AjFh
1+C4TL4vwqRcU30+zN+5edO/xHsFqYWySLhme7X70dz/rvscmw/edlGsmGQReJdZ
dfeNLUOXV4iUgj/F3ZKFkV3BwzQcegaWGkpPNm8rB1HOvgAPEMSLA=


Signature Information:
v= Version:         
a= Algorithm:       rsa-sha1
c= Method:          nofws
d= Domain:          ptpexpert.fr
s= Selector:        private
q= Protocol:        dns
bh=                 
h= Signed Headers:  Received:Message-ID:From:Date:To:Subject:User-Agent:MIME-Version:Content-Type:Content-Transfer-Encoding
b= Data:            afdv8LKoEG4yGJgksBymikXKgvZu05LikPtTGwWpjlwEwIo/rzmk4SklU+VpQg4qSwLvFvf0fxYHYTchCiK258luW83jnQ1jVtqpstTfP7vBQYF6OO+YK5EA0uFZe4t98H8Ogljd22TIJpEHMVy8qjvcV2kVeglG4YCp1q7LUmU=
Public Key DNS Lookup

Building DNS Query for private._domainkey.ptpexpert.fr
Retrieved this publickey from DNS: v=DKIM1; g=*; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCs6sSAiR0Za+zkimvfJpXdiSBxR9DDoTciWfltQQoY4KIhyRwKFQoc7AdtpT6Zh6K1ZIa94dUPHDDbXinakIEu4bOHKS0L6UuB8c1yjHDTlvezpB0/be1EHCDrp3AkrlcAgbQNek/Xs9Qy1s7dLcDAfpFO/H5HnGzA3HtLC+OrowIDAQAB
Validating Signature

result = fail
Details: message has been altered

After some test, i detect that problem is about accent in body message in ISO.

There are no problem when i send email in UTF8 by webmail.

So i think problem come from accent in iso but i don't know how to solve the problem.

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Problem with dkim validation by phpmail
« Reply #7 on: 2016-03-07, 16:51:46 »
Try send mail from panel (from 'HelpDesk'). THis is also send via mail() but using utf-8.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline lolpop

  • Junior Member
  • *
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Re: Problem with dkim validation by phpmail
« Reply #8 on: 2016-03-10, 01:15:26 »
works fine in utf8 :)

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Problem with dkim validation by phpmail
« Reply #9 on: 2016-03-10, 02:51:34 »
Find out 'lx_mail()' function in '/usr/local/lxlabs/kloxo/httpdocs/lib/html/lib' to know how to set utf-8 for mail().
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

 


MRatWork Affiliates:    BIGRAF(R) Inc.    House of LMAR    EFARgrafix

Page created in 0.031 seconds with 19 queries.

web stats analysis