diff options
-rw-r--r-- | apps/settings/templates/settings/admin/additional-mail.php | 2 | ||||
-rw-r--r-- | lib/private/Mail/Mailer.php | 12 | ||||
-rw-r--r-- | tests/lib/Mail/MailerTest.php | 2 |
3 files changed, 6 insertions, 10 deletions
diff --git a/apps/settings/templates/settings/admin/additional-mail.php b/apps/settings/templates/settings/admin/additional-mail.php index c6548d88737..4e81e52c83b 100644 --- a/apps/settings/templates/settings/admin/additional-mail.php +++ b/apps/settings/templates/settings/admin/additional-mail.php @@ -45,7 +45,7 @@ if ($_['mail_smtpmode'] === 'qmail') { $mail_sendmailmode = [ 'smtp' => 'smtp (-bs)', - 'pipe' => 'pipe (-t)' + 'pipe' => 'pipe (-t -i)' ]; ?> diff --git a/lib/private/Mail/Mailer.php b/lib/private/Mail/Mailer.php index 7d249338bdc..60f6c4580ca 100644 --- a/lib/private/Mail/Mailer.php +++ b/lib/private/Mail/Mailer.php @@ -350,14 +350,10 @@ class Mailer implements IMailer { break; } - switch ($this->config->getSystemValueString('mail_sendmailmode', 'smtp')) { - case 'pipe': - $binaryParam = ' -t'; - break; - default: - $binaryParam = ' -bs'; - break; - } + $binaryParam = match ($this->config->getSystemValueString('mail_sendmailmode', 'smtp')) { + 'pipe' => ' -t -i', + default => ' -bs', + }; return new SendmailTransport($binaryPath . $binaryParam, null, $this->logger); } diff --git a/tests/lib/Mail/MailerTest.php b/tests/lib/Mail/MailerTest.php index 5ffba939284..aa62c9a319d 100644 --- a/tests/lib/Mail/MailerTest.php +++ b/tests/lib/Mail/MailerTest.php @@ -72,7 +72,7 @@ class MailerTest extends TestCase { public function sendmailModeProvider(): array { return [ 'smtp' => ['smtp', ' -bs'], - 'pipe' => ['pipe', ' -t'], + 'pipe' => ['pipe', ' -t -i'], ]; } |