{"id":1723,"date":"2010-04-06T11:45:14","date_gmt":"2010-04-06T11:45:14","guid":{"rendered":"http:\/\/www.icocean.com\/blog\/?p=1723"},"modified":"1970-01-01T07:00:00","modified_gmt":"1970-01-01T07:00:00","slug":"postfix%3A%E5%8F%91%E4%BF%A1%E5%9F%9F%E5%90%8D%E5%92%8C%E5%85%81%E8%AE%B8%E6%94%B6%E4%BF%A1%E7%9A%84%E5%9F%9F%E5%90%8D","status":"publish","type":"post","link":"https:\/\/www.icocean.com\/blog\/?p=1723","title":{"rendered":"Postfix:\u53d1\u4fe1\u57df\u540d\u548c\u5141\u8bb8\u6536\u4fe1\u7684\u57df\u540d"},"content":{"rendered":"<p>What domain name to use in outbound mail<\/p>\n<p>The myorigin parameter specifies the domain that appears in mail that is posted on this machine. The default is to use the local machine name, $myhostname, which defaults to the name of the machine. Unless you are running a really small site, you probably want to change that into $mydomain, which defaults to the parent domain of the machine name.<\/p>\n<p>For the sake of consistency between sender and recipient addresses, myorigin also specifies the domain name that is appended to an unqualified recipient address.<\/p>\n<p>Examples (specify only one of the following):<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;\/etc\/postfix\/main.cf:<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;myorigin = $myhostname (default: send mail as &#8220;user@$myhostname&#8221;)<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;myorigin = $mydomain&nbsp;&nbsp; (probably desirable: &#8220;user@$mydomain&#8221;)<\/p>\n<p>What domains to receive mail for<\/p>\n<p>The mydestination parameter specifies what domains this machine will deliver locally, instead of forwarding to another machine. The default is to receive mail for the machine itself. <!--more-->See the VIRTUAL_README file for how to configure Postfix for hosted domains.<\/p>\n<p>You can specify zero or more domain names, &#8220;\/file\/name&#8221; patterns and\/or &#8220;type:table&#8221; lookup tables (such as hash:, btree:, nis:, ldap:, or mysql:), separated by whitespace and\/or commas. A &#8220;\/file\/name&#8221; pattern is replaced by its contents; &#8220;type:table&#8221; requests that a table lookup is done and merely tests for existence: the lookup result is ignored.<\/p>\n<p>IMPORTANT: If your machine is a mail server for its entire domain, you must list $mydomain as well.<\/p>\n<p>Example 1: default setting.<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;\/etc\/postfix\/main.cf:<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mydestination = $myhostname localhost.$mydomain localhost<\/p>\n<p>Example 2: domain-wide mail server.<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;\/etc\/postfix\/main.cf:<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mydestination = $myhostname localhost.$mydomain localhost $mydomain<\/p>\n<p>Example 3: host with multiple DNS A records.<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;\/etc\/postfix\/main.cf:<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mydestination = $myhostname localhost.$mydomain localhost <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;www.$mydomain ftp.$mydomain<\/p>\n<p>Caution: in order to avoid mail delivery loops, you must list all hostnames of the machine, including $myhostname, and localhost.$mydomain. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>What domain name to use in outbound mail The myorigin p <a href='https:\/\/www.icocean.com\/blog\/?p=1723' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31],"tags":[2635,2634,2607,2632,2633],"class_list":["post-1723","post","type-post","status-publish","format-standard","hentry","category-email","tag-mydestination","tag-myorigin","tag-postfix","tag-2632","tag-2633","category-31-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1723","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1723"}],"version-history":[{"count":0,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1723\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1723"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1723"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1723"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}