我希望所有来自我服务器的邮件都通过我的私人 Google 电子邮件帐户进行转发。但所有电子邮件都被退回,并且退回邮件仍然有效:
I got info: <[email protected]>: host smtp.gmail.com[173.194.69.109]
said: 530-5.5.1 Authentication Required. Learn more at 530 5.5.1
support.google.com/mail/bin/answer.py?answer=14257 fc7sm2465531bkc.3 - gsmtp
(in reply to MAIL FROM command) - so in such configuration MAIL FROM must be
included in relay definition. How can I do it?
如何以及在哪个文件中添加行来定义 MAIL FROM 参数。
下面是我的 main.cf 文件
readme_directory = /usr/share/doc/postfix/README_FILES
html_directory = /usr/share/doc/postfix/html
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
command_directory = /usr/sbin
manpage_directory = /usr/share/man
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
queue_directory = /var/spool/postfix
mail_owner = postfix
# listen on localhost only
inet_interfaces = 127.0.0.1
smtpd_banner = $myhostname ESMTP $mail_name
biff = no
mynetworks = 192.168.0.0/24
# appending .domain is the MUA's job.
append_dot_mydomain = no
#Uncomment the next line to generate "delayed mail" warnings
delay_warning_time = 4h
relayhost = [smtp.gmail.com]:587
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
以及如何使端口 25(此时 nmap 显示它未打开)处于活动状态以接收来自我的本地网络的邮件?
答案1
inet_interfaces = 127.0.0.1
表示只监听本地主机。根据需要进行更改,使其监听端口 25。
我猜 /etc/postfix/sasl_passwd 不太正确,但我需要查看内容才能确定。确保屏蔽了您的真实密码!:)