{"id":303578,"date":"2021-01-16T18:46:24","date_gmt":"2021-01-16T10:46:24","guid":{"rendered":"http:\/\/4563.org\/?p=303578"},"modified":"2021-01-16T18:46:24","modified_gmt":"2021-01-16T10:46:24","slug":"%e6%9c%89%e5%8f%8d%e4%bb%a3-gmail-%e7%9a%84-imap-%e5%92%8c-smtp-%e6%9c%8d%e5%8a%a1%e5%99%a8%e7%9a%84%e8%b7%af%e5%ad%90%e5%90%97%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=303578","title":{"rendered":"\u6709\u53cd\u4ee3 Gmail \u7684 IMAP \u548c SMTP \u670d\u52a1\u5668\u7684\u8def\u5b50\u5417\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u6709\u53cd\u4ee3 Gmail \u7684 IMAP \u548c SMTP \u670d\u52a1\u5668\u7684\u8def\u5b50\u5417\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Patrick95 <\/span>  <span><i><\/i> 8<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u5148\u540e\u8bd5\u4e86 SNIProxy \u548c xinetd\uff0c\u90fd\u6ca1\u6210\u529f\uff0c\u4e0d\u77e5\u9053\u662f\u4e0d\u662f\u64cd\u4f5c\u6709\u95ee\u9898\u3002<\/p>\n<p>\u4e0a\u9762\u8fd9\u4e24\u79cd\u65b9\u6848\u90fd\u9700\u8981\u672c\u5730\u6539 hosts\uff0c\u5c06 imap.gmail.com \u548c smtp.gmail.com \u7684\u8bf7\u6c42\u6253\u5230\u53cd\u4ee3\u7684\u673a\u5668\u4e0a\u3002<\/p>\n<p>\u6709\u6210\u529f\u7684\u5927\u4f6c\u8bf4\u8bf4\u65b9\u6848\u5417\uff1f<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>8<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"4981958\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : lutian <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e4b\u524d\u5728 AWS \u7528 iptables \u5b9e\u73b0\u8fc7<\/p>\n<p>smtp=`dig +short smtp.gmail.com |tail -1`<br \/>pop=`dig +short pop.gmail.com |tail -1`<\/p>\n<p>local=`curl http:\/\/169.254.169.254\/latest\/meta-data\/local-ipv4`<br \/>public=`curl http:\/\/169.254.169.254\/latest\/meta-data\/public-ipv4`<\/p>\n<p>iptables -t nat -F<\/p>\n<p>iptables -t nat -A PREROUTING -p tcp &#8211;dport 995 -j DNAT &#8211;to-destination ${pop}:995<br \/>iptables -t nat -A POSTROUTING -p tcp -d ${pop} &#8211;dport 995 -j SNAT &#8211;to-source ${local}<br \/>iptables -t nat -A PREROUTING -p tcp &#8211;dport 465 -j DNAT &#8211;to-destination ${smtp}:465<br \/>iptables -t nat -A POSTROUTING -p tcp -d ${smtp} &#8211;dport 465 -j SNAT &#8211;to-source ${local}                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4981959\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : love <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u4ee5\u524d\u4e00\u76f4\u7528\u6539 android \u673a hosts+\u5728 VPS \u4e0a\u7528 netcat \u600e\u4e48\u64cd\u4f5c\u4e00\u4e0b\u6536\u53d1 gmail \u7684\uff0c\u5177\u4f53\u64cd\u4f5c\u5fd8\u4e86\uff0c\u53ea\u8bb0\u5f97\u53ea\u7528\u6539 hosts+netcat \u8fd9\u4e8c\u6837\u5c31\u53ef\u4ee5\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4981960\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Showfom <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             haproxy \u76f4\u63a5\u8f6c\u53d1 tcp \u7aef\u53e3\u561b                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4981961\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : Patrick95 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @lutian #1 \u611f\u8c22\uff0c\u665a\u4e0a\u56de\u5bb6\u8bd5\u8bd5\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4981962\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : Patrick95 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @love #2 \u8c22\u8c22\uff0c\u5e94\u8be5\u4e5f\u662f\u8f6c\u53d1\u7aef\u53e3\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4981963\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : Patrick95 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Showfom #3 \u597d\u4e45\u4e0d\u89c1\u554a\uff0c\u7528 haproxy \u8f6c\u53d1\u7aef\u53e3\u7684\u8bdd\uff0c\u662f imap \u548c smtp \u76f4\u63a5\u586b\u6211\u81ea\u5df1\u7684\u670d\u52a1\u5668\uff0c\u8fd8\u662f\u8bbe\u7f6e hosts \u6307\u5411\u6211\u7684\u670d\u52a1\u5668\u554a\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4981964\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Showfom <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Patrick95<\/p>\n<p>\u6216\u8005\u4e5f\u53ef\u4ee5\u7528 nginx \u7684 stream \u6a21\u5757<\/p>\n<p>https:\/\/docs.nginx.com\/nginx\/admin-guide\/load-balancer\/tcp-udp-load-balancer\/<\/p>\n<p>\u6700\u7b80\u5355\u80af\u5b9a\u662f 1 \u8bf4\u7684 iptables\uff0c\u65e0\u8111\u8f6c\u53d1\u6240\u6709\u8bf7\u6c42                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4981965\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : galenzhao <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             stunnel                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u6709\u53cd\u4ee3 Gmail \u7684 IMAP &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/303578"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=303578"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/303578\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=303578"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=303578"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=303578"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}