Add "-t" sendmail flag as another option as the "sendmail" default command

Created on 29 September 2023, almost 2 years ago

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 "sendmai -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

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇩🇪Germany Grevil

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Grevil
  • 🇬🇧United Kingdom adamps

    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)
    
  • 🇩🇪Germany Grevil

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

  • 🇬🇧United Kingdom c_archer Cumbria

    Any progress with this?

  • 🇨🇦Canada joseph.olstad

    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.

Production build 0.71.5 2024