DKIM signature invalid still

I followed the instructions to try to generate a new DKIM signature, and I am receiving an error stating that it does not have permission in the DKIM manager. I went ahead and added the automatically generated DKIM txt file into Cloudflare (my DNS and registrar) and that didn’t seem to work. When I send emails to mail-tester.com, it says my DKIM signature is invalid and gives me a different key. I’m not sure why it will not work as expected. If you need some sort of payment for your help and services, I’d appreciate straight forwardness and not being ignored. I chose CyberPanel because I am a believer in open source and like to learn about the technology I am using for my business. Let me know if you can help and if I need to subscribe to some plan of some sort for this.

Hello @0xj Happy you are here

Check which python version you are using. Are you using latest version of cyberpanel? Which server os is this ?

A quick solution would be

$ chown -R cyberpanel:cyberpanel /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache/

Thank you for your timely response. I am using the latest stable Ubuntu and my Python3 version is 3.10.6. I’ll give this a try and see if it fixes the issue. I did notice that a DKIM txt file was automatically generated upon creation of the email server on CyberPanel. Is this normal with the latest?

No this only happened in earlier versions of 2.1.x. Which ubuntu version is this?

|Distributor ID:|Ubuntu|
|Description:|Ubuntu 22.04.2 LTS|
|Release:|22.04|
|Codename:|jammy|

I passed through the correct python version and gave privelages to cyberpanel and it allowed the DKIM Manager to display the private and pub key. It’s the same as can be seen in my DKIM txt file. I am receiving a syntax error on the DKIM from Mxtoolbox. Do you know what may be causing this?

I meant LTS, not latest, by the way.

Post a screenshot of the results you get by testing you pubkey here DKIM Record Checker - DKIM tools | EasyDMARC (make sure to check the “Detect all selectors” checkbox)

“Invalid key for “p” tag! It must be either 1024 or 2048 or 4096 bit.”. Yeah, the syntax is off because of the public key. I literally copied it from CyberPanel to Cloudflare and made sure the quotation marks weren’t there when I posted it. Is this hash autogenerated by CyberPanel not right?

The hash has unecessary characters " "and spaces

See example here:

"v=DKIM1; h=sha256; k=rsa; "
	  "p=MIIBIjANBgkqhkiG9w0BAQEFA7AOCAQ8AMIIBCgKCAQEAyQMFUcl9yEkoCMOLGZUaBNWTVxSDT5IUcsj6DDXE8pMADhwPzJgGEUn3FzmX/hVgm12HOWrVJfohZj/881krD2ZKqNDWU88+4Xy3am9URDNkYcgyVpCky1nDPFoGJK9B5A1t9grnK2QwDMDobjCLfJNjIGRcytyLHvrPPq1fyKv9gBIdAAYqevYRGCKYJPbijvjVs264Xl9/UsW8Fi"
	  "Dp/qY7oXvgy/GZmmU9JK0aGLP8V2GFOBVWAkLpjxaTGTyGyfZ93BkDHkY0c/n1d3c3aMvfNdforBJc/lgO4QApiKEw02qgSk7ql08OdgI2++ebscr2dWFC0KdrOhchDG8IeHR4NJQIDAQAB"

This should be changed to

v=DKIM1; h=sha256; k=rsa;
p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A45dasMIIBCgKCAQEAyQMFUcl9yEkoCMOLGZUaBNWTVxSDT5IUcsj6DDXE8pMADhw7PzJgGEUn3FzmX/hVgmHOWrVJfohZj/881krD2ZKqNDWU88+4Xyam9URDNkYcgyVpCky1nDPFoGJK9B5A1t9grnKQwDMDobjCLfJNjIGRcytyLHvrPPq1fyKv9gBIdAAYqevYRGCKYJPbijvjVs264Xl9/UsW8FiDp/qY7oXvgy/GZmmU9JK0aGLP8VGFOBVWAkLpjxaTGTyGyfZ93BkDHkY0c/n1d3c3aMvfNdforBJc/lgO4QApiKEw02qgSk7ql08OdgI2++ebscr2dWFC0KdrOhchDG8IeHR42NJQIDAQAB

For cloudflare

Is there a reason this hash starts and ends with the same characters that the example DKIM file starts and ends with? I didn’t post my entire key. Is it due to using the default selector?
I’ll go ahead and give this a shot. Thank you. I’ll let you know here in a sec.

Looks like you did it, my friend. That fixed it, thank you so much!

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.