Mac OS Postfix GMail中继配置

时间:2013-07-19 16:11:47

标签: macos smtp postfix-mta

我在this tutorial on enabling postfix for outbound relay via Gmail on OS X Lion之后遇到了问题。

正如教程指示的那样,我在'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 terminal命令后,收到以下错误:

  

newaliases:致命:/etc/postfix/main.cf,第698行:在属性名称后缺少'=':“??”

这让我非常难过,因为第698行是评论:

# authenticated TLS/SASL session.

1 个答案:

答案 0 :(得分:0)

看起来你有一个不完整或可疑的哈希标记,检查你的整个文件,看看是否有一个符号/字符在其中一个“#”标记之前。

它发生在我身上,幸运的是它在第一线。室内机箱看起来就像它在文件的底部,就在你为GMAIL继电器添加线路之前。

希望有所帮助