burnley
Regular Pleskian
TITLE:
Dovecot Sieve filtering broke after upgrading from 17.5.3 to 17.8.11
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE:Plesk Onyx Version 17.8.11 Update #54, last updated on May 27, 2019 10:26 PM
CentOS Linux 7.6.1810 (Core)
PROBLEM DESCRIPTION:CentOS Linux 7.6.1810 (Core)
We're using Dovecot Sieve filtering capabilities to report spam/ham messages and after upgrading from 17.5.3 to 17.8.11 we started seeing errors like these in maillog:
[...]
May 28 14:14:31 plesk journal: plesk sendmail[9740]: cannot create temporary file - (30) Read-only file system
May 28 14:14:31 plesk journal: plesk sendmail[9740]: Unable to save stdin content to temporary file
May 28 14:14:31 plesk dovecot: imap: Error: plesk sendmail[9740]: cannot create temporary file - (30) Read-only file system
May 28 14:14:31 plesk dovecot: imap: Error: plesk sendmail[9740]: Unable to save stdin content to temporary file
May 28 14:14:31 host09 dovecot: report-spam.sh: Called for mailbox [email protected], Subject: Re: domain.com: Trouble Managing Your Social Media?
May 28 14:14:31 host09 dovecot: service=imap, [email protected], ip=[x.x.x.x]. sieve: pipe action: piped message to program `report-spam.sh'
[...]
The Sieve script for spam reporting is /usr/lib64/dovecot/sieve/report-spam.sieve and reads:
---CUT HERE---
require ["vnd.dovecot.pipe", "copy", "imapsieve", "environment", "variables", "mime"];
if environment :matches "imap.user" "*" {
set "username" "${1}";
}
if header :matches "Subject" "*" {
set "subject" "${1}";
}
pipe :copy "report-spam.sh" [ "${username}", "${subject}" ];
---CUT HERE---
And the called script, /usr/lib64/dovecot/sieve/report-spam.sh:
---CUT HERE---
#!/bin/bash
/usr/sbin/sendmail -f "noreply@plesk" "[email protected]"
exec /usr/bin/logger -p mail.notice -t "dovecot: `basename $0`" Called for mailbox $1, Subject: ${@:2}
---CUT HERE---
I see 17.8.11 has introduced sendmail changes:
1. Sendmail on 17.5.3
# ls -l /usr/sbin/sendmail*
lrwxrwxrwx 1 root root 21 Feb 28 22:08 /usr/sbin/sendmail -> /etc/alternatives/mta
-rwxr-xr-x 1 root postdrop 247960 Oct 31 2018 /usr/sbin/sendmail.postfix
# ls -l /etc/alternatives/mta
lrwxrwxrwx 1 root root 45 Feb 28 22:08 /etc/alternatives/mta -> /usr/lib64/plesk-9.0/postfix-sendmail-wrapper
# ldd /usr/lib64/plesk-9.0/postfix-sendmail-wrapper
linux-vdso.so.1 => (0x00007ffc8f7ba000)
libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00002b62615f1000)
libsqlite3.so.0 => /lib64/libsqlite3.so.0 (0x00002b6261a53000)
libc.so.6 => /lib64/libc.so.6 (0x00002b6261d08000)
libdl.so.2 => /lib64/libdl.so.2 (0x00002b62620d5000)
libz.so.1 => /lib64/libz.so.1 (0x00002b62622d9000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b62624ef000)
/lib64/ld-linux-x86-64.so.2 (0x00002b62613cd000)
2. Sendmail on 17.8.11
# ls -l /usr/sbin/sendmail*
lrwxrwxrwx 1 root root 21 May 27 22:20 /usr/sbin/sendmail -> /etc/alternatives/mta
lrwxrwxrwx 1 root root 46 May 27 22:20 /usr/sbin/sendmail.postfix -> /usr/lib64/plesk-9.0/sendmail/sendmail.postfix
# ls -l /usr/lib64/plesk-9.0/postfix-sendmail-wrapper
-r-sr-xr-x 1 root root 89336 Sep 27 2018 /usr/lib64/plesk-9.0/postfix-sendmail-wrapper
# ldd /usr/lib64/plesk-9.0/postfix-sendmail-wrapper
linux-vdso.so.1 => (0x00007ffd5f6c2000)
libboost_filesystem-plesk.so.1.65.1 => /usr/lib64/libboost-plesk-1.65/libboost_filesystem-plesk.so.1.65.1 (0x00002ab21910b000)
libxml2.so.2 => /lib64/libxml2.so.2 (0x00002ab219326000)
libboost_system-plesk.so.1.65.1 => /usr/lib64/libboost-plesk-1.65/libboost_system-plesk.so.1.65.1 (0x00002ab219690000)
libboost_regex-plesk.so.1.65.1 => /usr/lib64/libboost-plesk-1.65/libboost_regex-plesk.so.1.65.1 (0x00002ab219895000)
libz.so.1 => /lib64/libz.so.1 (0x00002ab219ba0000)
libsqlite3.so.0 => /lib64/libsqlite3.so.0 (0x00002ab219db6000)
libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00002ab21a06b000)
libmariadb.so.1 => /usr/lib64/libmariadbclient-plesk-1.0/libmariadb.so.1 (0x00002ab21a4cd000)
liblzma.so.5 => /lib64/liblzma.so.5 (0x00002ab21a70d000)
libidn.so.11 => /lib64/libidn.so.11 (0x00002ab21a933000)
libicuuc.so.50 => /lib64/libicuuc.so.50 (0x00002ab21ab66000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00002ab21aedf000)
libstdc++.so.6 => /usr/lib64/c++-plesk-6.3.0/lib64/libstdc++.so.6 (0x00002ab21b116000)
libm.so.6 => /lib64/libm.so.6 (0x00002ab21b498000)
libgcc_s.so.1 => /usr/lib64/c++-plesk-6.3.0/lib64/libgcc_s.so.1 (0x00002ab21b79a000)
libc.so.6 => /lib64/libc.so.6 (0x00002ab21b9b1000)
librt.so.1 => /lib64/librt.so.1 (0x00002ab21bd7e000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00002ab21bf86000)
libdl.so.2 => /lib64/libdl.so.2 (0x00002ab21c1a2000)
libicudata.so.50 => /lib64/libicudata.so.50 (0x00002ab21c3a6000)
libicui18n.so.50 => /lib64/libicui18n.so.50 (0x00002ab21d978000)
libssl.so.10 => /lib64/libssl.so.10 (0x00002ab21dd77000)
libfreebl3.so => /lib64/libfreebl3.so (0x00002ab21dfe9000)
/lib64/ld-linux-x86-64.so.2 (0x00002ab218ee7000)
libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00002ab21e1ec000)
libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00002ab21e439000)
libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00002ab21e722000)
libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00002ab21e926000)
libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00002ab21eb59000)
libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00002ab21ed69000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00002ab21ef6d000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00002ab21f186000)
libpcre.so.1 => /lib64/libpcre.so.1 (0x00002ab21f3ad000)
How can I tell where is /usr/lib64/plesk-9.0/postfix-sendmail-wrapper trying to write the temporary files?
STEPS TO REPRODUCE:[...]
May 28 14:14:31 plesk journal: plesk sendmail[9740]: cannot create temporary file - (30) Read-only file system
May 28 14:14:31 plesk journal: plesk sendmail[9740]: Unable to save stdin content to temporary file
May 28 14:14:31 plesk dovecot: imap: Error: plesk sendmail[9740]: cannot create temporary file - (30) Read-only file system
May 28 14:14:31 plesk dovecot: imap: Error: plesk sendmail[9740]: Unable to save stdin content to temporary file
May 28 14:14:31 host09 dovecot: report-spam.sh: Called for mailbox [email protected], Subject: Re: domain.com: Trouble Managing Your Social Media?
May 28 14:14:31 host09 dovecot: service=imap, [email protected], ip=[x.x.x.x]. sieve: pipe action: piped message to program `report-spam.sh'
[...]
The Sieve script for spam reporting is /usr/lib64/dovecot/sieve/report-spam.sieve and reads:
---CUT HERE---
require ["vnd.dovecot.pipe", "copy", "imapsieve", "environment", "variables", "mime"];
if environment :matches "imap.user" "*" {
set "username" "${1}";
}
if header :matches "Subject" "*" {
set "subject" "${1}";
}
pipe :copy "report-spam.sh" [ "${username}", "${subject}" ];
---CUT HERE---
And the called script, /usr/lib64/dovecot/sieve/report-spam.sh:
---CUT HERE---
#!/bin/bash
/usr/sbin/sendmail -f "noreply@plesk" "[email protected]"
exec /usr/bin/logger -p mail.notice -t "dovecot: `basename $0`" Called for mailbox $1, Subject: ${@:2}
---CUT HERE---
I see 17.8.11 has introduced sendmail changes:
1. Sendmail on 17.5.3
# ls -l /usr/sbin/sendmail*
lrwxrwxrwx 1 root root 21 Feb 28 22:08 /usr/sbin/sendmail -> /etc/alternatives/mta
-rwxr-xr-x 1 root postdrop 247960 Oct 31 2018 /usr/sbin/sendmail.postfix
# ls -l /etc/alternatives/mta
lrwxrwxrwx 1 root root 45 Feb 28 22:08 /etc/alternatives/mta -> /usr/lib64/plesk-9.0/postfix-sendmail-wrapper
# ldd /usr/lib64/plesk-9.0/postfix-sendmail-wrapper
linux-vdso.so.1 => (0x00007ffc8f7ba000)
libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00002b62615f1000)
libsqlite3.so.0 => /lib64/libsqlite3.so.0 (0x00002b6261a53000)
libc.so.6 => /lib64/libc.so.6 (0x00002b6261d08000)
libdl.so.2 => /lib64/libdl.so.2 (0x00002b62620d5000)
libz.so.1 => /lib64/libz.so.1 (0x00002b62622d9000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b62624ef000)
/lib64/ld-linux-x86-64.so.2 (0x00002b62613cd000)
2. Sendmail on 17.8.11
# ls -l /usr/sbin/sendmail*
lrwxrwxrwx 1 root root 21 May 27 22:20 /usr/sbin/sendmail -> /etc/alternatives/mta
lrwxrwxrwx 1 root root 46 May 27 22:20 /usr/sbin/sendmail.postfix -> /usr/lib64/plesk-9.0/sendmail/sendmail.postfix
# ls -l /usr/lib64/plesk-9.0/postfix-sendmail-wrapper
-r-sr-xr-x 1 root root 89336 Sep 27 2018 /usr/lib64/plesk-9.0/postfix-sendmail-wrapper
# ldd /usr/lib64/plesk-9.0/postfix-sendmail-wrapper
linux-vdso.so.1 => (0x00007ffd5f6c2000)
libboost_filesystem-plesk.so.1.65.1 => /usr/lib64/libboost-plesk-1.65/libboost_filesystem-plesk.so.1.65.1 (0x00002ab21910b000)
libxml2.so.2 => /lib64/libxml2.so.2 (0x00002ab219326000)
libboost_system-plesk.so.1.65.1 => /usr/lib64/libboost-plesk-1.65/libboost_system-plesk.so.1.65.1 (0x00002ab219690000)
libboost_regex-plesk.so.1.65.1 => /usr/lib64/libboost-plesk-1.65/libboost_regex-plesk.so.1.65.1 (0x00002ab219895000)
libz.so.1 => /lib64/libz.so.1 (0x00002ab219ba0000)
libsqlite3.so.0 => /lib64/libsqlite3.so.0 (0x00002ab219db6000)
libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00002ab21a06b000)
libmariadb.so.1 => /usr/lib64/libmariadbclient-plesk-1.0/libmariadb.so.1 (0x00002ab21a4cd000)
liblzma.so.5 => /lib64/liblzma.so.5 (0x00002ab21a70d000)
libidn.so.11 => /lib64/libidn.so.11 (0x00002ab21a933000)
libicuuc.so.50 => /lib64/libicuuc.so.50 (0x00002ab21ab66000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00002ab21aedf000)
libstdc++.so.6 => /usr/lib64/c++-plesk-6.3.0/lib64/libstdc++.so.6 (0x00002ab21b116000)
libm.so.6 => /lib64/libm.so.6 (0x00002ab21b498000)
libgcc_s.so.1 => /usr/lib64/c++-plesk-6.3.0/lib64/libgcc_s.so.1 (0x00002ab21b79a000)
libc.so.6 => /lib64/libc.so.6 (0x00002ab21b9b1000)
librt.so.1 => /lib64/librt.so.1 (0x00002ab21bd7e000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00002ab21bf86000)
libdl.so.2 => /lib64/libdl.so.2 (0x00002ab21c1a2000)
libicudata.so.50 => /lib64/libicudata.so.50 (0x00002ab21c3a6000)
libicui18n.so.50 => /lib64/libicui18n.so.50 (0x00002ab21d978000)
libssl.so.10 => /lib64/libssl.so.10 (0x00002ab21dd77000)
libfreebl3.so => /lib64/libfreebl3.so (0x00002ab21dfe9000)
/lib64/ld-linux-x86-64.so.2 (0x00002ab218ee7000)
libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00002ab21e1ec000)
libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00002ab21e439000)
libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00002ab21e722000)
libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00002ab21e926000)
libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00002ab21eb59000)
libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00002ab21ed69000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00002ab21ef6d000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00002ab21f186000)
libpcre.so.1 => /lib64/libpcre.so.1 (0x00002ab21f3ad000)
How can I tell where is /usr/lib64/plesk-9.0/postfix-sendmail-wrapper trying to write the temporary files?
Configure Sieve filtering in 17.5.3, then upgrade from 17.5.3 to 17.8.11. If the filter relies on executing /usr/sbin/sendmail, it'll fail after upgrade.
ACTUAL RESULT:See above
EXPECTED RESULT:No failure.
ANY ADDITIONAL INFORMATION:
YOUR EXPECTATIONS FROM PLESK SERVICE TEAM:Confirm bug