﻿{"id":1324,"date":"2015-06-10T17:28:25","date_gmt":"2015-06-10T09:28:25","guid":{"rendered":"http:\/\/nick.txtcc.com\/?p=1324"},"modified":"2016-01-04T17:33:52","modified_gmt":"2016-01-04T09:33:52","slug":"postfix-smtp%e6%9c%8d%e5%8a%a1%e9%85%8d%e7%bd%ae","status":"publish","type":"post","link":"https:\/\/nick.txtcc.com\/index.php\/linux\/1324","title":{"rendered":"postfix smtp\u670d\u52a1\u914d\u7f6e"},"content":{"rendered":"<pre lang=\"bash\" line=\"1\" escaped=\"true\"># See \/usr\/share\/postfix\/main.cf.dist for a commented, more complete version\n\n# Debian specific:\u00a0 Specifying a file name will cause the first\n\n# line of that file to be used as the name.\u00a0 The Debian default\n\n# is \/etc\/mailname.\n\n#myorigin = \/etc\/mailname\n\n#smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)\n\nsmtpd_banner = $myhostname ESMTP Server.\n\nbiff = no\n\n# appending .domain is the MUA's job.\n\nappend_dot_mydomain = no\n\n# Uncomment the next line to generate \"delayed mail\" warnings\n\n#delay_warning_time = 4h\n\nreadme_directory = no\n\n# TLS parameters\n\nsmtpd_tls_cert_file=\/etc\/ssl\/certs\/ssl-cert-snakeoil.pem\n\nsmtpd_tls_key_file=\/etc\/ssl\/private\/ssl-cert-snakeoil.key\n\nsmtpd_use_tls=yes\n\nsmtpd_tls_session_cache_database = btree:${data_directory}\/smtpd_scache\n\nsmtp_tls_session_cache_database = btree:${data_directory}\/smtp_scache\n\nsmtpd_client_restrictions = check_client_access hash:\/etc\/postfix\/client_checks,reject\n\n# See \/usr\/share\/doc\/postfix\/TLS_README.gz in the postfix-doc package for\n\n# information on enabling SSL in the smtp client.\n\nmyhostname = nick-ubuntu-server\n\nalias_maps = hash:\/etc\/aliases\n\nalias_database = hash:\/etc\/aliases\n\n#mydestination\u53c2\u6570\u975e\u5e38\u91cd\u8981\uff0c\u56e0\u4e3a\u53ea\u6709\u5f53\u53d1\u6765\u7684\u90ae\u4ef6\u7684\u6536\u4ef6\u4eba\u5730\u5740\u4e0e\u8be5\u53c2\u6570\u503c\u76f8\u5339\u914d\u65f6\uff0cPostfix\u624d\u4f1a\u5c06\u8be5\u90ae\u4ef6\u63a5\u6536\u4e0b\u6765\u3002\u901a\u8fc7\u8be5\u9009\u9879\u7684\u8bbe\u7f6e\u53ef\u4ee5\u8fc7\u6ee4\u6389\u8bb8\u591a\u6ca1\u6709\u7ecf\u8fc7\u8ba4\u8bc1\u548c\u6388\u6743\u7684\u90ae\u4ef6\uff0c\u4ece\u800c\u8282\u7701\u670d\u52a1\u5668\u7684\u5b58\u50a8\u7a7a\u95f4\uff0c\u4ee5\u53ca\u8282\u7701\u7528\u6237\u7684\u90ae\u4ef6\u5904\u7406\u65f6\u95f4\u3002\nmydestination = nick-ubuntu-server, localhost.localdomain, youdomain.com\n\nrelayhost = localhost\nrelay_domains = nick.txtcc.com\n\nmynetworks = 127.0.0.0\/8 [::ffff:127.0.0.0]\/104 [::1]\/128 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all inet_protocols = all home_mailbox = Mailbox<\/pre>\n<pre lang=\"php\" line=\"1\" escaped=\"true\">cat \/etc\/postfix\/client_checks\n127.0.0.1 OK\n<\/pre>\n<pre lang=\"php\" line=\"1\" escaped=\"true\">postmap \/etc\/postfix\/client_checks && \/etc\/init.d\/postfix restart\n<\/pre>","protected":false},"excerpt":{"rendered":"<h1>See \/usr\/share\/postfix\/main.cf.dist for a commented, more complete version # Debian specific:\u00a0 Spe&#46;&#46;&#46;<\/h1>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[418,417,414],"class_list":["post-1324","post","type-post","status-publish","format-standard","hentry","category-linux","tag-config","tag-postfix","tag-smtp"],"_links":{"self":[{"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/1324","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/comments?post=1324"}],"version-history":[{"count":8,"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/1324\/revisions"}],"predecessor-version":[{"id":1326,"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/1324\/revisions\/1326"}],"wp:attachment":[{"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/media?parent=1324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/categories?post=1324"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/tags?post=1324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}