How7o
  • Home
  • Tools
  • Prank Screens
  • Learn
  • Blog
  • Contact
Reading: How to Fix DKIM Not Signing Emails in aaPanel
Share
How7oHow7o
Font ResizerAa
  • OS
Search
  • Home
  • Tools
  • Prank Screens
  • Learn
  • Blog
  • Contact
Follow US
© 2024–2026 How7o. All rights reserved.
How7o > Free Laravel, PHP, WordPress & Server Tutorials > Server Management > How to Fix DKIM Not Signing Emails in aaPanel
Server Management

How to Fix DKIM Not Signing Emails in aaPanel

how7o
By how7o
Last updated: May 23, 2026
5 Min Read
Fix DKIM not signing emails in aaPanel
SHARE

If aaPanel emails aren’t signed with DKIM even though the domain is set up correctly, the most common cause is a permission problem on the private key file. rspamd (the milter that signs outgoing mail) can’t read /www/server/dkim/example.com/default.private because its permissions are too tight. chmod 644 on the file plus an rspamd restart fixes it.

Contents
  • Confirm the cause first
  • Fix the permissions
  • Or do it from the aaPanel UI
  • Confirm DNS publication is also done
  • Test the result
  • Frequently asked questions
  • Related guides
  • References

Last verified: 2026-05-17 on aaPanel 7 with rspamd. Originally published 2022-09-19, rewritten and updated 2026-05-17.

Confirm the cause first

sudo tail -n 100 /var/log/rspamd/rspamd.log | grep -i dkim

Look for a line like:

dkim_module_load_key_format: cannot load dkim key
/www/server/dkim/example.com/default.private:
cannot map key file: '/www/server/dkim/example.com/default.private' Permission denied

That’s the signature of this exact problem. If the log shows a different error (key not found, DNS issue), see the DNS section below instead.

aaPanel DKIM signing fix — chmod 644 on .private key, restart rspamd, publish TXT record

Fix the permissions

# Replace example.com with your actual domain
sudo chmod 644 /www/server/dkim/example.com/default.private

# Restart rspamd
sudo /etc/init.d/rspamd restart
# or with systemd
sudo systemctl restart rspamd

Send a test email after the restart and check the headers — the DKIM-Signature header should now appear, and Authentication-Results should show dkim=pass.

Or do it from the aaPanel UI

  1. aaPanel sidebar → Files.
  2. Navigate to /www/server/dkim/example.com/.
  3. Right-click default.private → Permissions.
  4. Set the permission to 644, click Save.
  5. Restart rspamd from Software Store or via SSH.

Confirm DNS publication is also done

# Show the TXT record value to publish
sudo cat /www/server/dkim/example.com/default.txt

# Verify the DNS record from your server
dig TXT default._domainkey.example.com +short

The public key has to be published as a TXT record at default._domainkey.example.com. Without it, rspamd will sign outgoing mail but receivers can’t verify the signature — so the test tool still reports “DKIM missing.” Make sure both the private-key file is readable and the public-key DNS record is live.

Test the result

  • Send a test mail to mail-tester.com or mailgenius.com; both inspect DKIM, SPF, and DMARC for the message.
  • Or send to your own Gmail and click Show original — look for dkim=pass in the Authentication-Results header.

Frequently asked questions

How do I confirm the permission issue is the cause before changing it?

Check the rspamd log: tail -n 50 /var/log/rspamd/rspamd.log | grep -i dkim. The classic line is dkim_module_load_key_format: cannot load dkim key /www/server/dkim/example.com/default.private: Permission denied. If you see that, the fix below is for you. If the error is different (“cannot map key file” with no permission detail, or “no DNS record found”), the cause is elsewhere — check the DNS publish step and the key path.

Why does chmod 644 fix this rather than 600?

rspamd runs as the _rspamd user, which isn’t in the same group as the file’s owner. 600 (owner-only) blocks rspamd; 640 (owner + group) blocks too if rspamd isn’t in that group. 644 (owner + group + other read) lets rspamd read the file. Strictly speaking, the right fix is adding _rspamd to the file’s group and using 640; 644 is the pragmatic shortcut that aaPanel guides recommend.

Will my DKIM signing break again after an aaPanel update?

Possibly — package updates can rewrite key files with default permissions (640). If you hit this again after an update, re-run the chmod or set up a small cron that asserts the permission: * * * * * find /www/server/dkim -name '*.private' -not -perm -044 -exec chmod 644 {} \;. Ugly but durable.

Where do I get the DKIM public key to publish in DNS?

cat /www/server/dkim/example.com/default.txt prints the TXT record value you publish at default._domainkey.example.com. Publish it, wait for DNS propagation, then test with mail-tester.com or mailgenius.com. The DKIM signature should appear in the Authentication-Results header of test mails.

Related guides

  • How to Access aaPanel Using a Domain and SSL
  • How to Retrieve the MySQL Root Password in aaPanel
  • How to Fix Quotas in cPanel

References

aaPanel docs: aapanel.com/new/help.html. rspamd DKIM signing module: rspamd.com/doc/modules/dkim_signing.html. DKIM RFC 6376: rfc-editor.org/rfc/rfc6376.

TAGGED:aapanelconfigurationEmailLinux

Sign Up For Daily Newsletter

Be keep up! Get the latest breaking news delivered straight to your inbox.
[mc4wp_form]
By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Share This Article
Facebook Copy Link Print
Previous Article Laravel migration column types cheat sheet Laravel Migration Column Types — Cheat Sheet
Next Article Fix CSS page breaks not working with HTML tables Why CSS Page Breaks Don’t Work in HTML Tables (and How to Fix It)
Leave a Comment

Leave a Reply Cancel reply

You must be logged in to post a comment.

FacebookLike
XFollow
PinterestPin
InstagramFollow
Most Popular
Run Laravel queue workers with Supervisor
How to Run Laravel Queue Workers in Production with Supervisor
May 23, 2026
Nginx as a reverse proxy for a Node.js app on Ubuntu
How to Set Up Nginx as a Reverse Proxy for Node.js on Ubuntu
May 23, 2026
Install and configure Redis on Ubuntu for Laravel and WordPress
How to Install and Configure Redis on Ubuntu (for Laravel & WordPress)
May 23, 2026
Harden a fresh Ubuntu VPS with UFW, Fail2Ban, and SSH key auth
How to Harden a Fresh Ubuntu VPS: UFW + Fail2Ban + SSH Key Auth
May 23, 2026
Set up Let's Encrypt SSL with Certbot on Ubuntu
How to Set Up Let’s Encrypt SSL with Certbot on Ubuntu (Apache & Nginx)
May 23, 2026

You Might Also Like

Fix Ubuntu terminal not opening on VirtualBox
OS

Fix: Terminal Won’t Open in Ubuntu on VirtualBox

4 Min Read
How to force quit frozen apps in Ubuntu
OS

Force Close an App in Ubuntu (xkill, System Monitor, kill -9)

4 Min Read
How to temporarily disable Imunify360 service for testing (cPanel/WHM)
Server Management

How to Temporarily Disable Imunify360 Service (Safe Testing + Fix 503)

5 Min Read
Send a simple email in Laravel using Mail::raw and SMTP
Web Development

How to Send a Simple Email in Laravel (Fast SMTP + Mail::raw)

4 Min Read
How7o

We provide tips, tricks, and advice for improving websites and doing better search.

Tools

  • Age Calculator
  • Word Counter
  • Image Upscaler
  • Password Generator
  • QR Code Generator
  • See all tools→

Pranks

  • Fake Blue Screen Prank
  • Hacker Typer
  • Fake iMessage Generator
  • Windows XP Crash Prank
  • Windows 11 Update Prank
  • See all prank screens →

Company

  • About Us
  • Blog
  • Contact
  • Privacy Policy
  • Terms of Service
  • Sitemap
© 2024–2026 How7o. All rights reserved.
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?