如何解决ssmtp "FromLineOverride=NO" 没有影响
带有 debian Bullseye 的新 lxd 容器必须将电子邮件发送到 SMTP 中继。选择的软件是sSMTP 2.64,配置如下:
/etc/ssmtp/revaliases
# sSMTP aliases
#
# Format: local_account:outgoing_address:mailhub
#
# Example: root:your_login@your.domain:mailhub.your.domain[:port]
# where [:port] is an optional port number that defaults to 25.
root:admin@example.com:mailout.example.com
www-data:admin@example.com:mailout.example.com
/etc/ssmtp/ssmtp.conf
#
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=admin@example.com
# The place where the mail goes. The actual machine name is required no
# MX records are consulted. Commonly mailhosts are named mail.domain.com
mailhub=mailout.example.com
# Where will the mail seem to come from?
#rewriteDomain=
# The full hostname
hostname=srv0815
# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address
FromLineOverride=NO
我可以按如下方式发送电子邮件,一切看起来都符合预期:
www-data@srv0815:~# echo "Test message" | mail -s "Test message - is from?" itsme@example.com
但是如果我像这样发送一封带有附加“发件人字段”的电子邮件......
www-data@srv0815:~# echo "Test message" | mail -s "Test message - is from?" itsme@example.com -a From:otherAddress@example.com
...我将收到带有给定“发件人地址”(例如 otherAddress@example.com)的电子邮件。但这应该不可能吧!?我在我的配置中明确设置了“FromLineOverride=NO”。因此,据我所知,ssmtp 应该忽略任何额外的“来自字段”。
相同的配置在另一个使用 gentoo linux 的容器上按预期工作。 这是一个错误吗?我错过了一些设置吗? 我很感激任何提示。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。