{"id":294,"date":"2021-06-21T10:21:13","date_gmt":"2021-06-21T02:21:13","guid":{"rendered":"https:\/\/blog.zhiccc.top\/?p=294"},"modified":"2022-10-21T14:37:51","modified_gmt":"2022-10-21T06:37:51","slug":"%e6%95%99%e7%a8%8b%e9%82%ae%e4%bb%b6%e6%9c%8d%e5%8a%a1%e5%99%a8%e7%9a%84%e8%ba%ab%e4%bb%bd%e9%aa%8c%e8%af%81%e5%88%b6%e4%bd%9c%e4%b8%8e%e5%a4%84%e7%90%86","status":"publish","type":"post","link":"https:\/\/blog.zhiccc.net\/?p=294","title":{"rendered":"[\u6559\u7a0b]\u90ae\u4ef6\u670d\u52a1\u5668\u7684\u8eab\u4efd\u9a8c\u8bc1\u5236\u4f5c\u4e0e\u5904\u7406"},"content":{"rendered":"\n<figure class=\"wp-block-pullquote\"><blockquote><p>\u8bf7\u5148\u786e\u8ba4\u60a8\u642d\u5efa\u90ae\u4ef6\u670d\u52a1\u7684\u670d\u52a1\u5668\u5f00\u653e25\u7aef\u53e3\uff0c\u5927\u90e8\u5206VPS\u670d\u52a1\u5546\u4e0d\u5f00\u653e\u6b64\u7aef\u53e3<\/p><\/blockquote><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>\u5feb\u901f\u8df3\u8f6c\u5217\u8868<\/li><li><a href=\"#Preview\">\u8eab\u4efd\u9a8c\u8bc1\u65b9\u5f0f\u4e00\u89c8<\/a><\/li><li><a href=\"#FQDNMX\">FQDN-MX\u89e3\u6790\u8981\u6c42<\/a><\/li><li><a href=\"#PTR\">PTR\u89e3\u6790\u5236\u4f5c<\/a><\/li><li><a href=\"#SPF\">SPF\u89e3\u6790\u5236\u4f5c<\/a><\/li><li><a href=\"#DKIMSign\">DKIM\u7b7e\u540d\u5236\u4f5c<\/a><\/li><li><a href=\"#DMARC\">DMARC\u89e3\u6790\u5236\u4f5c<\/a><\/li><li><a href=\"#MAILTEST\">\u90ae\u4ef6\u6d4b\u8bd5<\/a><\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Preview\">\u53ef\u4ee5\u4f5c\u4e3a\u8eab\u4efd\u9a8c\u8bc1\u7684\u65b9\u5f0f\u4e00\u89c8<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>PTR\uff1a\u53cd\u5411\u89e3\u6790(Pointer Record)<\/li><li>SPF\uff1a\u53d1\u4ef6\u4eba\u7b56\u7565\u6846\u67b6\u89e3\u6790(Sender Policy Framework) \u3010\u6ce8:\u6839\u636e<a href=\"https:\/\/datatracker.ietf.org\/doc\/rfc7208\/\" target=\"_blank\" rel=\"noreferrer noopener\">RFC 7208<\/a>\uff0cSPF\u8bb0\u5f55\u5c06\u4f1a\u79fb\u9664(\u622a\u6b62\u81f3\u53d1\u5e03\u6587\u7ae0\u65f6\uff0ccloudflare\u8fd8\u4fdd\u7559\u7740SPF\u89e3\u6790)\uff0c\u8bf7\u5c06SPF\u7684\u6570\u636e\u4ee5TXT\u8bb0\u5f55\u5f62\u5f0f\u5199\u5165SPF\u6570\u636e\u3011<\/li><li>DKIM\uff1a\u90ae\u4ef6\u7b7e\u540d<\/li><li>DMARC\uff1a\u6b64TXT\u8bb0\u5f55\u8981\u4e0eSPF\u4e00\u8d77\u4f7f\u7528<\/li><li>FQDN\uff1a\u5168\u9650\u5b9a\u57df\u540d(Fully Qualified Domain Name)\uff0c\u9700\u8981\u4e0eMX\u89e3\u6790\u5173\u8054<\/li><\/ul>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"FQDNMX\">FQDN-MX\u89e3\u6790\u8981\u6c42<\/h2>\n\n\n\n<p>\u5efa\u8baeMX\u89e3\u6790\u6307\u5411\u4e00\u4e2aA\u89e3\u6790\uff0c\u8fd9\u4e2aA\u89e3\u6790(\u90ae\u4ef6\u670d\u52a1\u5668FQDN)\u518d\u6307\u5411\u8be5IP\uff0c\u670d\u52a1\u5668\u7684\u4e3b\u673a\u540d(Hostname)\u6539\u4e3aFQDN\u6240\u5bf9\u5e94\u7684\u4e3b\u673a\u540d\u3002<\/p>\n\n\n\n<p>\u4f8b\u5982\uff1aMX\u89e3\u6790example.com\uff0cMX\u89e3\u6790\u51fa<strong>mail<\/strong>.example.com\u8fd9\u4e2aA\u89e3\u6790(FQDN)\uff0cA\u89e3\u6790\u89e3\u6790\u5230\u90ae\u4ef6\u670d\u52a1\u5668IP\uff0c\u670d\u52a1\u5668\u7684Hostname\u8981\u6539\u4e3a<strong>mail<\/strong>\uff0c\u5177\u4f53\u7528\u9014\u63a5\u4e0b\u6765\u4f1a\u63d0\u53ca\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"PTR\">PTR\u89e3\u6790\u5236\u4f5c<\/h2>\n\n\n\n<p><strong>PTR\u89e3\u6790\u4e0e\u63d0\u4f9b\u670d\u52a1\u5668\u7684\u670d\u52a1\u5546\u6709\u5173\uff0c\u8bf7\u5411\u60a8\u7684\u670d\u52a1\u5546\u8be2\u95ee\u662f\u5426\u5141\u8bb8\u505arDNS\u53cd\u5411\u89e3\u6790\uff0c\u53ef\u80fd\u6709\u4e00\u4e9b\u670d\u52a1\u5546\u5141\u8bb825\u53e3\u4f46\u4e0d\u7ed9rDNS<\/strong>\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1.\u8fdb\u5165\u670d\u52a1\u5546\u63d0\u4f9b\u7684\u7ba1\u7406\u540e\u53f0\uff0c\u627e\u5230\u81ea\u5df1\u7684IP\u7ba1\u7406\u9875\u9762<\/h3>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><img decoding=\"async\" src=\"https:\/\/blog.zhiccc.net\/wp-content\/uploads\/2021\/06\/QQ\u622a\u56fe20210621085052-1024x245.png\" alt=\"\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">2.\u4fee\u6539Reverse DNS(rDNS)\uff0c\u5c06FQDN\u5199\u5165\uff0c\u4fdd\u5b58\u5373\u53ef(IPv4\/IPv6\u90fd\u53ef\u4ee5\uff0c\u770b\u4f60\u5fc3\u60c5)<\/h3>\n\n\n\n<h3 class=\"wp-block-heading\">3.\u8fdb\u5165\u4f60\u7684\u57df\u540d\u89e3\u6790\u754c\u9762\uff0c\u5c06\u60a8\u7684PTR\u89e3\u6790\u4e5f\u5199\u5230\u60a8\u7684\u57df\u540d\u89e3\u6790\u4e2d<\/h3>\n\n\n\n<p>\u4f8b\u5982\uff1a<strong>mail.example.com<\/strong>\u6240\u5bf9\u5e94\u7684IP\u4e3a<strong>11.4.5.14<\/strong>\u548c<strong>2401:aa1:92:abb:b1::c1e<\/strong>\uff0c\u60a8\u53ea\u9700\u8981\u628aIP\u53cd\u8fc7\u6765\u5e76\u5c06 : \u6539\u4e3a . \uff0c\u5efa\u8bae\u901a\u8fc7\u7b2c\u56db\u6b65\u67e5\u8be2\u89e3\u6790\u7684\u65b9\u6cd5\u76f4\u63a5\u83b7\u53d6<strong>in-addr.arpa<\/strong>\u6570\u636e\uff0c\u4f8b\u5b50\u5728\u57df\u540d\u89e3\u6790\u4e2d\u7684PTR\u5e94\u8be5\u662f\u89e3\u6790\u540d\u4e3a<strong>mail<\/strong>\uff0c\u89e3\u6790\u503c\u4e3a<strong>14.5.4.11.in-addr.arpa<\/strong>\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">4.\u67e5\u770b\u89e3\u6790\u662f\u5426\u751f\u6548<\/h3>\n\n\n\n<p>Windows\u67e5\u8be2\u65b9\u6cd5\uff1aWin+R\u6253\u5f00cmd\u5e76\u8f93\u5165\u4ee5\u4e0b\u6307\u4ee4<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nslookup\n&gt;set q=ptr\n&gt;\u3010\u4f60\u7684IP\u3011<\/code><\/pre>\n\n\n\n<p>\u5982\u679c\u89e3\u6790\u6210\u529f\uff0c\u4f60\u4f1a\u627e\u5230\u4f60\u586b\u7684FQDN<\/p>\n\n\n\n<p>Linux\u67e5\u8be2\u65b9\u6cd5\uff1a\u8fdb\u5165Terminal\uff0c\u8f93\u5165dig -x \u3010\u4f60\u7684IP\u3011<br>\u5982\u679c\u89e3\u6790\u6210\u529f\uff0c\u4f60\u4f1a\u627e\u5230\u4f60\u586b\u7684FQDN<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"SPF\">SPF\u89e3\u6790\u5236\u4f5c<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">SPF\u8bed\u6cd5&#8211; \u7c7b\u522b\uff1a<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>all | ip4 | ip6 | a | mx | ptr | exists | include<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">SPF\u8bed\u6cd5&#8211; \u5bf9\u5e94\u524d\u7f00\uff1a<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>+ \u901a\u8fc7\n | - \u62d2\u7edd\n | ~ \u8f6f\u62d2\u7edd\n | ? \u4e2d\u7acb<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u89e3\u6790\u5904\u7406\uff1a<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">\u8fdb\u5165\u57df\u540d\u89e3\u6790\u9875\u9762\uff0c\u6dfb\u52a0TXT\u89e3\u6790<\/h4>\n\n\n\n<p>\u540d\u79f0\u4e3a@(\u5c31\u662f\u4f60\u7684\u57df\u540d)\uff0c\u5185\u5bb9\u586b\u5199\u53ef\u4ee5\u5982\u4e0b<br><strong>&#8220;v=spf1 ip4:\u4f60\u7684IPv4\u5730\u5740 ip6:\u4f60\u7684IPv6\u5730\u5740 ~all&#8221;<\/strong>     \u53ea\u5141\u8bb8\u4f60\u7684IPv4\u548cIPv6\u5730\u5740\u53d1\u4fe1\uff0c\u4e0d\u662f\u8fd9\u4e9bIP\u53d1\u6765\u7684\u90ae\u4ef6\u6309\u7167\u5783\u573e\u90ae\u4ef6\u5904\u7406(\u88ab\u6807\u8bb0)<br><strong>&#8220;v=spf1 -all&#8221;<\/strong>     \u8fd9\u4e2a\u57df\u540d\u4e0d\u4f1a\u53d1\u9001\u4efb\u4f55\u90ae\u4ef6\uff0c\u6765\u81ea\u8fd9\u4e2a\u57df\u540d\u7684\u90ae\u4ef6\u4e00\u5f8b\u62d2\u7edd<br><strong>&#8220;v=spf1 ip4:11.4.5.0\/24 ~all&#8221; <\/strong>      \u53ea\u5141\u8bb811.4.5.0\/24\u8fd9\u4e2aIP\u6bb5\u5185\u6240\u6709\u7684IP\u53d1\u4fe1\uff0c\u4e0d\u5728\u8fd9\u4e2aIP\u6bb5\u91cc\u7684IP\u53d1\u6765\u7684\u90ae\u4ef6\u6309\u7167\u5783\u573e\u90ae\u4ef6\u5904\u7406(\u88ab\u6807\u8bb0)\u3010IPv6\u540c\u7406\u3011<br><strong>&#8220;v=spf1 a mx ~all&#8221;<\/strong>     \u53ea\u5141\u8bb8MX\u89e3\u6790\u51fa\u6765\u7684IP\u53d1\u4fe1\uff0c\u4e0d\u662f\u8fd9\u4e9bIP\u53d1\u6765\u7684\u90ae\u4ef6\u6309\u7167\u5783\u573e\u90ae\u4ef6\u5904\u7406(\u88ab\u6807\u8bb0)<br><strong>&#8220;v=spf1 mx mx:anotherserver.example.com ~all&#8221; <\/strong>    \u53ea\u5141\u8bb8\u8be5MX\u89e3\u6790\u7684IP\u5730\u5740\u4e0e<strong>anotherserver.example.com<\/strong>\u7684IP\u5730\u5740\uff0c\u4e0d\u662f\u8fd9\u4e9bIP\u53d1\u6765\u7684\u90ae\u4ef6\u6309\u7167\u5783\u573e\u90ae\u4ef6\u5904\u7406(\u88ab\u6807\u8bb0)<br><strong>\u201cv=spf1 include:anotherserver.example.com ~all\u201d<\/strong>     \u4f7f\u7528\u4e0e<strong>anotherserver.example.com<\/strong>\u4e00\u6837\u7684SPF\u89e3\u6790\uff0c\u5982\u679c<strong>anotherserver.example.com<\/strong>\u4e0d\u5b58\u5728SPF\u89e3\u6790\uff0c\u5219\u62a5\u9519<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">SPF\u89e3\u6790\u67e5\u8be2<\/h3>\n\n\n\n<p>Windows\u67e5\u8be2\u65b9\u6cd5\uff1aWin+R\u6253\u5f00cmd\u5e76\u8f93\u5165\u4ee5\u4e0b\u6307\u4ee4<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nslookup\n&gt;set q=txt\n&gt;\u3010\u4f60\u7684\u53d1\u4fe1\u57df\u540d(@\u7684\u540e\u7f00)\u3011<\/code><\/pre>\n\n\n\n<p>\u5982\u679c\u89e3\u6790\u6210\u529f\uff0c\u4f60\u4f1a\u627e\u5230\u4f60\u586b\u7684SPF\u89c4\u5219<\/p>\n\n\n\n<p>Linux\u67e5\u8be2\u65b9\u6cd5\uff1a\u8fdb\u5165Terminal\uff0c\u8f93\u5165dig txt \u3010\u4f60\u7684\u53d1\u4fe1\u57df\u540d(@\u7684\u540e\u7f00)\u3011<br>\u5982\u679c\u89e3\u6790\u6210\u529f\uff0c\u4f60\u4f1a\u627e\u5230\u4f60\u586b\u7684SPF\u89c4\u5219<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"DKIMSign\">DKIM\u7b7e\u540d\u5236\u4f5c<\/h2>\n\n\n\n<p><strong>\u6ce8\u610f\uff1a\u672c\u6587\u4f7f\u7528\u7684\u73af\u5883\u4e3aUbuntu 18.04 LTS + Postfix<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1.\u5b89\u88c5opendkim<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install opendkim<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">2.\u914d\u7f6eopendkim\u5e76\u4f7f\u5176\u751f\u6548<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">1.\u914d\u7f6e\u6587\u4ef6\u5939<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir \/etc\/opendkim\/keys\/\u3010\u4f60\u7684\u57df\u540d\u3011 -p\nmkdir \/var\/run\/opendkim\/ -p\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">2.\u4fee\u6539opendkim\u6570\u636e<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>vi \/etc\/opendkim.conf<\/code><\/pre>\n\n\n\n<p>\u4fee\u6539\u6570\u636e\u4e3a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># This is a basic configuration that can easily be adapted to suit a standard\n# installation. For more advanced options, see opendkim.conf(5) and\/or\n# \/usr\/share\/doc\/opendkim\/examples\/opendkim.conf.sample.\n\n# Log to syslog\nSyslog\t\t\tyes\n# Required to use local socket with MTAs that access the socket as a non-\n# privileged user (e.g. Postfix)\nUMask\t\t\t007\n\n# Sign for example.com with key in \/etc\/dkimkeys\/dkim.key using\n# selector '2007' (e.g. 2007._domainkey.example.com)\n#Domain\t\t\texample.com\n#KeyFile\t\t\/etc\/dkimkeys\/dkim.key\n#Selector\t\t2007\n\n# Commonly-used options; the commented-out versions show the defaults.\nCanonicalization\trelaxed\/simple\nMode\t\t\tsv\nSubDomains\t\tno\nAutoRestart         yes\nAutoRestartRate     10\/1M\nBackground          yes\nDNSTimeout          5\nSignatureAlgorithm  rsa-sha256\n\n# Socket smtp:\/\/localhost\n#\n# ##  Socket socketspec\n# ##\n# ##  Names the socket where this filter should listen for milter connections\n# ##  from the MTA.  Required.  Should be in one of these forms:\n# ##\n# ##  inet:port@address           to listen on a specific interface\n# ##  inet:port                   to listen on all interfaces\n# ##  local:\/path\/to\/socket       to listen on a UNIX domain socket\n#\n#Socket                  inet:8892@localhost\nSocket\t\t\tlocal:\/var\/spool\/postfix\/opendkim\/opendkim.sock\n\n##  PidFile filename\n###      default (none)\n###\n###  Name of the file where the filter should write its pid before beginning\n###  normal operations.\n#\nPidFile               \/var\/run\/opendkim\/opendkim.pid\n\n\n# Always oversign From (sign using actual From and a null From to prevent\n# malicious signatures header fields (From and\/or others) between the signer\n# and the verifier.  From is oversigned by default in the Debian pacakge\n# because it is often the identity key used by reputation systems and thus\n# somewhat security sensitive.\nOversignHeaders\t\tFrom\n\n##  ResolverConfiguration filename\n##      default (none)\n##\n##  Specifies a configuration file to be passed to the Unbound library that\n##  performs DNS queries applying the DNSSEC protocol.  See the Unbound\n##  documentation at http:\/\/unbound.net for the expected content of this file.\n##  The results of using this and the TrustAnchorFile setting at the same\n##  time are undefined.\n##  In Debian, \/etc\/unbound\/unbound.conf is shipped as part of the Suggested\n##  unbound package\n\n# ResolverConfiguration     \/etc\/unbound\/unbound.conf\n\n##  TrustAnchorFile filename\n##      default (none)\n##\n## Specifies a file from which trust anchor data should be read when doing\n## DNS queries and applying the DNSSEC protocol.  See the Unbound documentation\n## at http:\/\/unbound.net for the expected format of this file.\n\nTrustAnchorFile       \/usr\/share\/dns\/root.key\n\n##  Userid userid\n###      default (none)\n###\n###  Change to user \"userid\" before starting normal operation?  May include\n###  a group ID as well, separated from the userid by a colon.\n#\nUserID                opendkim\n# Map domains in From addresses to keys used to sign messages\nKeyTable           refile:\/etc\/opendkim\/key.table\nSigningTable       refile:\/etc\/opendkim\/signing.table\n\n# Hosts to ignore when verifying signatures\nExternalIgnoreList  \/etc\/opendkim\/trusted.hosts\n\n# A set of internal hosts whose mail should be signed\nInternalHosts       \/etc\/opendkim\/trusted.hosts\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">3.\u4fee\u6539\u6dfb\u52a0\u53ef\u4fe1\u670d\u52a1\u5668\u3010\u6839\u636e\u81ea\u5df1\u7684\u60c5\u51b5\u586b\u5199!\u3011<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>vi \/etc\/opendkim\/trusted.hosts<\/code><\/pre>\n\n\n\n<p>\u786e\u4fdd\u5185\u90e8\u6709\u4ee5\u4e0b\u6570\u636e<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>127.0.0.1\n::1\nlocalhost\n\u3010\u4f60\u7684\u57df\u540d\u3011<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">4.\u4fee\u6539Key.table\u6587\u4ef6<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>vi \/etc\/opendkim\/key.table<\/code><\/pre>\n\n\n\n<p>\u5199\u5165\u6570\u636e<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>default._domainkey.\u3010\u4f60\u7684\u57df\u540d\u3011  \u3010\u4f60\u7684\u57df\u540d\u3011:default:\/etc\/opendkim\/keys\/\u3010\u53d1\u4fe1\u57df\u540d(@\u7684\u540e\u7f00)\u3011\/default.private<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">5.\u4fee\u6539Signing.table\u6587\u4ef6<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>vi \/etc\/opendkim\/signing.table<\/code><\/pre>\n\n\n\n<p>\u5199\u5165\u6570\u636e<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>*@\u3010\u4f60\u7684\u57df\u540d\u3011 default._domainkey.\u3010\u4f60\u7684\u57df\u540d\u3011<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">6.\u4fee\u6539Postfix<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>vi \/etc\/postfix\/main.cf<\/code><\/pre>\n\n\n\n<p>\u8ffd\u52a0\u6570\u636e<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#\n# Added to open DKIM and DMARC\n#\n# Milter configuration\npolicyd-spf_time_limit = 3600\n#check_policy_service unix:private\/policyd-spf\nmilter_default_action = accept\nmilter_protocol = 6\nsmtpd_milters = local:opendkim\/opendkim.sock\nnon_smtpd_milters = $smtpd_milters\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">7.\u751f\u6210\u5bc6\u94a5\u5e76\u83b7\u53d6\u5230\u516c\u94a5<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir \/etc\/opendkim\/keys\/\u3010\u53d1\u4fe1\u57df\u540d(@\u7684\u540e\u7f00)\u3011\nopendkim-genkey -D \/etc\/opendkim\/keys\/\u3010\u53d1\u4fe1\u57df\u540d(@\u7684\u540e\u7f00)\u3011\/ -d  \u3010\u4f60\u7684\u57df\u540d\u3011 -s default\nuseradd opendkim\nchown opendkim.opendkim \/etc\/opendkim -R\nchown opendkim.opendkim \/etc\/opendkim.conf\n\/etc\/init.d\/opendkim -Dx \/etc\/opendkim.conf\nsystemctl restart postfix\nchown opendkim:opendkim \/etc\/opendkim\/keys\/\u3010\u53d1\u4fe1\u57df\u540d(@\u7684\u540e\u7f00)\u3011\/default.private\ncat \/etc\/opendkim\/keys\/\u3010\u53d1\u4fe1\u57df\u540d(@\u7684\u540e\u7f00)\u3011\/default.txt   #\u91cc\u9762\u5c31\u662f\u4f60DKIM\u89e3\u6790<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">8.\u8fdb\u5165\u57df\u540d\u89e3\u6790\u9875\u9762\u6dfb\u52a0\u89e3\u6790<\/h4>\n\n\n\n<p>\u89e3\u6790\u7c7b\u578b\uff1a<strong>TXT\u89e3\u6790<\/strong><br>\u540d\u5b57\uff1a<strong>default._domainkey<\/strong><br>\u5185\u5bb9\uff1a<strong>v=DKIM1; h=sha256; k=rsa;p=\u3010\u4f60\u62ff\u5230\u7684\u516c\u94a5\u3011<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"DMARC\">DMARC\u89e3\u6790\u5236\u4f5c<\/h2>\n\n\n\n<h3 class=\"has-normal-font-size wp-block-heading\">\u8fdb\u5165\u57df\u540d\u89e3\u6790\u754c\u9762\uff0c\u6dfb\u52a0\u89e3\u6790\u89e3\u6790\u7c7b\u578b\uff1aTXT\u89e3\u6790<br>\u540d\u5b57\uff1a_dmarc<br>\u5185\u5bb9\uff1av=DMARC1; p=none; fo=1; ruf=mailto:<strong>dmarc@\u3010\u4f60\u7684\u57df\u540d\u3011<\/strong>; rua=mailto:dmarc_report@\u3010\u4f60\u7684\u57df\u540d\u3011<\/h3>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"MAILTEST\">\u90ae\u4ef6\u6d4b\u8bd5<\/h2>\n\n\n\n<p>\u5f80mail-tester.com\u4e2d\u53d1\u9001\u4e00\u5c01\u90ae\u4ef6\u6d4b\u8bd5\u5373\u53ef<\/p>\n\n\n\n<div class=\"wp-block-buttons is-content-justification-center is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link\" href=\"https:\/\/mail-tester.com\">\u70b9\u6211\u524d\u5f80mail-tester.com<\/a><\/div>\n<\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8bf7\u5148\u786e\u8ba4\u60a8\u642d\u5efa\u90ae\u4ef6\u670d\u52a1\u7684\u670d\u52a1\u5668\u5f00\u653e25\u7aef\u53e3\uff0c\u5927\u90e8\u5206VPS\u670d\u52a1\u5546\u4e0d\u5f00\u653e\u6b64\u7aef\u53e3 \u5feb\u901f\u8df3\u8f6c\u5217\u8868 \u8eab\u4efd\u9a8c\u8bc1\u65b9\u5f0f\u4e00\u89c8 F&hellip;&nbsp;<a href=\"https:\/\/blog.zhiccc.net\/?p=294\" class=\"\" rel=\"bookmark\">\u9605\u8bfb\u66f4\u591a &raquo;<span class=\"screen-reader-text\">[\u6559\u7a0b]\u90ae\u4ef6\u670d\u52a1\u5668\u7684\u8eab\u4efd\u9a8c\u8bc1\u5236\u4f5c\u4e0e\u5904\u7406<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"off","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","footnotes":""},"categories":[11],"tags":[],"class_list":["post-294","post","type-post","status-publish","format-standard","hentry","category-jiao-cheng"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/blog.zhiccc.net\/index.php?rest_route=\/wp\/v2\/posts\/294","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.zhiccc.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.zhiccc.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.zhiccc.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.zhiccc.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=294"}],"version-history":[{"count":13,"href":"https:\/\/blog.zhiccc.net\/index.php?rest_route=\/wp\/v2\/posts\/294\/revisions"}],"predecessor-version":[{"id":487,"href":"https:\/\/blog.zhiccc.net\/index.php?rest_route=\/wp\/v2\/posts\/294\/revisions\/487"}],"wp:attachment":[{"href":"https:\/\/blog.zhiccc.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=294"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.zhiccc.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=294"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.zhiccc.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}