• 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 dpkg update message for plesk-dovecot-imap-driver

B_P

Regular Pleskian
On my Ubuntu 16.04 with Plesk 17.8.11 I saw today that there were updates for the following packages: plesk-dovecot plesk-dovecot-core plesk-dovecot-imap-driver plesk-dovecot-pigeonhole

During the update of plesk-dovecot-imap-driver_17.8.11-ubuntu16.04.build1708190315.14_amd64.deb I received the following messages:

Removing 'diversion of /etc/apparmor.d/usr.lib.dovecot.dovecot-lda to /opt/psa/etc/apparmor.d/usr.lib.dovecot.dovecot-lda.orig by plesk-dovecot-imap-driver'
dpkg-divert: error: rename involves overwriting '/etc/apparmor.d/usr.lib.dovecot.dovecot-lda' with
different file '/opt/psa/etc/apparmor.d/usr.lib.dovecot.dovecot-lda.orig', not allowed
Leaving 'diversion of /etc/apparmor.d/usr.lib.dovecot.dovecot-lda to /opt/psa/etc/apparmor.d/usr.lib.dovecot.dovecot-lda.orig by plesk-dovecot-imap-driver'
Removing 'diversion of /etc/apparmor.d/usr.lib.dovecot.log to /opt/psa/etc/apparmor.d/usr.lib.dovecot.log.orig by plesk-dovecot-imap-driver'
dpkg-divert: error: rename involves overwriting '/etc/apparmor.d/usr.lib.dovecot.log' with
different file '/opt/psa/etc/apparmor.d/usr.lib.dovecot.log.orig', not allowed
Leaving 'diversion of /etc/apparmor.d/usr.lib.dovecot.log to /opt/psa/etc/apparmor.d/usr.lib.dovecot.log.orig by plesk-dovecot-imap-driver'

This looks a bit confusing and I am wondering what needs to be done...
 
I think that the issued /etc/apparmor.d/usr.lib.dovecot.dovecot-lda.orig and opt/psa/etc/apparmor.d/usr.lib.dovecot.log.orig for some reasons were not replaced with new one during the upgrade procedure. It is difficult to say what exactly caused this behavior for now.
As a possible solution try to move these .orig files to /root for example.
 
What is not clear to me is which file belongs to which update / version now, especially, since some files have the same time stamp:
For usr.lib.dovecot.dovecot-lda I have:
/etc/apparmor.d/local/usr.lib.dovecot.dovecot-lda 221 Bytes, timestamp related to the update time (March 19, 16:37 CEST)
/etc/apparmor.d/local/usr.lib.dovecot.dovecot-lda.orig 2639 Bytes, timestamp related to the update time (this file matches /etc/apparmor.d/usr.lib.dovecot.dovecot-lda)
/opt/psa/etc/apparmor.d/usr.lib.dovecot.dovecot-lda 221 Bytes, timestamp: March 15, 08:24 CEST
/opt/psa/etc/apparmor.d/usr.lib.dovecot.dovecot-lda.orig 2639 Bytes, timestamp: April 24, 2017 (this file matches /etc/apparmor.d/usr.lib.dovecot.dovecot-lda)
/opt/psa/etc/apparmor.d/usr.lib.dovecot.dovecot-lda.system 2639 Bytes, timestamp: March 15, 08:24 CEST (this file matches /etc/apparmor.d/usr.lib.dovecot.dovecot-lda)
Given the identity of these files, I removed (temporarily) the .orig and .system files

For usr.lib.dovecot.log I have:
# ls -la /etc/apparmor.d/usr.lib.dovecot.log*
-rw-r--r-- 1 root root 700 Mär 19 16:37 /etc/apparmor.d/usr.lib.dovecot.log

# ls -la /etc/apparmor.d/local/usr.lib.dovecot*
-rw-r--r-- 1 root root 126 Mar 19 16:37 /etc/apparmor.d/local/usr.lib.dovecot.log (only comments)
-rw-r--r-- 1 root root 680 Mar 19 16:37 /etc/apparmor.d/local/usr.lib.dovecot.log.orig

and
# ls -la /opt/psa/etc/apparmor.d/usr.lib.dovecot.log*
-rw-r--r-- 1 root root 126 Mar 15 08:24 /opt/psa/etc/apparmor.d/usr.lib.dovecot.log (only comments)
-rw-r--r-- 1 root root 680 Oct 13 2016 /opt/psa/etc/apparmor.d/usr.lib.dovecot.log.orig (identical to /etc/apparmor.d/local/usr.lib.dovecot.log.orig)
-rw-r--r-- 1 root root 700 Mar 15 08:24 /opt/psa/etc/apparmor.d/usr.lib.dovecot.log.system (identical to /etc/apparmor.d/usr.lib.dovecot.log)

and
# diff /etc/apparmor.d/usr.lib.dovecot.log /etc/apparmor.d/local/usr.lib.dovecot.log.orig
14c14
< /usr/lib/dovecot/log flags=(complain,attach_disconnected) {
---
> /usr/lib/dovecot/log flags=(complain) {

Again, given the identity of these files, I removed (temporarily) the .orig and .system files.

Can someone check if this was the right activity? Which content should the files /etc/apparmor.d/local/usr.lib.dovecot.dovecot-lda and /etc/apparmor.d/local/usr.lib.dovecot.log have with the latest Plesk update running Ubuntu 16.04?
 
Update: given that my system still struggles with AppArmor problems, I reran "plesk repair installation". For this process to complete without hard error messages, the .system files need to be present.
 
Last edited:
@IgorG Similar issues happened when upgrading to 18.0 now:
Preparing to unpack .../plesk-dovecot-imap-driver_18.0-v.ubuntu.16.04+p18.0.27.0+t200422.1107_amd64.deb ...
Removing 'diversion of /etc/apparmor.d/usr.lib.dovecot.dovecot-lda to /opt/psa/etc/apparmor.d/usr.lib.dovecot.dovecot-lda.orig by plesk-dovecot-imap-driver'
dpkg-divert: error: rename involves overwriting '/etc/apparmor.d/usr.lib.dovecot.dovecot-lda' with
different file '/opt/psa/etc/apparmor.d/usr.lib.dovecot.dovecot-lda.orig', not allowed
Leaving 'diversion of /etc/apparmor.d/usr.lib.dovecot.dovecot-lda to /opt/psa/etc/apparmor.d/usr.lib.dovecot.dovecot-lda.orig by plesk-dovecot-imap-driver'
Removing 'diversion of /etc/apparmor.d/usr.lib.dovecot.log to /opt/psa/etc/apparmor.d/usr.lib.dovecot.log.orig by plesk-dovecot-imap-driver'
dpkg-divert: error: rename involves overwriting '/etc/apparmor.d/usr.lib.dovecot.log' with
different file '/opt/psa/etc/apparmor.d/usr.lib.dovecot.log.orig', not allowed
Leaving 'diversion of /etc/apparmor.d/usr.lib.dovecot.log to /opt/psa/etc/apparmor.d/usr.lib.dovecot.log.orig by plesk-dovecot-imap-driver'

To me the question is now, whether I do have the latests versions somewhere... (/etc/apparmor.de/usr.lib.dovecot.dovecot-lda is identical with /opt/psa/etc/apparmor.d/usr.lib.dovecot.dovecot-lda.{orig,system} and /opt/psa/etc/apparmor.d/usr.lib.dovecot.dovecot-lda is the same as the /etc/apparmor.de/local/usr.lib.dovecot.dovecot-lda
 
@IgorG as there are quite some AppArmor messages in /var/log/syslog due to Dovecot, it would really be appreciated to find a way to get a clean setup and get rid of these messages. Any advice?
 
Back
Top