Possible DKIM configuration issue when adding a subdomain before the root domain

オープン
#310 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
53/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
javascript, linux
領域
backend

調査の方向性

Start by locating the Mail Server plugin code that generates or updates /etc/rspamd/local.d/dkim_signing.conf, then trace how it handles root domains and mail subdomains when domains are added. Reproduce the reported order with mail.example.com added before example.com and inspect the generated configuration. Done means both domains receive the correct signing entry regardless of addition order.

索引モデルが issue の本文から書いたものです。

説明

Hello aaPanel team,

I would like to report a possible issue with DKIM configuration in the aaPanel Mail Server plugin.

Description

I noticed that emails sent from my root domain were not receiving a DKIM signature, even though the DKIM keys had been generated correctly and the DNS record was properly configured.

One possible reason could be the order in which the domains were added to aaPanel.

In my case, I believe I added the mail subdomain first (e.g. mail.example.com) and then added the root domain (example.com).

I'm not sure if this sequence is related to the issue, but it may be worth investigating.

What I found

The file:

/etc/rspamd/local.d/dkim_signing.conf

contained an entry for the mail subdomain:

mail.example.com {
selectors [
{
path: "/www/server/dkim/mail.example.com/default.private";
selector: "default"
}
]
}

However, the root domain was missing:

example.com

The private key for the root domain already existed at:

/www/server/dkim/example.com/default.private

The corresponding public key was also correctly published in DNS, and I verified that both keys matched.

Impact

Emails sent from addresses such as:

[email protected]

were not receiving a DKIM signature.

SPF and DMARC were passing, but Gmail did not detect a DKIM signature.

How I fixed it

I manually added the missing root domain to the Rspamd configuration, pointing it to the existing private key.

After validating the configuration and restarting Rspamd, DKIM signing was restored.

Possible causes

Could this be related to:

The order in which the mail subdomain and root domain are added?

The plugin incorrectly associating the DKIM configuration with the mail. subdomain instead of the root domain?

A bug in the logic that generates or updates /etc/rspamd/local.d/dkim_signing.conf?

I cannot confirm which of these is responsible, but I believe the domain creation and DKIM configuration generation logic should be checked.

Expected behavior

Whenever a domain is added to aaPanel Mail Server, its DKIM signing configuration should be correctly registered in Rspamd, independently of whether its mail subdomain was added before or after it.

Thank you for your attention!

主要言語
JavaScript
スター
3.1k
フォーク
771
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

aaPanel/aaPanel のほかの issue

aaPanel/aaPanel の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。