{"id":482,"date":"2014-07-12T18:13:49","date_gmt":"2014-07-12T10:13:49","guid":{"rendered":"http:\/\/www.ipcpu.com\/?p=482"},"modified":"2014-07-12T18:13:49","modified_gmt":"2014-07-12T10:13:49","slug":"mail-relay","status":"publish","type":"post","link":"https:\/\/c.ipcpu.com\/2014\/07\/mail-relay\/","title":{"rendered":"\u8bbe\u7f6esendmail\u548cpostfix\u7684relay\u4e3b\u673a"},"content":{"rendered":"

\u8bbe\u7f6esendmail\u548cpostfix\u7684relay\u4e3b\u673a<\/p>\n

\u6982\u8ff0<\/h2>\n

\u90ae\u4ef6\u7684relay\u4e3b\u673a\uff0c\u5c31\u662f\u90ae\u4ef6\u53d1\u9001\u7684\u4e2d\u7ee7\u3002<\/p>\n

\u4e00\u822c\u4e0b\u5217\u60c5\u51b5\u4f1a\u9047\u5230\uff1a<\/p>\n

\n

\u6211\u7684\u670d\u52a1\u5668\u6ca1\u6709\u516c\u7f51IP\uff0c\u6240\u4ee5\u9700\u8981\u8bbe\u7f6e\u5185\u5916\u7684relay\u4e3b\u673a\uff0c\u5e2e\u6211\u53d1\u9001
\n \u6211\u7684\u670d\u52a1\u5668IP\u5730\u5740\u6ca1\u6709\u7ecf\u8fc7\u8ba4\u8bc1\uff0c\u8001\u8fdb\u9ed1\u540d\u5355\uff0c\u9700\u8981\u627erelay\u4e3b\u673a\u53d1\u9001\uff0c\u51cf\u5c11\u5931\u8d25\u6982\u7387
\n \u6bcf\u4e2a\u673a\u5668\u90fd\u4e2a\u53d1\u4e2a\u7684\uff0c\u4e00\u65e6\u4fee\u6539\u4e2a\u4e1c\u897f\u5f88\u9ebb\u70e6\uff0c\u9700\u8981\u96c6\u4e2d\uff0c\u4f7f\u7528\u4e00\u53f0relay\u7edf\u4e00\u53d1\u9001<\/p>\n<\/blockquote>\n

sendmail<\/h2>\n
  1. \/etc\/<\/span>mail<\/span>\/<\/span>submit<\/span>.<\/span>cf<\/span><\/code><\/li>
  2. #D{MTAHost}[127.0.0.1]<\/span><\/code><\/li>
  3. D<\/span>{<\/span>MTAHost<\/span>}[<\/span>10.11<\/span>.<\/span>154.42<\/span>]<\/span><\/code><\/li><\/ol><\/pre>\n

    postfix<\/h2>\n
    1. cat <\/span>\/<\/span>etc<\/span>\/<\/span>postfix<\/span>\/<\/span>main<\/span>.<\/span>cf<\/span><\/code><\/li>
    2. #relayhost = [an.ip.add.ress]<\/span><\/code><\/li>
    3. relayhost <\/span>=<\/span> <\/span>10.11<\/span>.<\/span>154.42<\/span><\/code><\/li><\/ol><\/pre>\n

      \u8f6c\u8f7d\u8bf7\u6ce8\u660e\uff1aIPCPU-\u7f51\u7edc\u4e4b\u8def<\/a> » \u8bbe\u7f6esendmail\u548cpostfix\u7684relay\u4e3b\u673a<\/a><\/p>","protected":false},"excerpt":{"rendered":"

      \u8bbe\u7f6esendmail\u548cpostfix\u7684relay\u4e3b\u673a \u6982\u8ff0 \u90ae\u4ef6\u7684relay\u4e3b\u673a\uff0c\u5c31\u662f\u90ae\u4ef6\u53d1\u9001\u7684\u4e2d\u7ee7\u3002 \u4e00\u822c\u4e0b\u5217\u60c5\u51b5\u4f1a\u9047\u5230\uff1a \u6211\u7684\u670d\u52a1\u5668\u6ca1\u6709\u516c\u7f51IP\uff0c\u6240\u4ee5\u9700\u8981\u8bbe\u7f6e\u5185\u5916\u7684relay\u4e3b\u673a\uff0c\u5e2e\u6211\u53d1\u9001 \u6211\u7684\u670d\u52a1\u5668IP\u5730\u5740\u6ca1\u6709\u7ecf\u8fc7\u8ba4\u8bc1\uff0c\u8001\u8fdb\u9ed1\u540d\u5355\uff0c\u9700\u8981\u627erelay\u4e3b\u673a\u53d1\u9001\uff0c\u51cf\u5c11\u5931\u8d25\u6982\u7387 \u6bcf\u4e2a\u673a\u5668\u90fd\u4e2a\u53d1\u4e2a\u7684\uff0c\u4e00\u65e6\u4fee\u6539\u4e2a\u4e1c\u897f\u5f88\u9ebb\u70e6\uff0c\u9700\u8981\u96c6\u4e2d\uff0c\u4f7f\u7528\u4e00\u53f0relay\u7edf\u4e00\u53d1\u9001 sendmail \/etc\/mail\/submit.cf#D{MTAHost}[127.0.0.1]D{MTAHost}[10.11.154.42] postfix cat \/etc\/postfix\/main.cf#relayhost = [an.ip.add.ress]relayhost = 10.11.154.42 \u8f6c\u8f7d\u8bf7\u6ce8\u660e\uff1aIPCPU-\u7f51\u7edc\u4e4b\u8def » \u8bbe\u7f6esendmail\u548cpostfix\u7684relay\u4e3b\u673a<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[13],"tags":[17,51,52],"_links":{"self":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/posts\/482"}],"collection":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/comments?post=482"}],"version-history":[{"count":0,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/posts\/482\/revisions"}],"wp:attachment":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/media?parent=482"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/categories?post=482"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/tags?post=482"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}