Browse Source

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

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
tags/v16.0.0alpha1
Carsten Wiedmann 5 years ago
parent
commit
446d96f3eb
No account linked to committer's email address
2 changed files with 23 additions and 1 deletions
  1. 13
    0
      config/config.sample.php
  2. 10
    1
      lib/private/Mail/Mailer.php

+ 13
- 0
config/config.sample.php 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
*/

+ 10
- 1
lib/private/Mail/Mailer.php 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);
}
}

Loading…
Cancel
Save