有没有办法使用 msmtp 和邮件更改发件人地址?

问题描述 投票:0回答:0

下面是我的 /etc/msmtprc.当我发送带有命令的电子邮件时,一切正常,比如:

echo "测试消息" | mail -s "标题" [email protected].

这里是问题:

无论我使用什么 [email protected],jack.foo 收到的邮件总是显示我的 gmail 地址,[email protected]。例如,如果我用 [email protected] 替换 [email protected],jack.foo 仍然会看到电子邮件是从 [email protected] 发送的。事情是:我想使用同一个 gmail 帐户从几个不同的主机(ip 地址)发送电子邮件。如果收件人能够在第一眼看到电子邮件时识别出发送电子邮件的主机,那就太好了。

------------------------------------------------------------
defaults
auth    on
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile ~/.msmtp.log
account gmail
host    smtp.gmail.com
port    587
from    [email protected]
user    sender.foo
password    senderfoo_password
account default: gmail
----------------------------------------------------

如果 msmtp 无法完成此任务,我愿意使用 msmtp 的替代方案。

sender msmtp
© www.soinside.com 2019 - 2024. All rights reserved.