Problem/Motivation

Currently, if we'd like to send mails from servers hosted by Hetzner (Big hosting platform in europe) or locally using DDEV (e.g. with Mailhog or Mailpit configured). We need to manually configure a "mailer_sendmail_command" inside our "settings.local.php", to use "sendmail -t" instead of "sendmail -bs".
It would be nice to have the option to select "sendmail -t", without needing that extra entry in the settings.php.

Steps to reproduce

Proposed resolution

Add the "sendmail -t" command by default, without adjusting the settings.php / settings.local.php.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

Grevil created an issue. See original summary.

adamps’s picture

That's an interesting idea. We should be careful though as the comment from Symfony\Component\Mailer\Transport\SendmailTransport says this:

     * The recommended mode is "-bs" since it is interactive and failure notifications are hence possible.
     * Note that the -t mode does not support error reporting and does not support Bcc properly (the Bcc headers are not removed).
     *
     * If using -t mode, you are strongly advised to include -oi or -i in the flags (like /usr/sbin/sendmail -oi -t)
grevil’s picture

Issue summary: View changes
grevil’s picture

Agreed! I guess, we should add this information to the description of the command (if possible).

c_archer’s picture

Any progress with this?

joseph.olstad’s picture

I hit this also with a 24.04 LTS server. It will only become more frequent.

/usr/sbin/sendmail -t should likely be the default instead of -bs

Not sure if it makes a difference however I am using postfix, so the sendmail command is essentially a wrapper for postfix.

adamps’s picture

/usr/sbin/sendmail -t should likely be the default instead of -bs

Please see #2. Seeing as symfony don't recommend -t I doubt we will add it here. Also note that the same code is now in the experimental Core mailer, and we would like both to remain consistent.

adamps’s picture

Status: Active » Postponed