Apply patch from @cwiedmann but drop -oi option for pipe

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
Carsten Wiedmann 2018-11-12 23:26:35 +01:00 committed by Daniel Kesselberg
parent 3da7364c36
commit 446d96f3eb
No known key found for this signature in database
GPG key ID: 36E3664E099D0614
2 changed files with 23 additions and 1 deletions

View file

@ -421,6 +421,19 @@ $CONFIG = array(
*/
'mail_send_plaintext_only' => false,
/**
* Which mode is used for sendmail/qmail: ``smtp`` or ``pipe``.
*
* For ``smtp`` the sendmail binary is started with the parameter ``-bs``:
* - Use the SMTP protocol on standard input and output.
*
* For ``pipe`` the binary is started with the parameters ``-t``:
* - Read message from STDIN and extract recipients.
*
* Defaults to ``smtp``
*/
'mail_sendmailmode' => 'smtp',
/**
* Proxy Configurations
*/

View file

@ -282,6 +282,15 @@ class Mailer implements IMailer {
break;
}
return new \Swift_SendmailTransport($binaryPath . ' -bs');
switch ($this->config->getSystemValue('mail_sendmailmode', 'smtp')) {
case 'pipe':
$binaryParam = ' -t';
break;
default:
$binaryParam = ' -bs';
break;
}
return new \Swift_SendmailTransport($binaryPath . $binaryParam);
}
}