• 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
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Question Sendmail behaviour change after 18.0.55 Update 1

davidweb

New Pleskian
Server operating system version
AlmaLinux 8
Plesk version and microupdate number
18.0.55 Update 2
Any ideas what might have changed the behaviour of Sendmail invoked via Postfix on 18.0.55 Update 1, we are seeing unexpected error messages in the mail logs.

We have a custom script invoked by Postfix (spamchk) which checks for the X-Spam-Status heading added by SpamAssassin and discards the email if present:

SENDMAIL=/usr/sbin/sendmail
EGREP=/usr/bin/egrep

cat | /usr/bin/spamc -u spamfilter | sed 's/^\.$/../' > /var/tempfs/out.$$
if $EGREP -q "^X-Spam-Status: Yes" < /var/tempfs/out.$$
then
exit 0
else

Otherwise it send the email on as follows:

$SENDMAIL "$@" < /var/tempfs/out.$$
exit 0
fi

This stopped working after the Update 1 install and now we see errors like this in the mail logs:

Sep 28 12:35:53 servername plesk-sendmail[1452134]: S1452134: cannot create temporary file - (30) Read-only file system
Sep 28 12:35:53 servername plesk-sendmail[1452134]: S1452134: Unable to save stdin content to temporary file

Running sendmail on CLI sends these same messages fine (as long as the user has a shell). The user spamfilter has a bash shell but that makes no difference to the script which has been in use for around 8 years on multiple CentOS servers (previously without Plesk).

We assumed file / folder permissions might be to blame, but even with a 777 setup trying to access a know file this still fails when run in the spamchk script from Postfix (with hardcoded destination email and filename, ruling out the possibility that the parameters in the script above may be incorrect):

Sep 28 09:47:32 servername postfix/pipe[1422106]: 7B0D81960DFB: to=<[email protected]>, orig_to=<[email protected]>, relay=spamchk, delay=0.31, delays=0.15/0/0/0.16, dsn=2.0.0, status=sent (delivered via spamchk service (plesk-sendmail[1422664]: S1422664: cannot create temporary file - (30) Read-only file system plesk-s))
and
(/usr/local/bin/spamchk: line 28: /tmp/mail.txt: No such file or directory plesk-sendmail[1452951]: S))

The Postfix install is a custom one from the OS vendor, not controlled / updated by Plesk. There are some suggestions that this can have side-effects. (That was done to get support for PostGres mail forwarding tables)
 
Back
Top