Question

I am trying to write an email client application by c++ and OpenSSL.. When I am checking and sending email through this application then Gmail and Yahoo both are showing wrong in my email header..

Gmail showing > "dkim=hardfail (test mode) header.i=@".

Yahoo showing > "dkim=permerror (bad sig)".

My Email header for Gamil :

Delivered-To: rajforever6@gmail.com
Received: by 10.112.41.134 with SMTP id f6csp80981lbl;
        Tue, 26 Mar 2013 02:25:15 -0700 (PDT)
X-Received: by 10.68.59.199 with SMTP id b7mr22705642pbr.167.1364289914515;
        Tue, 26 Mar 2013 02:25:14 -0700 (PDT)
Return-Path: <no_feed@korcot.info>
Received: from smtp.korcot.info ([103.18.168.250])
        by mx.google.com with SMTP id ak6si16720576pbd.344.2013.03.26.02.25.08;
        Tue, 26 Mar 2013 02:25:14 -0700 (PDT)
Received-SPF: softfail (google.com: domain of transitioning no_feed@korcot.info does not designate 103.18.168.250 as permitted sender) client-ip=103.18.168.250;
Authentication-Results: mx.google.com;
       spf=softfail (google.com: domain of transitioning no_feed@korcot.info does not designate 103.18.168.250 as permitted sender) smtp.mail=no_feed@korcot.info;
       dkim=hardfail (test mode) header.i=@korcot.info
Date: Tue, 26 Mar 2013 02:25:14 -0700 (PDT)
DKIM-Signature: v=1; 
    a=rsa-sha256; 
    s=mail; 
    d=korcot.info; 
    t=1364289917; 
    c=relaxed/relaxed; 
    h=from:to:subject:message-id:mime-version:content-type; 
    bh=Q3K/t162lFKWTLs4xBY2FR1vT5pThpI6rnqM7i6p/Vo=; 
    b=Tgrc2nelY/3HA0M14s4RXFvhonXQzFRtDAD/X/0ITvln6JSWjIxgQSX7WOrfAxb4K
    kTXV+Bbw6DKK+2aVi2WrCYdduP5wXJpTVnjaCJQTs2+DtAo3sL1re6tz3uHOpa0PmRS
    3qRzfXQqN8QczOv63UjAGO6sL+o5atU3vbRYMxg=
From: "Comfirm"<no_feed@korcot.info>
To: "Kuntal"<rajforever6@gmail.com>
Subject: Key6gg6 ?
Message-ID: <20030712040037.46341.5F8J@football.korcot.info>
MIME-Version: 1.0
Content-Type: text/html

My Email header for Yahoo :

From Comfirm Wed Mar 27 02:26:20 2013
X-Apparently-To: raja_kuntal_majumder@yahoo.com via 106.10.150.84; Tue, 26 Mar 2013 11:26:20 -0700
Return-Path: <no_feed@korcot.info>
Received-SPF: softfail (transitioning domain of korcot.info does not designate 103.18.168.135 as permitted sender)
 bm5lciByZWFkeSBJcyBkaW5uZXIgcmVhZHkgSXMgZGlubmVyIHJlYWR5IElz
 IGRpbm5lciByZWFkeSBJcyBkaW5uZXIgcmVhZHkgPyBKb2UuIAEwAQEBAQ--
X-YMailISG: v3YQap0WLDt5n8clVc4Zd9ENB5oCUMcfvdmbG1QujbCK18hQ
 nhRHHgRhlvqfyO8lOyt.Rwjm8Y1_i35XTte6Pt.JxYeVZXQtQqLe66qLvndr
 _RhG.PTZE2AWeRN.tMHi.aAIcS9WfKzOzi9i3tYtSSzZMPBMlBwFu5hBV4qI
 v3KO9LCaMGeCe3W4mLsxgbkdddDi_8r8afEb7jAUKVn8i2VyRaJQGELdL5xb
 .lNzJ0h_vMs5HseAhRPefe.o9W4A_oMpcairIa9OfDkC3zmZWYbyntXcxNgi
 uKtvTwaqyeuUvuyIxrRGlpUy8RFxRaLOlp6s8riVCfLyu1dEE6Bpa9KFlVa0
 JtRm0XZ3znl2WBzw1PnHskYZ3X2SHrzz8q7LfmUETa7idziLtkLNqdzZbvJE
 nnoc3W3aYmxkgZob25oRD8Q338f9774TfJMjeqTaQLbmMflOW5GqoPYneB0v
 hKqmdYUcqeZpVfcRXBVSxzS2_lK7spwOJX_wXKAH5TbiRXORouWvbkw9EHgc
 yxqKoTQAqpnc8ibxcfT9cmVQ2KXYXlrl7d0VotpJ.m8I0sMY0mTviVkt6vCI
 FJUYScRuGMxjOaYqyURUU5mDM_bxQXRl1WFzEhYBQKsyMOhZVtBBrPyEsCLs
 NHASPNKPUS7wuB712WAI3aMqTNV.kNize8nwrm.hj9f9fb2nJwcB.IvuQvKx
 Ujd9Pq68B9u80Wd8gtp5rAIy7.B_0x6JHwK14fDWgh1Yr7k1PB8A_daUJh.G
 d2f4rgY0CFbg3chmWC7O5AGvODB79.pFfkl8ooZsUpYqdsj5.KX5XLQjsfud
 JCsO1870Gtty31aPGvSHRPDGOTJ_lQ6v25BMaCnGS8AtvYbtjW9avY0MHTJw
 rnT0_Hzca6oXayZG0CCcvQ6CMd.UnOlIt4pFEWwd9Zlo5BIJ4hd9N99qMbul
 mGgNYVRBc0f7DokmkLiHSI29k34ifNyh8Z1qbeKWTRo4FXDBa.vfc9cVWqpp
 DVF8FbkpuThc7QJ63cszp98TCdZy2Bq5yOMrqEdK85e141MndRChrWmjUplJ
 4e_UWqNmaL17cGPzXuJc3TAD3nsdK9qh1ax.9K.jkRwSm4zgWscqosCPAgOJ
 lIOo3L3QScOP9iQ6xOfuzm7dxw44Z3WBHMthoOgw_MGt488EClyDr2PiJT.f
 1_BklnxGS2iuYH2TLyY69ESKE0Y4pPGmaboLASqBQkQZ6xaoFM8HDoIB20zK
 KrNadXnlkMW.t6RuIcaPX3fOrKzvnKPerZ3NA1kn
X-Originating-IP: [103.18.168.135]
Authentication-Results: mta1360.mail.bf1.yahoo.com  from=korcot.info; domainkeys=neutral (no sig);  from=korcot.info; dkim=permerror (bad sig)
Received: from 127.0.0.1  (HELO smtp.korcot.info) (103.18.168.135)
  by mta1360.mail.bf1.yahoo.com with SMTP; Tue, 26 Mar 2013 11:26:19 -0700
DKIM-Signature: v=1; 
    a=rsa-sha256; 
    s=mail; 
    d=korcot.info; 
    t=1364322363; 
    c=relaxed/simple; 
    h=from:to:subject:mime-version:content-type; 
    bh=Q3K/t162lFKWTLs4xBY2FR1vT5pThpI6rnqM7i6p/Vo=; 
    b=THj4wE+EOSKThXGIUPBgcTlWTICIDFikgEvlQVpBotViQTNW+k/dpr58kVZ1HAght
    KTdACtbEO2m3A17vxrY1kEQazhwu7pbWIW5TwBfUtIU9SbFBL88AQz2fxxi6BHqEfNh
    WYeGG0mEskG9J2JFeNVG0WaaNJ9gTh5t/4nqvVc=
From: "Comfirm" <no_feed@korcot.info>
To: "Kuntal" <raja_kuntal_majumder@yahoo.com>
Subject: Key6gg6 ?
MIME-Version: 1.0
Content-Type: text/html
Content-Length: 287

My TXT records in DNS(godaddy.com) :

@ >>>> v=spf1 a mx mx:smtp.korcot.info ip4:103.18.168.250 ~all

mail._domainkey >>>> k=rsa; t=y; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCjKsxH3Hb8UrNZ+Aar7GfJ30dcbS19i+89JA8SSlDEhsFfTAR9UZIolxKtD3HgPzhWGfcoLkQg28NS/Y3tT/WTvfXxryDyFRIbKJox6VbVmmvSmATsik1l2YQSkTTpeHX6nzxgzRwDVvmLfZBZBbO3n+y0YNTucOUsfNFYCL/UAwIDAQAB

_domainkey >>>> t=y; o=~;

Really I don't have knowledge why Gmail and Yahoo showing "dkim=hardfail (test mode) header.i=@" and "dkim=permerror (bad sig)", both header should be "dkim=pass (ok)"..

So please give me advice.

Please tell me what should I do to solve this problem..

Thanks...

Was it helpful?

Solution

You didn't mention whether you are using a standard library to calculate the DKIM signature, or have done your own. I strongly recommend OpenDKIM as a good library to use if you aren't already.

Another place to test is to send a message to the mail reflector at sa-test@sendmail.net. It may give you more diagnostic information.

You should check the header fields that are signed (From, To, Subject, Mime-Version, and Content-Type) between what you sent originally and what was received. Some mailers "helpfully" rewrite these header fields, breaking the signature in the process. For example, it could have signed no_feed@smtp.korcot.info and subsequently changed it to no_feed@korcot.info.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top