aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan Engelhardt <[email protected]>2023-12-31 14:56:28 +0000
committerGitHub <[email protected]>2023-12-31 14:56:28 +0000
commitacfc0bbf824defd604fd218539c3f504abbb7efe (patch)
treea113c6f27c490e2af17b6654f91a23b083b7462e /src
parentBuild: static lib dependency for ICU (#281) (diff)
downloadvmime-acfc0bbf824defd604fd218539c3f504abbb7efe.tar.gz
vmime-acfc0bbf824defd604fd218539c3f504abbb7efe.zip
Avoid generating illegal Envelope-From with sendmail:// transport (#285)
When the ``sender`` function argument is the empty object, vmime would still attempt to use it at ``sender.getEmail().generate()``, but that produces just ``@``. As sendmail is called with ``-f @``, this shows up in postfix's logs as ``<""@>``.
Diffstat (limited to 'src')
-rw-r--r--src/vmime/net/sendmail/sendmailTransport.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vmime/net/sendmail/sendmailTransport.cpp b/src/vmime/net/sendmail/sendmailTransport.cpp
index 8b8b7272..75508ee4 100644
--- a/src/vmime/net/sendmail/sendmailTransport.cpp
+++ b/src/vmime/net/sendmail/sendmailTransport.cpp
@@ -165,7 +165,7 @@ void sendmailTransport::send(
args.push_back("-i");
args.push_back("-f");
- if (!sender.isEmpty()) {
+ if (sender.isEmpty()) {
args.push_back(expeditor.getEmail().generate());
} else {
args.push_back(sender.getEmail().generate());