Ikoula Corporate
Espace client
Support
Blog
Wiki
Site web Ikoula
查看“在 Debian 下后缀上安装 DKIM”的源代码
←
在 Debian 下后缀上安装 DKIM
Jump to navigation
Jump to search
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看和复制此页面的源代码。
<span data-link_translate_ro_title="Instalaţi DKIM pe Postfix sub Debian" data-link_translate_ro_url="Instala%C5%A3i+DKIM+pe+Postfix+sub+Debian"></span>[[:ro:Instalaţi DKIM pe Postfix sub Debian]][[ro:Instalaţi DKIM pe Postfix sub Debian]] <span data-link_translate_pl_title="Zainstalować DKIM na Postfix w Debianie" data-link_translate_pl_url="Zainstalowa%C4%87+DKIM+na+Postfix+w+Debianie"></span>[[:pl:Zainstalować DKIM na Postfix w Debianie]][[pl:Zainstalować DKIM na Postfix w Debianie]] <span data-link_translate_de_title="DKIM auf Postfix unter Debian installieren" data-link_translate_de_url="DKIM+auf+Postfix+unter+Debian+installieren"></span>[[:de:DKIM auf Postfix unter Debian installieren]][[de:DKIM auf Postfix unter Debian installieren]] <span data-link_translate_nl_title="DKIM op Postfix onder Debian installeren" data-link_translate_nl_url="DKIM+op+Postfix+onder+Debian+installeren"></span>[[:nl:DKIM op Postfix onder Debian installeren]][[nl:DKIM op Postfix onder Debian installeren]] <span data-link_translate_it_title="Installare Postfix sotto Debian DKIM" data-link_translate_it_url="Installare+Postfix+sotto+Debian+DKIM"></span>[[:it:Installare Postfix sotto Debian DKIM]][[it:Installare Postfix sotto Debian DKIM]] <span data-link_translate_pt_title="Instalar o DKIM no Postfix no Debian" data-link_translate_pt_url="Instalar+o+DKIM+no+Postfix+no+Debian"></span>[[:pt:Instalar o DKIM no Postfix no Debian]][[pt:Instalar o DKIM no Postfix no Debian]] <span data-link_translate_es_title="Instalar DKIM en Postfix en Debian" data-link_translate_es_url="Instalar+DKIM+en+Postfix+en+Debian"></span>[[:es:Instalar DKIM en Postfix en Debian]][[es:Instalar DKIM en Postfix en Debian]] <span data-link_translate_en_title="Install DKIM on Postfix under Debian" data-link_translate_en_url="Install+DKIM+on+Postfix+under+Debian"></span>[[:en:Install DKIM on Postfix under Debian]][[en:Install DKIM on Postfix under Debian]] <span data-link_translate_ru_title="Установить DKIM на Postfix под Debian" data-link_translate_ru_url="%D0%A3%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%B8%D1%82%D1%8C+DKIM+%D0%BD%D0%B0+Postfix+%D0%BF%D0%BE%D0%B4+Debian"></span>[[:ru:Установить DKIM на Postfix под Debian]][[ru:Установить DKIM на Postfix под Debian]] <span data-link_translate_ja_title="Debian に DKIM をインストールします。" data-link_translate_ja_url="Debian+%E3%81%AB+DKIM+%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%97%E3%81%BE%E3%81%99%E3%80%82"></span>[[:ja:Debian に DKIM をインストールします。]][[ja:Debian に DKIM をインストールします。]] <span data-link_translate_ar_title="تثبيت DKIM على Postfix تحت ديبيان" data-link_translate_ar_url="%D8%AA%D8%AB%D8%A8%D9%8A%D8%AA+DKIM+%D8%B9%D9%84%D9%89+Postfix+%D8%AA%D8%AD%D8%AA+%D8%AF%D9%8A%D8%A8%D9%8A%D8%A7%D9%86"></span>[[:ar:تثبيت DKIM على Postfix تحت ديبيان]][[ar:تثبيت DKIM على Postfix تحت ديبيان]] <span data-link_translate_fr_title="Installer DKIM sur Postfix sous Debian" data-link_translate_fr_url="Installer_DKIM_sur_Postfix_sous_Debian"></span>[[:fr:Installer DKIM sur Postfix sous Debian]][[fr:Installer DKIM sur Postfix sous Debian]] <br /> 这篇文章是从由软件进行自动翻译。你可以[[:fr:Installer DKIM sur Postfix sous Debian|看到这篇文章的源代码]]<br /><span data-translate="fr"></span> ==介绍 == 所以 [[:fr:Eviter que ses mails soient classés comme spam| d ' 避免结束了他在垃圾邮件文件夹中的邮件]] 这可能是有趣设置 '''DKIM''' 在其电子邮件。<br> '''DKIM''' 或 ''域密钥识别邮件 DKIM '' 是一种电子邮件身份验证方法。此方法允许用一个标识符字段变送器,有用,知道是谁负责装运索偿签署一封电子邮件。你可以找到更多的信息对 '''DKIM''' 在维基百科页可为这 [https://fr.wikipedia.org/wiki/DomainKeys_Identified_Mail 地址]<br> 这篇文章旨在介绍安装 d ''''OpenDKIM''' 和它的配置。这篇文章不是详尽无遗的服务的配置设置,它是您有责任检查与您的系统配置的一致性。 ==系统必备组件 == 前提之一是维护其系统最新情况。<br> <syntaxhighlight lang="bash"> apt-get update apt-get upgrade </syntaxhighlight> 你 Debian 的系统保持最新,请确保你有官方资料库的列表。你可以找到在 Ikoula 资料库和安装说明的可用列表 [[:fr:Quelles_sont_les_sources_des_d%C3%A9p%C3%B4ts_debian_chez_Ikoula|a 这个地址]]. <div style="background-color: #FF9999;"> '''警告 ''': 总是对您的系统进行任何更改之前计划备份您的文件时处理不当。<br> 在生产服务器上,请务必在非高峰时段,尽量减少影响你的行动执行这些操作。</div> ==执行 == ===安装 OpenDKIM === ;第一次安装 OpenDKIM <syntaxhighlight lang="bash"> apt-get install opendkim opendkim-tools </syntaxhighlight> ===配置 OpenDKIM === 通过两个文件进行配置的 OpenDKIM : ''/etc/opendkim.conf'' et ''/etc/default/opendkim''.<br> ====/etc/opendkim.conf==== 主要配置文件 d ''''OpenDKIM'''. ; 打开文件 <syntaxhighlight lang="bash"> vi /etc/opendkim.conf </syntaxhighlight> ; 将以下行添加到该文件 /etc/opendkim.conf, 如果有些已经本评论,以免问题 <syntaxhighlight lang="bash"> AutoRestart Yes AutoRestartRate 10/1h UMask 002 Syslog yes SyslogSuccess Yes LogWhy Yes Canonicalization relaxed/simple ExternalIgnoreList refile:/etc/opendkim/TrustedHosts InternalHosts refile:/etc/opendkim/TrustedHosts KeyTable refile:/etc/opendkim/KeyTable SigningTable refile:/etc/opendkim/SigningTable 模式 sv PidFile /var/run/opendkim/opendkim.pid SignatureAlgorithm rsa-sha256 用户 Id opendkim:opendkim 套接字 inet:17789@localhost </syntaxhighlight> 这里有不同的参数 : {| border="1" cellpadding="20" cellspacing="0" |AutoRestart |自动重新启动该服务在发生错误时。 |- |AutoRestartRate |在给定时间内的最大重新启动的次数。例如 10 每小时重新启动 : 10/1h. |- |UMAsk |给他的用户 Id,在指定的用户的总权限和权限授予读取和执行为其他用户。 |- |Syslog / SyslogSuccess / LogWhy |激活该服务的日志。 |- |Canonicalization |规范格式的日志消息� |- |ExternalIgnoreList |外部主机授权从本无需身份验证的服务器发送邮件。 |- |InternalHosts |内部的主机的出站电子邮件必须签署。 |- |KeyTable |键的名称与密钥文件进行联络。 |- |SigningTable |将用于消息的签名的列表。选择基于发件人地址。 |- |Mode |经营模式 d ''''OpenDKIM'''. (s) 签名和 (v) 核查。 |- |PidFile |包含文件 ID 服务进程的 pid 的位置。 |- |SignatureAlgorithm |选择要编码的签名的加密算法。 |- |UserID |用户和组,将运行的服务 '''OpenDKIM''' |- |Socket |在 Postifx 哪个端口上侦听和 '''OpenDKIM''' 交换消息。在端口上侦听本地 17789: 17789@本地主机。 |} 您当前的配置中,根据需要,你必须匹配的参数,这是一个示例配置。你可以找到有关 d 配置文件的详细信息 ''''OpenDKIM''' à cette [http://www.opendkim.org/opendkim.conf.5.html 地址]. <syntaxhighlight lang=bash> # Log to syslog #Syslog yes # Required to use local socket with MTAs that access the socket as a non- # privileged user (e.g. Postfix) #UMask 002 # Sign for example.com with key in /etc/mail/dkim.key using # selector '2007' (e.g. 2007._domainkey.example.com) #Domain example.com #KeyFile /etc/mail/dkim.key #Selector 2007 # Commonly-used options; the commented-out versions show the defaults. #Canonicalization simple #Mode sv #SubDomains no #ADSPDiscard no # Always oversign From (sign using actual From and a null From to prevent # malicious signatures header fields (From and/or others) between the signer # and the verifier. From is oversigned by default in the Debian pacakge # because it is often the identity key used by reputation systems and thus # somewhat security sensitive. OversignHeaders From # List domains to use for RFC 6541 DKIM Authorized Third-Party Signatures # (ATPS) (experimental) #ATPSDomains example.com AutoRestart Yes AutoRestartRate 10/1h UMask 002 Syslog yes SyslogSuccess Yes LogWhy Yes Canonicalization relaxed/simple ExternalIgnoreList refile:/etc/opendkim/TrustedHosts InternalHosts refile:/etc/opendkim/TrustedHosts KeyTable refile:/etc/opendkim/KeyTable SigningTable refile:/etc/opendkim/SigningTable Mode sv PidFile /var/run/opendkim/opendkim.pid SignatureAlgorithm rsa-sha256 UserID opendkim:opendkim Socket inet:17789@localhost </syntaxhighlight> ====/etc/default/opendkim==== ; 打开文件 <syntaxhighlight lang="bash"> vi /etc/default/opendkim </syntaxhighlight> ; 添加以下行 <syntaxhighlight lang="bash"> SOCKET="inet:17789@localhost" </syntaxhighlight> 需要更改的端口,如果它不同于前面的配置文件。必须注意到先前定义的端口以保留相同跨不同的配置文件。 ===后缀配置 === ; 编辑配置文件为 Postifx <syntaxhighlight lang="bash"> vi /etc/postfix/main.cf </syntaxhighlight> ; 验证下面的行是当前和 de commentees <syntaxhighlight lang="bash"> milter_protocol = 2 milter_default_action = accept </syntaxhighlight> ; 如果安装了反垃圾邮件筛选器,则必须添加 '''OpenDKIM''' 到列表 <syntaxhighlight lang="bash"> smtpd_milters = unix:/spamass/spamass.sock, inet:localhost:17789 non_smtpd_milters = unix:/spamass/spamass.sock, inet:localhost:17789 </syntaxhighlight> ; 如果没有添加 '''OpenDKIM''' <syntaxhighlight lang="bash"> smtpd_milters = inet:localhost:17789 non_smtpd_milters = inet:localhost:17789 </syntaxhighlight> ===创建文件夹 === 现在,我们将创建的文件夹将包含所有数据 d ''''OpenDKIM''' 作为主机,签名,等... ; 创建结构 <syntaxhighlight lang="bash"> mkdir /etc/opendkim mkdir /etc/opendkim/keys </syntaxhighlight> ===允许主机 === 我们现在指定允许签名与电子邮件的主机 '''OpenDKIM'''. ;创建文件 /etc/opendkim/TrustedHosts <syntaxhighlight lang="bash"> vi /etc/opendkim/TrustedHosts </syntaxhighlight> ; 我们可以以宣布,地区使用的 wildwards (*) <syntaxhighlight lang="bash"> #Ne pas toucher les 3 premieres lignes 127.0.0.1 localhost 192.168.0.1/24 *.example.tld </syntaxhighlight> 此文件是一个域的示例配置 *.example.tld ; 保存并关闭 TrustedHosts 文件 ===字典的键 === 词典文件是有提供其相应的密钥的每个域中的一个环节。<br> ; 创建字典的键 <syntaxhighlight lang="bash"> vi /etc/opendkim/KeyTable </syntaxhighlight> ; 添加以下行 <syntaxhighlight lang="bash"> mail._domainkey.example.tld example.tld:mail:/etc/opendkim/keys/example.tld/mail.private </syntaxhighlight> 在此示例中的 example.tld 域应该去她的钥匙 /etc/opendkim/keys/example.tld/mail.private<br> 它是重要你适应这种配置到您的域。 ===签名字典 === 签名字典文件是有联络到其相应域的每个邮件地址。 ; 创建签名字典 <syntaxhighlight lang="bash"> vi /etc/opendkim/SigningTable </syntaxhighlight> ; 添加以下行 ( 允许使用通配符 ) <syntaxhighlight lang="bash"> *@example.tld mail._domainkey.example.tld </syntaxhighlight> 在此示例中的地址在 @example.TLD 应该重定向到 mail._domainkey.example.tld 选择器。<br> 它是重要你适应这种配置到您的域。 ===公共和私人密钥生成 === 我们现在生成我们对公钥和私钥。 ; 移动到的文件夹中会收到钥匙 <syntaxhighlight lang="bash"> cd /etc/opendkim/keys </syntaxhighlight> : 为我们新的域 example.tld 创建一个文件夹 <syntaxhighlight lang="bash"> mkdir example.tld </syntaxhighlight> ; 移动域的文件夹 <syntaxhighlight lang="bash"> cd example.tld </syntaxhighlight> ; 生成的密钥为我们 example.tld 域 <syntaxhighlight lang="bash"> opendkim-genkey -s mail -d example.tld </syntaxhighlight> 选项 -s 以指定一个选择器和 -(d) 的字段。此命令将创建两个文件 ''mail.private'' 私有密钥和 ''mail.txt'' 公共密钥。 ; 更改私钥的所有者 <syntaxhighlight lang="bash"> chown opendkim:opendkim mail.private </syntaxhighlight> ===另外的 DNS 记录中的公共密钥 === 我们现在有我们公共钥匙,现在,我们必须添加的 DNS 记录。 ; 抓住我们的公用密钥 <syntaxhighlight lang="bash"> cat /etc/opendkim/keys/example.tld/mail.private </syntaxhighlight> 你应该检索类似于此的示例行的行 : <pre> mail._domainkey IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC5N3lnvvrYgPCRSoqn+awTpE+iGY" ; ----- DKIM key mail for example.tld </pre> ; 复制的关键,部分 "v=DKIM1 ... +iGY"在我们的示例 ; 添加 DNS TXT 记录包含键 DNS 传播可能需要几个小时才能有效 ( de 24h à 48h ). ; 重新启动后缀和 OpenDKIM <syntaxhighlight lang="bash"> service postfix restart service opendkim restart </syntaxhighlight> == 结论 == 使用 d ''''OpenDKIM''' 现在是从域的地址发送的邮件有效 @example.tld<br> 这篇文章不是详尽无遗的设置 ''''OpenDKIM'''它是服务器的适当适应这些例子与您的配置。 [[Category:专用的服务器]] [[Category:Linux]] [[Category:邮件]] [[Category:垃圾邮件]] [[Category:DKIM]] <br /> <comments />
返回至
在 Debian 下后缀上安装 DKIM
。
导航菜单
个人工具
登录
名字空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
导航
首页
最近更改
随机页面
MediaWiki帮助
工具
链入页面
相关更改
特殊页面
页面信息
投稿
fr-wiki.ikoula.com
en-wiki.ikoula.com
es-wiki.ikoula.com
it-wiki.ikoula.com
nl-wiki.ikoula.com
de-wiki.ikoula.com
pt-wiki.ikoula.com
ru-wiki.ikoula.com
pl-wiki.ikoula.com
ro-wiki.ikoula.com
ja-wiki.ikoula.com
zh-wiki.ikoula.com
he-wiki.ikoula.com
ar-wiki.ikoula.com