Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
406 views
in Technique[技术] by (71.8m points)

email - ssmtp "FromLineOverride=NO" has no impact

a new lxd container with debian bullseye has to send emails to an SMTP-Relay. The chosen software is sSMTP 2.64 and the configuration looks like that:

/etc/ssmtp/revaliases

# sSMTP aliases
# 
# Format:   local_account:outgoing_address:mailhub
#
# Example: root:[email protected]:mailhub.your.domain[:port]
# where [:port] is an optional port number that defaults to 25.
root:[email protected]:mailout.example.com
www-data:[email protected]: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.
[email protected]

# 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

I can send an email as following and everything looks like expected:

www-data@srv0815:~# echo "Test message" | mail -s "Test message - is from?" [email protected]

But if I send an email with an additional "from field" like this...

www-data@srv0815:~# echo "Test message" | mail -s "Test message - is from?" [email protected] -a From:[email protected]

...I will receive the email with the given "From address" (e.g. [email protected]). But this shouldn't be possible!? I've explicit set "FromLineOverride=NO" in my configuration. Therefore, as far as I know, ssmtp should ignore any additional "from field".

The same configuration works as expected on another container with gentoo linux. Is it a bug? Did I missed some setting? I am grateful for any hint.

question from:https://stackoverflow.com/questions/65908377/ssmtp-fromlineoverride-no-has-no-impact

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...