SHA256
1
0
forked from pool/libvmime
libvmime/0001-Avoid-generating-illegal-Envelope-From-with-sendmail.patch

32 lines
1.1 KiB
Diff

From a30f0677dc199bc85e78fc8e97760ed97231d444 Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
Date: Mon, 18 Dec 2023 04:44:45 +0100
Subject: [PATCH] Avoid generating illegal Envelope-From with sendmail://
transport
References: https://github.com/kisli/vmime/pull/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 ``<""@>``.
---
src/vmime/net/sendmail/sendmailTransport.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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());
--
2.43.0