In Progress CPANEL-40281 - Logwatch issue with cPanel on Ubuntu

Operating System & Version
Ubuntu 20

izghitu

Well-Known Member
Aug 9, 2006
62
2
158
Hi,

I just got Ubuntu 20 and set it up with cPanel. I found one issue with package dependencies when trying to install logwatch:
[email protected]:~# apt install logwatch
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
squashfs-tools
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
postfix
Suggested packages:
libsys-cpu-perl libsys-meminfo-perl procmail postfix-mysql postfix-pgsql postfix-ldap postfix-pcre postfix-lmdb postfix-sqlite sasl2-bin | dovecot-common resolvconf postfix-cdb mail-reader ufw postfix-doc
The following NEW packages will be installed:
logwatch postfix
0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
Need to get 366 kB/1,567 kB of archives.
After this operation, 6,887 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 logwatch all 7.5.2-1ubuntu1.3 [366 kB]
Fetched 366 kB in 0s (1,073 kB/s)
Preconfiguring packages ...
(Reading database ... 212030 files and directories currently installed.)
Preparing to unpack .../postfix_3.4.13-0ubuntu1.2_amd64.deb ...
Unpacking postfix (3.4.13-0ubuntu1.2) ...
dpkg: error processing archive /var/cache/apt/archives/postfix_3.4.13-0ubuntu1.2_amd64.deb (--unpack):
trying to overwrite '/usr/sbin/sendmail', which is also in package cpanel-exim 4.95-1.cp1198
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Selecting previously unselected package logwatch.
Preparing to unpack .../logwatch_7.5.2-1ubuntu1.3_all.deb ...
Unpacking logwatch (7.5.2-1ubuntu1.3) ...
Errors were encountered while processing:
/var/cache/apt/archives/postfix_3.4.13-0ubuntu1.2_amd64.deb
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)
[email protected]:~#


It looks like a bug. Any solution to this?

Please help.
Thanks
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
10,360
1,632
363
cPanel Access Level
Root Administrator
Hey there! cPanel itself doesn't make or distribute logwatch, as that is handled by the operating system repositories.

From the details I found, postfix is part of the logwatch software that Ubuntu provides, which would not be compatible with cPanel tools. This is not the case with CentOS systems, as the only dependencies there are the following:

Code:
[[email protected] /]# yum install logwatch
Last metadata expiration check: 3:45:41 ago on Mon 21 Mar 2022 03:25:46 PM UTC.
Dependencies resolved.
=======================================================================================================================================================================================================
 Package                                               Architecture                                Version                                           Repository                                   Size
=======================================================================================================================================================================================================
Installing:
 logwatch                                              noarch                                      7.4.3-11.el8                                      baseos                                      424 k
Installing dependencies:
 perl-Date-Manip                                       noarch                                      6.60-2.el8                                        baseos                                      1.1 M
 perl-Sys-CPU                                          x86_64                                      0.61-14.el8                                       baseos                                       20 k
 perl-Sys-MemInfo                                      x86_64                                      0.99-6.el8                                        baseos                                       27 k
We can see the following on a Ubuntu system:

Code:
# apt-cache depends logwatch
logwatch
  Depends: <perl:any>
    perl
 |Depends: <default-mta>
    postfix
  Depends: <mail-transport-agent>
    citadel-server
    courier-mta
    esmtp-run
    exim4-daemon-light
    lsb-invalid-mta
    masqmail
    msmtp-mta
    nullmailer
    opensmtpd
    qmail-run
    sendmail-bin
    ssmtp
    dma
    exim4-daemon-heavy
    postfix
  Recommends: libdate-manip-perl
  Suggests: libsys-cpu-perl
  Suggests: libsys-meminfo-perl
and we'll find postfix is in the "depends" list.
 

izghitu

Well-Known Member
Aug 9, 2006
62
2
158
Hey there! cPanel itself doesn't make or distribute logwatch, as that is handled by the operating system repositories.

From the details I found, postfix is part of the logwatch software that Ubuntu provides, which would not be compatible with cPanel tools. This is not the case with CentOS systems, as the only dependencies there are the following:

Code:
[[email protected] /]# yum install logwatch
Last metadata expiration check: 3:45:41 ago on Mon 21 Mar 2022 03:25:46 PM UTC.
Dependencies resolved.
=======================================================================================================================================================================================================
Package                                               Architecture                                Version                                           Repository                                   Size
=======================================================================================================================================================================================================
Installing:
logwatch                                              noarch                                      7.4.3-11.el8                                      baseos                                      424 k
Installing dependencies:
perl-Date-Manip                                       noarch                                      6.60-2.el8                                        baseos                                      1.1 M
perl-Sys-CPU                                          x86_64                                      0.61-14.el8                                       baseos                                       20 k
perl-Sys-MemInfo                                      x86_64                                      0.99-6.el8                                        baseos                                       27 k
We can see the following on a Ubuntu system:

Code:
# apt-cache depends logwatch
logwatch
  Depends: <perl:any>
    perl
|Depends: <default-mta>
    postfix
  Depends: <mail-transport-agent>
    citadel-server
    courier-mta
    esmtp-run
    exim4-daemon-light
    lsb-invalid-mta
    masqmail
    msmtp-mta
    nullmailer
    opensmtpd
    qmail-run
    sendmail-bin
    ssmtp
    dma
    exim4-daemon-heavy
    postfix
  Recommends: libdate-manip-perl
  Suggests: libsys-cpu-perl
  Suggests: libsys-meminfo-perl
and we'll find postfix is in the "depends" list.
Thanks for your reply.

It is not necessarily postfix that is in the depends list. It is the "default-mta" or "mail-transport-agent" virtual packages that are in the depends list. The cpanel-exim package however does not make part of any of those virtual packages. So the question is how do I resolve this? How do I get logwatch installed and have dependencies satisfied? cPanel is supposed to work in such a manner that it does not break any of the official package dependencies.

Is there perhaps any way to make the cpanel-exim package part of the "mail-transport-agent" virtual package?
 

izghitu

Well-Known Member
Aug 9, 2006
62
2
158
I've created case CPANEL-40281 so our team can check this out. I don't have a workaround available at this time, but I'll be sure to post once I hear something.
Hi,

Several months have passed since this was reported. Do you by any chance have any update on this? I have another Ubuntu server that has the exact same problem.

Thanks in advance.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
10,360
1,632
363
cPanel Access Level
Root Administrator
I can see the task has been assigned to a specific development team, but I don't have any timeframe as to when it will be implemented. I can say that since logwatch isn't a required tool for cPanel, this is a bit lower priority case since it doesn't break anything within the cPanel software.