OpenDKIM:修订间差异
跳到导航
跳到搜索
此页面具有访问限制。如果您看见此消息,则说明您没有权限访问此页面。
(→設定) |
(→設定) |
||
(未显示同一用户的10个中间版本) | |||
第11行: | 第11行: | ||
== 設定 == | == 設定 == | ||
先產生key pair,其中的<code>-s mail</code>為[[DKIM]]的selector: | 先產生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"> | <syntaxhighlight lang="bash"> | ||
cd /etc/ | cd /etc/dkimkeys; sudo opendkim-genkey -t -s mail -d my.example.com | ||
</syntaxhighlight> | </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 mail
為DKIM的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
相關連結
外部連結
- 官方网站 (英文)