{"id":2527,"date":"2022-03-13T17:26:01","date_gmt":"2022-03-13T09:26:01","guid":{"rendered":"http:\/\/blog.zengqq.com.cn\/?p=2527"},"modified":"2022-03-19T12:11:47","modified_gmt":"2022-03-19T04:11:47","slug":"%e4%b8%80%e6%ad%a5%e6%ad%a5%e5%bb%ba%e7%ab%8b%e9%82%ae%e4%bb%b6%e5%8f%91%e9%80%81","status":"publish","type":"post","link":"https:\/\/blog.zengqq.com.cn\/?p=2527","title":{"rendered":"\u4e00\u6b65\u6b65\u5efa\u7acb\u90ae\u4ef6\u53d1\u9001\uff08\u4e00\uff09"},"content":{"rendered":"\n<p>\u4e00\u76f4\u4ee5\u6765\u5bf9linux\u7684\u5e95\u5c42\u53d1\u9001\u673a\u5236\u4e00\u77e5\u534a\u89e3\uff0c\u6240\u4ee5\u6240\u6709\u7684\u914d\u7f6e\u8fc7\u7a0b\u90fd\u662f\u649e\u5927\u8fd0\u3002\u6b64\u6b21\u4f7f\u7528mailutils\u4e00\u6b65\u4e00\u6b65\u5730\u914d\u7f6e\uff0c\u548c\u601d\u8003\u6765\u89e3\u51b3\u53d1\u9001\u90ae\u4ef6\u7684\u81ea\u52a8\u5316\u5904\u7406\u8fc7\u7a0b\u3002<\/p>\n\n\n\n<p>\u8fd9\u91cc\u4ee5digitalocean\u5de5\u7a0b\u5e08\u7684\u6307\u5bfc\u6587\u7ae0(<a rel=\"noreferrer noopener\" href=\"https:\/\/www.digitalocean.com\/community\/tutorials\/how-to-install-and-configure-postfix-as-a-send-only-smtp-server-on-ubuntu-16-04\" target=\"_blank\">\u539f\u6587\u5728\u6b64<\/a>)\u4e3a\u4f9d\u636e\uff0c\u81ea\u884c\u914d\u7f6e\u5728\u6811\u8393\u6d3e3\u4e0a\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u4ed4\u7ec6\u7684\u7814\u7a76\u5c31\u4e0d\u96be\u53d1\u73b0\u6211\u8bf4\u8bf4\u7684mailutilis\u662f\u4e00\u4e2a\u53eb\u505aPostfix\u7684\u8f6f\u4ef6\uff0c\u5b89\u88c5Postfix\u5c31\u662finstall Mailutils\uff0c\u5475\u5475\uff0c\u6211\u662f\u5f88\u611f\u6168\u8fd9\u70b9\u56e0\u4e3a\u5728\u7b2c\u4e00\u6b21\u5b89\u88c5\u7684\u65f6\u5019\u5c31\u65e0\u7f18\u65e0\u6545\u7684\u8df3\u8fc7\u4e86setup Postfix\u7684\u754c\u9762\uff0c\u56e0\u4e3a\u6309Y\u5c31\u5f00\u59cb\u81ea\u52a8\u5b89\u88c5\uff0c2\u5206\u949f\u5c31\u88c5\u597d\u4e86\uff0c\u7ed3\u679c\u5c31\u5f00\u59cb\u201d\u95ee\u9898\u9891\u9891\u201c\u8fde\u4e00\u5c01\u90ae\u4ef6\u90fd\u6ca1\u6709\u6210\u529f\u7684\u53d1\u51fa\u53bb\u8fc7\u3002<\/p>\n\n\n\n<p>\u5de5\u7a0b\u5e08\u7684\u8bed\u8a00\u80fd\u529b\u662f\u6709\u9650\u7684\u7684\uff0c\u6240\u4ee5\u5217\u8868\u6765\u8868\u8fbe\u6b65\u9aa4\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\" id=\"install\"><li><a href=\"#1install\">\u5b89\u88c5Postfix<\/a><\/li><li><a href=\"#2config\">\u914d\u7f6ePostfix<\/a><\/li><li><a href=\"#3test\">\u6d4b\u8bd5SMTP Server<\/a><\/li><li><a href=\"#4fwd\">\u8f6c\u53d1\u7cfb\u7edf\u90ae\u4ef6system mail<\/a><\/li><\/ol>\n\n\n\n<p>\u5728\u4e00\u5207\u5f00\u59cb\u4e4b\u524d\uff0c\u4f60\u9700\u8981\u68c0\u67e5\u6587\u4e2d\u63d0\u5230\u7684\u57df\u6216\u8005\u5b50\u57df\u662f\u5426\u548c\u670d\u52a1\u5668\u7684\u540d\u5b57\u4e00\u81f4\u3002\u68c0\u67e5\u4f60\u670d\u52a1\u5668\u7684\u540d\u5b57\u5f88\u7b80\u5355\uff1a\u8f93\u5165hostname\u7136\u540e\u56de\u8f66\u5c31\u80fd\u770b\u5230\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">pi@raspberrypi:~ $ hostname\nraspberrypi #\u8fd9\u91cc\u5c31\u662f\u4f60\u7684hostname\uff1araspberrypi\npi@raspberrypi:~ $ <\/pre>\n\n\n\n<p><p id=\"1install\">\u7b2c\u4e00\u6b65\uff1a\u5b89\u88c5Postfix<\/p><\/p>\n\n\n\n<p>\u5b89\u88c5Postfix\u5c31\u662f\u5b89\u88c5mailutils,\u5728\u5b89\u88c5\u4e4b\u524d\u6700\u597d\u662f\u66f4\u65b0\u4e00\u4e0b\uff0c\u4ee5\u4fbf\u7cfb\u7edf\u4fdd\u6301\u6700\u65b0\u7684\u8f6f\u4ef6\u4e0b\u8f7d\u66f4\u65b0\u7ed3\u70b9\uff0c\u6307\u4ee4\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt-get update\nsudo apt install mailutils<\/pre>\n\n\n\n<p>\u4e2d\u95f4\u4f1a\u63d0\u793a\u662f\u5426\u6267\u884c\u5b89\u88c5Y\/N\uff1f\u8f93\u5165Y\u540e\u56de\u8f66\uff0c\u5b89\u88c5\u4f1a\u7ee7\u7eed\u6267\u884c\uff0c\u5728\u63a5\u8fd1\u5c3e\u58f0\u65f6\u7cfb\u7edf\u4f1a\u8df3\u51fa\u4e00\u4e2a\u53ef\u89c6\u5316\u7684\u754c\u9762\uff0c\u8fd9\u4e2a\u754c\u9762\u5c31\u662f\u6307\u5bfc\u914d\u7f6ePostfix\u7684.\u5982\u679c\u7b49\u5f85\u4e2d\u4f60\u65e0\u804a\u6216\u8005\u6025\u5207\u5730\u6309\u4e86\u51e0\u6b21\u56de\u8f66\uff0c\u90a3\u4e48\u606d\u559c\u4f60\uff0c\u4f60\u4f1a\u8df3\u8fc7Postfix\u7684\u914d\u7f6e\u754c\u9762\uff0c\u76f4\u63a5\u4ee5\u9ed8\u8ba4\u7684\u914d\u7f6e\u5b89\u88c5\u76f4\u5230\u7ed3\u675f\u3002\u4f46\u8bf4\u6765\u4e5f\u5947\u602a\u7684\u662f\u6211\u5c31\u7b97\u7b2c\u4e8c\u6b21\u5b89\u88c5\uff0c\u4e5f\u8fd8\u662f\u6f0f\u8fc7\u8fd9\u4e2a\u754c\u9762\u3002\u3002\u3002\u518d\u6b21\u770b\u5230\u65f6\uff0c\u6728\u5df2\u6210\u821f\u3002\u4e0d\u8fc7\u5462\uff0c\u6709\u529e\u6cd5\u518d\u6b21\u6253\u5f00\u8fd9\u4e2a\u754c\u9762\uff0c\u90a3\u5c31\u662fre-configuration,\u901a\u8fc7reconfig\u5c31\u80fd\u6253\u5f00\u754c\u9762\uff0c\u68c0\u6d4b\u6211\u7684hostname\u548c\u57df\u662f\u4e0d\u662f\u4e00\u6837\u7684,\u8fd9\u91cc\u9700\u8981\u63d0\u4e00\u4e0b\u7684\u662f\uff1a\u8be5\u540d\u5b57\u662f\u6839\u90ae\u4ef6\u7684\u201d\u57df\u201c\u540d\u5b57\uff0c\u5982\u679c\u6839\u90ae\u4ef6\u662fsoo@example.org\uff0c\u90a3\u4e48\u6b63\u786e\u7684\u201dmail name\u201c\u5c31\u662fexample.org\u3002\u800c\u8fd9\u91cc\u6211\u8fd8\u662f\u4e0d\u660e\u767d\u5b83\u4f1a\u5f71\u54cd\u5230\u6211\u540e\u7eed\u7684\u90ae\u4ef6\u8bbe\u7f6e\u5417\uff1f<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo dpkg-reconfigure postfix #\u89e3\u6551\u529e\u6cd5\uff0c\u5475\u5475\uff01<\/pre>\n\n\n\n<p>hostname<img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"402\" class=\"wp-image-2531\" style=\"width: 800px;\" src=\"https:\/\/blog.zengqq.com.cn\/wp-content\/uploads\/2022\/03\/\u622a\u5c4f2022-03-13-\u4e0b\u53482.44.04.png\" alt=\"systemmailname\" srcset=\"https:\/\/blog.zengqq.com.cn\/wp-content\/uploads\/2022\/03\/\u622a\u5c4f2022-03-13-\u4e0b\u53482.44.04.png 2378w, https:\/\/blog.zengqq.com.cn\/wp-content\/uploads\/2022\/03\/\u622a\u5c4f2022-03-13-\u4e0b\u53482.44.04-480x241.png 480w, https:\/\/blog.zengqq.com.cn\/wp-content\/uploads\/2022\/03\/\u622a\u5c4f2022-03-13-\u4e0b\u53482.44.04-1024x514.png 1024w, https:\/\/blog.zengqq.com.cn\/wp-content\/uploads\/2022\/03\/\u622a\u5c4f2022-03-13-\u4e0b\u53482.44.04-768x386.png 768w, https:\/\/blog.zengqq.com.cn\/wp-content\/uploads\/2022\/03\/\u622a\u5c4f2022-03-13-\u4e0b\u53482.44.04-1536x771.png 1536w, https:\/\/blog.zengqq.com.cn\/wp-content\/uploads\/2022\/03\/\u622a\u5c4f2022-03-13-\u4e0b\u53482.44.04-2048x1028.png 2048w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/p>\n\n\n\n<p>\u4fee\u6539\u5b8c\u540e\u4f1a\u6267\u884c\u66f4\u6539<img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"403\" class=\"wp-image-2532\" style=\"width: 800px;\" src=\"https:\/\/blog.zengqq.com.cn\/wp-content\/uploads\/2022\/03\/\u622a\u5c4f2022-03-13-\u4e0b\u53483.09.05.png\" alt=\"reconfigdone\" srcset=\"https:\/\/blog.zengqq.com.cn\/wp-content\/uploads\/2022\/03\/\u622a\u5c4f2022-03-13-\u4e0b\u53483.09.05.png 1580w, https:\/\/blog.zengqq.com.cn\/wp-content\/uploads\/2022\/03\/\u622a\u5c4f2022-03-13-\u4e0b\u53483.09.05-480x242.png 480w, https:\/\/blog.zengqq.com.cn\/wp-content\/uploads\/2022\/03\/\u622a\u5c4f2022-03-13-\u4e0b\u53483.09.05-1024x516.png 1024w, https:\/\/blog.zengqq.com.cn\/wp-content\/uploads\/2022\/03\/\u622a\u5c4f2022-03-13-\u4e0b\u53483.09.05-768x387.png 768w, https:\/\/blog.zengqq.com.cn\/wp-content\/uploads\/2022\/03\/\u622a\u5c4f2022-03-13-\u4e0b\u53483.09.05-1536x774.png 1536w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/p>\n\n\n\n<p><p id=\"2config\">\u7b2c\u4e8c\u6b65\uff1a\u914d\u7f6ePostfix<\/p><\/p>\n\n\n\n<p>\u63a5\u4e0b\u6765\u6765\u914d\u7f6ePostfix\uff0c\u8fd9\u91cc\u7531\u4e8e\u8981\u6c42\u662f\u201d\u53ea\u53d1\u90ae\u4ef6\u201d\uff0c\u6240\u4ee5\u90ae\u4ef6\u53ea\u9700\u5904\u7406\u5f53\u524dlocalhost\u7684\u8981\u6c42\uff0c\u7136\u540e\u53d1\u51fa\u90ae\u4ef6\u5c31\u884c\u3002\u4e3a\u4e86\u5b9e\u73b0\u8fd9\u4e2a\u5355\u5411\u7684\u5de5\u4f5c\uff0cPostfix\u53ea\u9700\u5229\u7528\u670d\u52a1\u5668\u865a\u62df\u7f51\u7edc\u4e2d\u7684\u5185\u90e8\u901a\u8baf\u53bb\u76d1\u542c\u5185\u90e8\u56de\u4f20loopback interface\u3002\u6240\u4ee5\u4fee\u6539\/etc\/postfix\/main.cf\u7684\u914d\u7f6e\u4ee5\u9002\u914d\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo vim \/etc\/postfix\/main.cf\n---------------------------------\n# \u627e\u5230inet_interfaces = all\n. . .\nmailbox_size_limit = 0\nrecipient_delimiter = +\ninet_interfaces = all\n. . .\n#\u5c06 all \u6539\u6210 backloop-only\n. . .\nmailbox_size_limit = 0\nrecipient_delimiter = +\ninet_interfaces = backloop-only\n. . .\n# \u627e\u5230mydestination\u5e76\u4fee\u6539\u6210\u5230\u57df\u540d\u7684\u914d\u7f6e\n. . .\nmydestination = $myhostname, example.com, localhost.com, , localhost\n. . .\n# \u628a\u9ed8\u8ba4\u7684\u540e\u9762\u4ee8\u6539\u6210\u4f60\u81ea\u5df1\u7684\u57df\u540d\uff0c\u641e\u4e0d\u61c2\u5c31\u4e0d\u6539\n. . .\nmydestination = $myhostname, localhost.$mydomain, $mydomain\n. . .\n# \u4fee\u6539\u5b8c\u540e\uff0c\u91cd\u542f\u4e00\u4e0bPostfix\u670d\u52a1\nsudo systemctl restart postfix<\/pre>\n\n\n\n<p><p id=\"3test\">\u7b2c\u4e09\u90e8\uff1a\u6d4b\u8bd5<\/p><\/p>\n\n\n\n<p>\u5728\u8fd9\u91cc\u4e3a\u4e86\u6d4b\u8bd5\u90ae\u4ef6\u7684\u53d1\u9001\u529f\u80fd\uff0c \u6211\u6267\u884c\u4e86\u4e00\u4e2a\u6307\u4ee4<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">echo \"This is only the body of the email\" | mail -s \"This is the subject line\" my@gmail.com #\u6211\u81ea\u7528\u7684gmail\u4e3a\u4e86\u4f7f\u7528API\u5728\u4e24\u5e74\u524d\u964d\u4f4e\u4e86\u5b89\u5168\u7ea7\u522b\u6240\u4ee5\u80fd\u63a5\u53d7\u672a\u88ab\u8ba4\u8bc1\u7684SMTP\u90ae\u4ef6<\/pre>\n\n\n\n<p>\u5728\u7b2c\u4e00\u6b21\u6d4b\u8bd5\u65f6\uff0c\u6211\u6210\u529f\u7684\u6536\u5230\u4e86\u90ae\u4ef6\uff0c\u800c\u7b2c\u4e8c\u5c01\u53d1\u9001\u7ed9outlook\u7684\u5931\u8d25\u4e86\uff0c\u63a5\u4e0b\u6765\u6240\u6709\u7684\u53d1\u9001\u90fd\u5931\u8d25\u4e86\uff0c\u65e0\u8bbagmail\u8fd8\u662foutlook\u90fd\u662f\u5982\u6b64\u3002\u5728var\/mail\/pi\u4e2d\u6211\u770b\u5230\u4e86\u4e00\u53e5\u8bdd,\u5b83\u6307\u51faIPv6\u7684\u8ba4\u8bc1\u51fa\u73b0\u95ee\u9898\uff0c\u8fd9\u4e2a\u975e\u56fa\u5b9a\u7684IPv6\u5730\u5740\u88abgmail\u8ba4\u5b9a\u4e3a\u7fa4\u53d1\u90ae\u4ef6\u7684\u6e90\u5934\uff0c\u5728\u672a\u7ecfDNS\u53cd\u5411\u89e3\u6790\u7684\u60c5\u51b5\u4e0b\uff0c\u975e\u56fa\u5b9aIP\u5730\u5740\u5c31\u88ab\u8fd9\u6837\u6740\u6b7b\u4e86\u3002\u6240\u4ee5\u6211\u56de\u5230reconfig\u91cc\u9762\u628a\u90ae\u4ef6\u6307\u5b9a\u4e3aIP4\u53d1\u9001\u3002\u7136\u540e\u91cd\u542fPostfix\u670d\u52a1\uff0c\u4e09\u6b21\u53d1\u9001\u7ed9gmail\u90fd\u6210\u529f,\u4f46\u662foutlook\u8fd8\u662f\u4e0d\u884c\u3002\u521a\u521a\u67e5\u770b\u4e86\u9000\u4ef6\uff0c\u53d1\u73b0outlook\u662f\u5728PBL\u4e0a\u53d1\u73b0\u4e86\u6211\u7684IP\uff0c\u4e3a\u4ec0\u4e48\u5462\uff1f\u56e0\u4e3a\u6211\u7684SMTP\u90ae\u4ef6\u662f\u5728\u672a\u7ecf\u8ba4\u8bc1\u7684\u60c5\u51b5\u4e0b\u53d1\u51fa\u7684\uff0c\u8fd9\u4e5f\u5c31\u662f\u4e3a\u4ec0\u4e48\u6211\u7684\u90ae\u4ef6\u5c31\u7b97\u6536\u5230\u4e86\u4e5f\u662f\u5728\u5783\u573e\u7bb1\u91cc\u3002\u8fd9\u91cc\u5217\u51fa\u4e24\u4e2a\u5751\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u6d4b\u8bd5\u7528\u7684\u6536\u4ef6\u7bb1\u5b89\u5168\u7ea7\u522b\u4e0d\u8981\u592a\u9ad8<\/li><li>\u6d4b\u8bd5\u53d1\u9001\u90ae\u4ef6\u907f\u514d\u4f7f\u7528IPv6<\/li><li>\u5982\u679c\u53ef\u4ee5\u4e0d\u8981\u518d\u7b2c\u4e00\u6b21\u5c31\u4f7f\u7528\u5b89\u5168\u7ea7\u522b\u9ad8\u7684\u90ae\u7bb1\u6765\u6d4b\u8bd5\uff0c\u8fd9\u4f1a\u81ea\u66ddIP\u7ed9\u5168\u4e16\u754c\uff0c\u5c01\u5835\u4f60\u7684IP\u5730\u5740<\/li><li>\u5728\u4f60\u7684IP\u88ab\u5149\u8363\u66dd\u5149\u540e\uff0c\u81ea\u5df1\u53bb\u64e6\u5c41\u80a1remove\u4f60\u7684IP\uff08\u65e0\u5984\u4e4b\u707e\u554a\uff01\uff09<ul><li>curl ipinfo.io\/ip\u67e5\u770b\u81ea\u5df1\u7684IP<\/li><li>\u8fdb\u5165<a rel=\"noreferrer noopener\" href=\"http:\/\/www.spamhaus.org\/lookup.lasso\" target=\"_blank\">\u81ea\u52a9\u79fb\u9664\u4e2d\u5fc3<\/a>\uff0c\u79fb\u9664\u81ea\u5df1\u7684IPv4\u5730\u5740<\/li><li><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"656\" class=\"wp-image-2535\" style=\"width: 800px;\" src=\"https:\/\/blog.zengqq.com.cn\/wp-content\/uploads\/2022\/03\/\u622a\u5c4f2022-03-13-\u4e0b\u53484.46.00.png\" alt=\"RemoveIP\" srcset=\"https:\/\/blog.zengqq.com.cn\/wp-content\/uploads\/2022\/03\/\u622a\u5c4f2022-03-13-\u4e0b\u53484.46.00.png 1330w, https:\/\/blog.zengqq.com.cn\/wp-content\/uploads\/2022\/03\/\u622a\u5c4f2022-03-13-\u4e0b\u53484.46.00-480x393.png 480w, https:\/\/blog.zengqq.com.cn\/wp-content\/uploads\/2022\/03\/\u622a\u5c4f2022-03-13-\u4e0b\u53484.46.00-1024x839.png 1024w, https:\/\/blog.zengqq.com.cn\/wp-content\/uploads\/2022\/03\/\u622a\u5c4f2022-03-13-\u4e0b\u53484.46.00-768x629.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/li><\/ul><\/li><\/ul>\n\n\n\n<p><p id=\"4fwd\">\u7b2c\u56db\u90e8\uff1a\u8f6c\u53d1\u7cfb\u7edf\u90ae\u4ef6<\/p><\/p>\n\n\n\n<p>\u5728\u8fd9\u5217\u5176\u5b9e\u4e0d\u662f\u5f88\u91cd\u8981\uff0c\u56e0\u4e3a\u8f6c\u53d1\u7cfb\u7edf\u90ae\u4ef6\u7ed9\u81ea\u5df1\u7684\u5916\u90e8\u90ae\u7bb1\u4e5f\u4f1a\u9047\u5230outlook\u53cd\u6c34\u7ed9SPAMHUAS\u7684\u4e8b\u60c5\uff0c\u4e00\u65e6\u88ab\u8ba4\u5b9a\u4e3aspam\u90ae\u4ef6\uff0c\u5c3c\u739b\uff0c\u8fd9\u5c31\u662f\u5f88\u5c34\u5c2c\u7684\u4e8b\u4e86\u3002<\/p>\n\n\n\n<p>\u7f16\u8f91\u5916\u90e8\u7528\u6237<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo nano \/etc\/aliases #\u627e\u5230postmater: root\n------------------------------\n# \/etc\/aliases\nmailer-daemon: postmaster\npostmaster: root\n------------------------------\n# \/etc\/aliases\nmailer-daemon: postmaster\npostmaster: root\nroot: my@gmail.com #\u589e\u52a0\u8fd9\u4e2a\n------------------------------\n# \u91cd\u542f\u5237\u65b0\nsudo newaliases\n#\u53d1\u4e2a\u7ed9root\u7684\u90ae\u4ef6\u8bd5\u8bd5\necho \"This is the body of the email\" | mail -s \"This is the subject line\" root #\u770b\u770b\u5783\u573e\u7bb1\u5427<\/pre>\n\n\n\n<p>\u81f3\u6b64\uff0c\u5b89\u88c5\u548c\u914d\u7f6ePostfix\u5c31\u6210\u529f\u4e86\uff0c\u4f46\u662f\u8fd9\u53ea\u662f\u4e00\u4e2a\u5f00\u59cb\uff0c\u56e0\u4e3a\u8fd9\u4ec5\u9650\u4e8e\u5229\u7528gmail\uff0c\u800coutlook\u8fd8\u4e0d\u80fd\u63a5\u53d7\u90ae\u4ef6\uff0c\u8981\u77e5\u9053\u56fd\u5185\u662f\u6ca1\u6cd5\u63a5\u53d7gmail\u7684\uff0c\u800c\u6211\u6700\u7ec8\u7684\u76ee\u7684\u662f\u66f4\u65b0\u6700\u8fd1\u7684IPv4\u5730\u5740\u4ee5\u4fbf\u8fdc\u7a0b\u767b\u5f55\u7ba1\u7406\u670d\u52a1\u5668\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u76f4\u4ee5\u6765\u5bf9linux\u7684\u5e95\u5c42\u53d1\u9001\u673a\u5236\u4e00\u77e5\u534a\u89e3\uff0c\u6240\u4ee5\u6240 [&#8230;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[357,253,249],"tags":[1156,1154,1155,1153,1151,1150,1152],"class_list":["post-2527","post","type-post","status-publish","format-standard","hentry","category-zero2hero","category-fun","category-technology","tag-cli","tag-echo","tag-mail","tag-mailutils","tag-postfix","tag-smtp","tag-ssmtp"],"_links":{"self":[{"href":"https:\/\/blog.zengqq.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/2527","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.zengqq.com.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.zengqq.com.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.zengqq.com.cn\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.zengqq.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2527"}],"version-history":[{"count":8,"href":"https:\/\/blog.zengqq.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/2527\/revisions"}],"predecessor-version":[{"id":2555,"href":"https:\/\/blog.zengqq.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/2527\/revisions\/2555"}],"wp:attachment":[{"href":"https:\/\/blog.zengqq.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2527"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.zengqq.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2527"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.zengqq.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2527"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}