• 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

Issue [PPP-27056] Sendmail problems w/ sieve

ngenen

New Pleskian
I think I found a bug, since I just did a clean install and migrate my old customers from 12.0 to Onyx. So I will follow the bug format and explain what I did to fix it.

Plesk Onyx, Version 17.0.17 Update #7, ‪CentOS Linux 7.2.1511 (Core)‬, x86_64

PROBLEM DESCRIPTION: I had a few mailbox with redirect settings into roundcube, at the time using it with postfix + dovecot, when a email arrives matching that filter it throws a error trying to do a forwarding, with the next message:

Code:
Nov 25 06:23:31 athenas journal: plesk sendmail[32192]: Unable to change ownership of mail file `/usr/local/psa/handlers/spool/messageaZRnm6' (1): Operation not permitted
Nov 25 06:23:31 athenas dovecot: service=lda, [email protected], ip=[]. Error: Sendmail process terminated abnormally, exit status 70
Nov 25 06:23:31 athenas dovecot: service=lda, [email protected], ip=[]. Error: sieve: msgid=<[email protected]>: failed to redirect message to <[email protected]>: Failed to execute sendmail (temporary failure)
Nov 25 06:23:31 athenas dovecot: service=lda, [email protected], ip=[]. Error: sieve: Execution of script /var/qmail/mailnames/xxxx.xxx.xx/xxx/.dovecot.sieve was aborted due to temporary failure (user logfile /var/qmail/mailnames/xxxx.xxx.xx/xxx/.dovecot.sieve.log may reveal additional details)
Nov 25 06:23:31 athenas postfix/pipe[32184]: C22818541773: to=<[email protected]>, relay=plesk_virtual, delay=6226, delays=6226/0.02/0/0.06, dsn=4.3.0, status=deferred (temporary failure. Command output: plesk sendmail[32192]: Unable to change ownership of mail file `/usr/local/psa/handlers/spool/messageaZRnm6' (1): Operation not permitted 4.2.1 Message can not be delivered at this time )

STEPS TO REPRODUCE: Login with any account into roundcube, create a filter with any condition you could match for test and set the action to redirect to another mailbox outside the server.

ACTUAL RESULT: The mail never arrives to the actual mailbox and is not redirected either, with the error displayed before.

EXPECTED RESULT: Get the email which matched the sieve filter into another mailbox

ANY ADDITIONAL INFORMATION: None


PROBLEM

There was permission errors with sendmail and selinux which wasnt allowing me redirect those emails.

SOLUTION

I just run the following code to fix the problem as a quickfix, maybe not the best way.
Code:
# cat /var/log/audit/audit.log|grep "denied"|grep "sendmail"|audit2allow -M sendmail-custom
# semodule -i sendmail-custom.pp
 
Looks like SELinux issue. What is output of

# getenforce

command? Try to disable SELinux if it is enabled.
 
Sorry IgorG, indeed it is a SELinux issue, check my first thread, I've already solved it, but wasnt ready by default, the thread is to set correct permission into SELinux for next clean plesk installs. Thats why I did a bug report with how did I fix it. Cheers!
 
Sorry IgorG, indeed it is a SELinux issue, check my first thread, I've already solved it, but wasnt ready by default, the thread is to set correct permission into SELinux for next clean plesk installs. Thats why I did a bug report with how did I fix it. Cheers!
Yes, sorry, I didn't notice your workaround. We have already similar bugreport, but it was fixed long time ago. I will discuss it with developers.
 
Excelent, thank you! Is there a better way to send bugreports directly to QA/Development? Most of the time I'm able to fix them myself and could be useful to them and the entire community!
 
Try to install MU#8 and reproduce this issue? There were some dovecot updates at least.

Just run

# plesk installer --select-release-current --reinstall-patch --upgrade-installed-components

I can't reproduce it on Plesk Onyx 17.0.17 Update #8 CentOS6.8
 
I do have #8 installed, but when I disable the semodule I made, it throws again:

Code:
type=AVC msg=audit(1480477861.172:225325): avc:  denied  { chown } for  pid=30408 comm="sendmail" capability=0  scontext=system_u:system_r:dovecot_deliver_t:s0 tcontext=system_u:system_r:dovecot_deliver_t:s0 tclass=capability

and the error is back

Code:
Nov 30 00:51:01 athenas journal: plesk sendmail[30408]: Unable to change ownership of mail file `/usr/local/psa/handlers/spool/messageHtCScK' (1): Operation not permitted
 
Ok. I have submitted corresponding bugreport PPP-27056 regarding this issue.
 
Back
Top