运行 Ubuntu Server 16.04,搜索了好几天,尝试了很多方法,但都不起作用,现在我终于找到了。我有一个 PHP 脚本,可以向订阅者列表发送电子邮件(仅限出站),它运行良好!然而,在电子邮件的标题中,它来自[电子邮件保护]代替[电子邮件保护]。我已经编辑了 main.cf
======================================
myhostname = server.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
#mydestination = server, localhost.localdomain, , localhost
mydestination = $myhostname, localhost.$myhostname, $mydomain
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = loopback-only
myorigin = /etc/mailname
inet_protocols = all
home_mailbox = Maildir/
======================================
感谢您对此事提供的任何帮助!
答案1
如果您使用 Postfix 的sendmail
二进制文件发送电子邮件,您可以尝试在配置文件sendmail_path
中将其设置php.ini
为:sendmail_path = "/usr/sbin/sendmail -t -i -f [email protected]"