• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Forwarded to devs Removal of -bs option from plesk-sendmail-wrapper

Pau1Phi11ips

New Pleskian
Username:

TITLE

Removal of -bs option from plesk-sendmail-wrapper

PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE

Plesk Obsidian v18.0.44_build1800220520.19, CentOS Linux 7.9.2009

PROBLEM DESCRIPTION

As of Plesk Obsidian 18.0.44 (24 may 2022), and more specifically PPPM-13497 the -bs options appears to be disallowed from the postfix-sendmail-wrapper. I take it this is the "fix" for being able to bypass email sending restrictions? Since this update we encounter the following issues on CentOS 7.

The following is being logged in the kernel diagnostic messages:
[2430693.142798] sendmail[20013]: segfault at a ip 000000000040d8c3 sp 00007ffe62a1b300 error 4 in postfix-sendmail-wrapper[400000+18000]

The /var/log/maillog shows:
plesk-sendmail[6588]: S6588: Stand-alone SMTP server mode is prohibited

We use Symfony mailer as PHP library for sending emails using the SendmailTransport with -bs mode, as this is the recommended mode according to Symfony: Sending Emails with Mailer (Symfony Docs). They explicitly state that the -t option is advised against, but now it seems we're left with only that option.

Side note: we have outgoing mail control disabled globally on our systems as we do not require it.

Am I correct in reasoning the -bs option cannot be used at all anymore? Because if this is the case, I'm pretty sure many more people using Symfony and the Sendmail transport in the "correct" way (according to Symfony that is) will trip over this.

STEPS TO REPRODUCE

Using
PHP:
$transport = new Swift_SendmailTransport( '/usr/sbin/sendmail -bs' );

ACTUAL RESULT

Code:
Swift_TransportException: Expected response code 220 but got code "", with message ""

EXPECTED RESULT

An email gets sent ;)

ANY ADDITIONAL INFORMATION

(DID NOT ANSWER QUESTION)

YOUR EXPECTATIONS FROM PLESK SERVICE TEAM

Confirm bug
 
I can confirm the same issue with the older and unsupported Swiftmailer, as well as the newer Symfony mailer.
 
That's interesting. Looks like this impacts Laravel installations as well (as it uses both Swiftmailer and the newer Symfony mailer).
 
To work around this issue, one can temporarily use:

Swift mailer:
$transport = new Swift_SendmailTransport( '/usr/sbin/sendmail -t' );
$mailer = new \Swift_Mailer($this->transport);

Symfony mailer:
use Symfony\Component\Mailer\Mailer;
use Symfony\Component\Mailer\Transport\SendmailTransport;
...
$transport = new SendmailTransport( '/usr/sbin/sendmail -t' );
$mailer = new Mailer($this->transport);

But lets hope for a timely fix from the Plesk devs as this alternative method is not recommended.
 
Had the same issue this morning after the update, hope the -bs option gets restored as it will have a massive knock-on effect to anyone using Swiftmailer or Symfony Mailer with sendmail... The joys of having to go through and update my code temporarily to -t version on over 100 client websites to fix the issue, oly to potentially undo it again once the -bs option is restored...
 
As a tip for everyone bulk replacing, I had 120+ results but also results on /usr/sbin/sendmail -t, if you want to replace everything back you should not replace all -t matches.
/usr/sbin/sendmail[space]-bs
I have replaced -bs to -t with 3 spaces in between so that I can replace all /usr/sbin/sendmail[space][space][space]-t back to/usr/sbin/sendmail[space]-bs
/usr/sbin/sendmail[space][space][space]-t
 
I updated to Plesk 18.0.45 yesterday and I appear to be getting the same/similar error using sendmail -bs again. The issue doesn't appear with sendmail -t.

Expected response code 220 but got code "", with message "Unable to init new groups for user 'postfix': Operation not permitted
System error 1: Operation not permitted​

I don't know if this the same error or related in some way but it's now causing me a headache all over again...
 
I updated to Plesk 18.0.45 yesterday and I appear to be getting the same/similar error using sendmail -bs again. The issue doesn't appear with sendmail -t.

Expected response code 220 but got code "", with message "Unable to init new groups for user 'postfix': Operation not permitted​

System error 1: Operation not permitted​

I don't know if this the same error or related in some way but it's now causing me a headache all over again...
Error from symfony mailer is appears to be the same:

Connection to "process /usr/sbin/sendmail -bs" has been closed unexpectedly.​

 
@Ad-RWD developers informed me that to investigate this issue for Plesk 18.0.45 directly on your server, you have to contact Plesk Support Team.
 
Thank you for the report. The issue was confirmed and submitted as PPP-57724
 
Hello, thank you for the feedback.
We are waiting for the fix regarding this issue.
In the meantime I have not updated to Plesk 18.0.45.
 
Hello,
today at 5 pm I received a message in Plesk that Plesk version 18.0.45 had been installed.
Since then we have also had the problem described above with the same error message.

Is it possible to undo the update? For example, through System Restore?

And where can I switch off the automatic update installation on Plesk?
Thanks.

BR
 
Note, that beginning of next week, we plan to issue a fix in 18.0.45.1 update.
 
Apologies in advance for the terse message, but this has happened twice in the space of 2 months in different releases and has caused us around half a day's remedial work, plus reputational damage.

Please can you confirm what, if anything, is being done to ensure this change doesn't get introduced again?
 
Back
Top