1

Recently dovecot was shown to need updating. No problem...

Except that it barks this error out: /usr/bin/ucfr: line 323: [: : integer expression expected

and collapses on itself. So I think for a while.. maybe it's an old conflict, we've upgraded a few times. I run iredmail, lets backup our configurations and flush it, rebuild it, and I'll just diff out the changes.

I can't remove the file:

Purging configuration files for dovecot-core (1:2.2.22-1ubuntu2.1) ...
/usr/bin/ucfr: line 323: [: : integer expression expected
/usr/bin/ucfr: line 56: [: : integer expression expected
ucfr: Association belongs to , not dovecot-core
ucfr: Aborting
dpkg: error processing package dovecot-core (--purge):
 subprocess installed post-removal script returned error exit status 5
Processing triggers for man-db (2.7.5-1) ...
Errors were encountered while processing..

So I go into the /var/lib/dpkg/info directory and read up on its removal. I remove further nooks and crannies of what I can find. I believe at this time I have everything. I turn back to reinstall just the core, and we have:

The following NEW packages will be installed:
  dovecot-core
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/2,420 kB of archives.
After this operation, 7,578 kB of additional disk space will be used.
Selecting previously unselected package dovecot-core.
(Reading database ... 177431 files and directories currently installed.)
Preparing to unpack .../dovecot-core_1%3a2.2.22-1ubuntu2.1_amd64.deb ...
Unpacking dovecot-core (1:2.2.22-1ubuntu2.1) ...
Processing triggers for systemd (229-4ubuntu10) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up dovecot-core (1:2.2.22-1ubuntu2.1) ...
/usr/bin/ucfr: line 323: [: : integer expression expected
/usr/bin/ucfr: line 110: [: : integer expression expected
/usr/bin/ucfr: line 323: [: : integer expression expected
/usr/bin/ucfr: line 110: [: : integer expression expected
/usr/bin/ucfr: line 323: [: : integer expression expected
/usr/bin/ucfr: line 110: [: : integer expression expected
/usr/bin/ucfr: line 323: [: : integer expression expected
/usr/bin/ucfr: line 110: [: : integer expression expected
/usr/bin/ucfr: line 323: [: : integer expression expected
/usr/bin/ucfr: line 110: [: : integer expression expected
/usr/bin/ucfr: line 323: [: : integer expression expected
/usr/bin/ucfr: line 110: [: : integer expression expected
/usr/bin/ucfr: line 323: [: : integer expression expected
/usr/bin/ucfr: line 110: [: : integer expression expected
/usr/bin/ucfr: line 323: [: : integer expression expected
/usr/bin/ucfr: line 110: [: : integer expression expected

Creating config file /etc/dovecot/conf.d/10-master.conf with new version
/usr/bin/ucfr: line 323: [: : integer expression expected
/usr/bin/ucfr: line 110: [: : integer expression expected
/usr/bin/ucfr: line 323: [: : integer expression expected
/usr/bin/ucfr: line 56: [: : integer expression expected
ucfr: Association belongs to , not dovecot-core
ucfr: Aborting
dpkg: error processing package dovecot-core (--configure):
 subprocess installed post-installation script returned error exit status 5
Processing triggers for systemd (229-4ubuntu10) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
Errors were encountered while processing:
 dovecot-core
E: Sub-process /usr/bin/dpkg returned an error code (1)

I've searched high and low and can't find a reference for how to handle this. I'm pretty lost and now I have an utterly broken dovecot.

Thoughts anyone before I figure out my last backup and rollback?

1 Answer 1

0

Looks like a bug in /usr/bin/ucfr. As a workaround you could remove the ucfr call from /var/lib/dpkg/info/dovecot-core.postrm:

In line 19 change

ucfr --purge dovecot-core $conffile

to

true ucfr --purge dovecot-core $conffile

Then run

sudo apt-get purge dovecot-core

If that works reinstall dovecot-core

8
  • Thanks Florian. That allows for a full purge of dovecot-core but on the (re)install the second set of code (pasted) blows back up again.
    – Ciordia9
    Oct 4, 2016 at 21:24
  • What's the output of ls -l /var/lib/ucf/registry and egrep --count "[[:space:]]/etc/dovecot/conf.d/10-master.conf" /var/lib/ucf/registry Oct 4, 2016 at 21:49
  • -rw-r--r-- 1 root root 50 Oct 4 17:22 /var/lib/ucf/registry and nothing comes up for the second command.
    – Ciordia9
    Oct 4, 2016 at 21:57
  • What's the output of the second command? Oct 4, 2016 at 22:02
  • There was nothing. Linefeed.
    – Ciordia9
    Oct 5, 2016 at 13:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.