Can you override the default sendmail path in Sendmail transport config in Craft 3?
There are some examples of how to override the mailer component and transport settings in the official Craft docs here: https://docs.craftcms.com/v3/config/#mailer-component

For this particular sendmail example, you'd need to do something like this from config/app.php:

'components' =&gt; [
    'mailer' =&gt; function() {
        // Get the stored email settings
        $settings = Craft::$app-&gt;systemSettings-&gt;getEmailSettings();

        // Override the transport adapter class
        $settings-&gt;transportType = craft\mail\transportadapters\Sendmail::class;

        // Create a Mailer component config with these settings
        $config = craft\helpers\App::mailerConfig($settings);
        $config['transport']['command'] = '/usr/bin/sendmail -customflags';

        // Instantiate and return it
        return Craft::createObject($config);
    },
]