2013-07-19 46 views
0

我在this tutorial on enabling postfix for outbound relay via Gmail on OS X Lion後遇到問題。Mac OS Postfix GMail中繼配置

正如本教程所指示的,我將以下幾行添加到'main.cf'後綴配置文件中。

# Set the relayhost to the Gmail Server.  Replace with your SMTP server as needed 
relayhost = [smtp.gmail.com]:587 
# Postfix 2.2 uses the generic(5) address mapping to replace local fantasy email 
# addresses by valid Internet addresses. This mapping happens ONLY when mail 
# leaves the machine; not when you send mail between users on the same machine. 
smtp_generic_maps = hash:/etc/postfix/generic 

# These settings (along with the relayhost setting above) will make 
# postfix relay all outbound non-local email via Gmail using an 
# authenticated TLS/SASL session. 
smtp_tls_loglevel=1 
smtp_tls_security_level=encrypt 
smtp_sasl_auth_enable=yes 
smtp_sasl_password_maps=hash:/etc/postfix/sasl/passwd 
smtp_sasl_security_options = noanonymous 

完成本教程的步驟3和運行newaliases終端命令後,我收到以下錯誤:

newaliases: fatal: /etc/postfix/main.cf, line 698: missing '=' after attribute name: "??"

這我很爲難,因爲線698是一條評論:

# authenticated TLS/SASL session. 

有什麼建議嗎?謝謝!

+0

嗯,我從來沒有想通了。我被建議嘗試[Mandrill](https://mandrillapp.com),並立即啓動並運行。 – dmoench

+0

儘管聽起來像你找到了一個替代解決方案,但我敢打賭,問題在於之前的函數行「smtp_generic_maps = hash:/ etc/postfix/generic」包含在設置文件中準備好了(準備工作是本教程的第4步)。 – blahdiblah

+0

我同意@blahdiblah;在編輯generic和新的sasl/passwd文件之後,還要檢查你是否運行了postmap * –

回答

0

看起來你有一個不完整或可疑的散列標記,檢查你的整個文件,看看是否有一個符號/字符在「#」標記之前。

它發生在我身上,幸運的是它在第一行。室內情況下,它看起來像它的文件底部,就在你添加GMAIL中繼線之前。

希望它有幫助