<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "解決Postfix被gmail退信問題：The IP you're using to send email is not authorized"]]></title>
		<link>https://forum.andowson.com/posts/list/16.page</link>
		<description><![CDATA[Latest messages posted in the topic "解決Postfix被gmail退信問題：The IP you're using to send email is not authorized"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>解決Postfix被gmail退信問題：The IP you&#39;re using to send email is not authorized</title>
				<description><![CDATA[ 最近發現從[url=http://www.andowson.com/posts/list/81.page]主機每天自動備份[/url]完成的通知信被gmail退了，錯誤訊息大致如下： 
<br>
[quote] host gmail-smtp-in.l.google.com[209.85.147.27] said: 
<br>
 550-5.7.1 [220.135.57.87] The IP you're using to send email is not 
<br>
 authorized 550-5.7.1 to send email directly to our servers. Please use 
<br>
 550 5.7.1 the SMTP relay at your service provider instead. j21si8542316wah 
<br>
 (in reply to end of DATA command)[/quote] 
<br>
由於之前postfix都還運作得好好的，故很難想出問題出在那裡，在Google找了一陣子，終於找到了一篇[url=http://plog.longwin.com.tw/my_note-app-setting/2007/07/06/google_apps_localhost_mail_problem_2007]轉換到 Google Apps, localhost 信寄不出去的解法[/url]，裡面提到修改/etc/postfix/mail.cf，把postfix預設的順序調整一下，例如原來我的設定是： 
<br>
[code]mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, 
<br>
 mail.$mydomain, www.$mydomain[/code] 
<br>
將它調整為localhost排最前面即可： 
<br>
[code]mydestination = localhost, localhost.$mydomain, $myhostname, $mydomain, 
<br>
 mail.$mydomain, www.$mydomain[/code] 
<br>
設定完成之後用 
<br>
postfix check 
<br>
指令檢查一下 
<br>
然後重新啟動 
<br>
service postfix restart 
<br>
再發信測試看看，哈！gmail可以收到信了！ :lol: 
<br>
<br>
參考資料： 
<br>
[url=http://plog.longwin.com.tw/my_note-app-setting/2007/07/06/google_apps_localhost_mail_problem_2007]Tsung's Blog: 轉換到 Google Apps, localhost 信寄不出去的解法[/url] 
<br>
[url=http://linux.vbird.org/linux_server/0390postfix.php]鳥哥的 Linux 與 ADSL 私房菜: 簡易 Mail Server 架設 -- Postfix 設定[/url]]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/98/166.page</guid>
				<link>https://forum.andowson.com/posts/preList/98/166.page</link>
				<pubDate><![CDATA[Sat, 7 Jul 2007 11:27:02]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>解決Postfix被gmail退信問題：The IP you&#39;re using to send email is not authorized</title>
				<description><![CDATA[ 这是什么原理?]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/98/226.page</guid>
				<link>https://forum.andowson.com/posts/preList/98/226.page</link>
				<pubDate><![CDATA[Tue, 28 Aug 2007 17:58:08]]> GMT</pubDate>
				<author><![CDATA[ utopian]]></author>
			</item>
			<item>
				<title>回覆:解決Postfix被gmail退信問題：The IP you&#39;re using to send email is not authorized</title>
				<description><![CDATA[ $ dig mx andowson.com 
<br>
<br>
; &lt;&lt;&gt;&gt; DiG 9.2.4 &lt;&lt;&gt;&gt; mx andowson.com 
<br>
;; global options: printcmd 
<br>
;; Got answer: 
<br>
;; -&gt;&amp;gtHEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 24079 
<br>
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 8, AUTHORITY: 2, ADDITIONAL: 0 
<br>
<br>
;; QUESTION SECTION: 
<br>
;andowson.com. IN MX 
<br>
<br>
;; ANSWER SECTION: 
<br>
andowson.com. 604800 IN MX 10 aspmx.l.google.com. 
<br>
andowson.com. 604800 IN MX 20 alt1.aspmx.l.google.com. 
<br>
andowson.com. 604800 IN MX 30 alt2.aspmx.l.google.com. 
<br>
andowson.com. 604800 IN MX 40 aspmx2.googlemail.com. 
<br>
andowson.com. 604800 IN MX 50 aspmx3.googlemail.com. 
<br>
andowson.com. 3600 IN MX 60 220-135-57-87.hinet-ip.hinet.net. 
<br>
andowson.com. 3600 IN MX 100 smtp.where.secureserver.net. 
<br>
andowson.com. 3600 IN MX 200 mailstore1.secureserver.net. 
<br>
<br>
;; AUTHORITY SECTION: 
<br>
andowson.com. 3600 IN NS park29.secureserver.net. 
<br>
andowson.com. 3600 IN NS park30.secureserver.net. 
<br>
<br>
;; Query time: 558 msec 
<br>
;; SERVER: 168.95.1.1#53(168.95.1.1) 
<br>
;; WHEN: Wed Aug 29 08:01:55 2007 
<br>
;; MSG SIZE rcvd: 317 
<br>
<br>
申請了[url=http://www.google.com.tw/a]Google Apps[/url]的郵件代管後, 在DNS上面設定MX順序時已把gmail放在上面了, 等於是Postfix對 andowson.com 的 MX 指到 gmail去了,因此信就往 gmail smtp跑, 而gmail smtp沒開放 open relay, 當然就寄不出去囉.]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/98/227.page</guid>
				<link>https://forum.andowson.com/posts/preList/98/227.page</link>
				<pubDate><![CDATA[Wed, 29 Aug 2007 08:07:54]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
	</channel>
</rss>