从没有域名的服务器向我自己的 gmail 帐户发送电子邮件。
使用内部主机名时basinsrv.localdomain
,无法回复。
尝试了以下非默认设置main.cf
:
myorigin = 1.2.3.4
mydestination=$myhostname, localhost.$mydomain, localhost, $myorigin
resolve_numeric_domain = yes
inet_protocols = ipv4
inet_interfaces = all
现在可以从 gmail 回复,但 postfix 不接受回复:
Sep 30 11:25:55 basinsrv postfix/smtpd[11639]: NOQUEUE: reject: RCPT from mail-la0-f66.google.com[209.85.215.66]: 550 5.1.1 <[email protected]>: Recipient address rejected: User unknown in local recipient table; from=<blahblah at gmail.com> to=<[email protected]> proto=ESMTP helo=<mail-la0-f66.google.com>
根据https://en.wikipedia.org/wiki/Email_address,IP 地址应放在括号中:root@[1.2.3.4]
改变:
myorigin = [1.2.3.4]
但现在无法回复,gmail说:
Delivery to the following recipient failed permanently:
root@[1.2.3.4]
Technical details of permanent failure:
Internal parse error: Illegal envelope To: address (invalid domain name): root@[1.2.3.4]