Bug 38839 - policy check is not removed from postfix config upon dovecot removal
policy check is not removed from postfix config upon dovecot removal
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Mail - Dovecot
UCS 4.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: Daniel Tröder
Sönke Schwardt-Krummrich
:
Depends on:
Blocks: 34839
  Show dependency treegraph
 
Reported: 2015-07-06 14:33 CEST by Sönke Schwardt-Krummrich
Modified: 2015-07-09 18:15 CEST (History)
1 user (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sönke Schwardt-Krummrich univentionstaff 2015-07-06 14:33:34 CEST
The policy check "check_policy_service inet:127.0.0.1:12340" is not removed from postfix config/UCR if dovecot is removed. When switching from dovecot to cyrus, postfix returned internal configuration error because the dovecot-quotad was not responding anymore.
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2015-07-06 14:42:50 CEST
I switched from dovecot to cyrus via "univention-install univention-mail-cyrus" and the problem of the last command occured.
I removed the UCR variable and restarted postfix → everything was fine.

Then I switched back to dovecot: univention-install univention-mail-dovecot
→ "mail/postfix/smtpd/restrictions/recipient/80: check_policy_service inet:127.0.0.1:12340" was not set after reinstallation
Comment 2 Daniel Tröder univentionstaff 2015-07-06 16:35:39 CEST
With commit 61811 (univention-mail-dovecot_0.0.0-47) the check_policy rule is removed during deinstallation and added upon reinstallation.
Comment 3 Sönke Schwardt-Krummrich univentionstaff 2015-07-06 23:03:25 CEST
(In reply to Daniel Tröder from comment #2)
> With commit 61811 (univention-mail-dovecot_0.0.0-47) the check_policy rule
> is removed during deinstallation and added upon reinstallation.

→ Correct!
→ [latest dovecot is installed]
# ucr dump > ucr-before
# univention-install univention-mail-cyrus
# ucr dump > ucr-cyrus
# univention-install univention-mail-dovecot
# ucr dump > ucr-after
# diff -u ucr-before ucr-after | wc -l
0
# diff -u ucr-bevore ucr-cyrus | egrep ^[+-]
--- ucr-before        2015-07-04 11:41:28.020000000 +0200
+++ ucr-cyrus  2015-07-04 11:48:40.696000000 +0200
+mail/cyrus: yes
-mail/dovecot: yes
-mail/postfix/dovecot_sasl: yes
-mail/postfix/smtpd/restrictions/recipient/80: check_policy_service inet:127.0.0.1:12340
-mail/postfix/virtual/transport: lmtp:unix:private/dovecot-lmtp
-security/packetfilter/package/univention-mail-dovecot/tcp/110/all/en: POP3
-security/packetfilter/package/univention-mail-dovecot/tcp/110/all: ACCEPT
-security/packetfilter/package/univention-mail-dovecot/tcp/143/all/en: IMAP
-security/packetfilter/package/univention-mail-dovecot/tcp/143/all: ACCEPT
-security/packetfilter/package/univention-mail-dovecot/tcp/4190/all/en: Sieve
-security/packetfilter/package/univention-mail-dovecot/tcp/4190/all: ACCEPT
-security/packetfilter/package/univention-mail-dovecot/tcp/993/all/en: IMAPS
-security/packetfilter/package/univention-mail-dovecot/tcp/993/all: ACCEPT
-security/packetfilter/package/univention-mail-dovecot/tcp/995/all/en: POP3S
-security/packetfilter/package/univention-mail-dovecot/tcp/995/all: ACCEPT

→ memo: cyrus was installed on this system before, that's why the security 
        variables for cyrus have not been created during this run.
Comment 4 Sönke Schwardt-Krummrich univentionstaff 2015-07-06 23:33:57 CEST
There seems to be some typos in the univention-mail-dovecot.(postinst|prerm) scripts:

if [ -u $QUOTASTATUSIP ]; then
→ s/-u/-z/ ?

if [ -u $QUOTASTATUSPORT ]; then
→ s/-u/-z/ ?

if [ -u $QUOTASTATUSIP ]; then QUOTASTATUSIP="127.0.0.1"; fi
→ s/-u/-z/ ?

if [ -u $QUOTASTATUSPORT ]; then QUOTASTATUSPORT="12340"; fi
→ s/-u/-z/ ?

$ man sh | grep -- -u
       -u file       True if file exists and its set user ID flag is set.
$
→ REOPENED
Comment 5 Daniel Tröder univentionstaff 2015-07-07 12:35:31 CEST
(In reply to Sönke Schwardt-Krummrich from comment #4)
> There seems to be some typos in the univention-mail-dovecot.(postinst|prerm)
> scripts:
>
> → s/-u/-z/ ?
Fixed in r61833.
Comment 6 Sönke Schwardt-Krummrich univentionstaff 2015-07-08 00:46:34 CEST
(In reply to Daniel Tröder from comment #5)
> Fixed in r61833.

→ correct → VERIFIED
Comment 7 Janek Walkenhorst univentionstaff 2015-07-09 18:15:49 CEST
<http://errata.univention.de/ucs/4.0/237.html>