OpenDKIM:修订间差异

来自Gea-Suan Lin's Wiki
跳到导航 跳到搜索
此页面具有访问限制。如果您看见此消息,则说明您没有权限访问此页面。
(创建页面,内容为“'''OpenDKIM'''是一套實作DKIM的軟體。 == 相關連結 == * DKIM == 外部連結 == * {{Official|http://www.opendkim.org/}} {{en}} Category:軟體”)
 
 
(未显示同一用户的14个中间版本)
第1行: 第1行:
'''OpenDKIM'''是一套實作[[DKIM]]的軟體。
'''OpenDKIM'''是一套實作[[DKIM]]的軟體。
== 安裝 ==
[[Ubuntu]]內可以直接安裝:
<syntaxhighlight lang="bash">
sudo apt install -y opendkim; sudo apt clean
</syntaxhighlight>
== 設定 ==
先產生key pair,其中的<code>-s mail</code>為[[DKIM]]的selector,預設會產生2048 bit RSA key pair,產生出來的<code>mail.txt</code>是DNS的<code>TXT</code> record的內容:
<syntaxhighlight lang="bash">
cd /etc/dkimkeys; sudo opendkim-genkey -t -s mail -d my.example.com
</syntaxhighlight>
在<code>/etc/opendkim.conf</code>內加上:
<syntaxhighlight lang="apache">
Domain          my.example.com
Selector         mail
KeyFile         /etc/dkimkeys/mail.private
</syntaxhighlight>
然後改Socket設定,只開8891/tcp:
<syntaxhighlight lang="apache">
Socket          inet:8891@localhost
</syntaxhighlight>
=== Postfix ===
在<code>/etc/postfix/main.cf</code>內加上:
<syntaxhighlight lang="ini">
milter_default_action = accept
milter_protocol = 2
smtpd_milters = inet:localhost:8891
non_smtpd_milters = inet:localhost:8891
</syntaxhighlight>
然後重啟服務:
<syntaxhighlight lang="bash">
sudo service opendkim restart; sudo postfix reload
</syntaxhighlight>


== 相關連結 ==
== 相關連結 ==

2023年6月30日 (五) 07:51的最新版本

OpenDKIM是一套实作DKIM的软件。

安装

Ubuntu内可以直接安装:

sudo apt install -y opendkim; sudo apt clean

设定

先产生key pair,其中的-s mailDKIM的selector,预设会产生2048 bit RSA key pair,产生出来的mail.txt是DNS的TXT record的内容:

cd /etc/dkimkeys; sudo opendkim-genkey -t -s mail -d my.example.com

/etc/opendkim.conf内加上:

Domain                  my.example.com
Selector                mail
KeyFile                 /etc/dkimkeys/mail.private

然后改Socket设定,只开8891/tcp:

Socket                  inet:8891@localhost

Postfix

/etc/postfix/main.cf内加上:

milter_default_action = accept
milter_protocol = 2
smtpd_milters = inet:localhost:8891
non_smtpd_milters = inet:localhost:8891

然后重启服务:

sudo service opendkim restart; sudo postfix reload

相关连结

外部链接