Update 5.0.3 join-script fetchmail does not work

Hi@all,

I have here a UCS 5.0.2 Note (Member). As soon as I install the update to 5.0.3 and reboot, I get the message that there are pending join scripts.

When I run them it always hangs on the fetchmail-script:

Waiting for activation of the extension object fetchmail: OK
Waiting for file /usr/lib/python3/dist-packages/univention/admin/hooks.d/fetchmail.py: OK
Object exists: cn=mail,cn=custom attributes,cn=univention,dc=lan,dc=gehr,dc=club
Object exists: cn=FetchmailConfigSingle,cn=mail,cn=custom attributes,cn=univention,dc=lan,dc=gehr,dc=club
Create extended attribute univentionFetchmailSingle univentionFetchmailMulti
Object exists: cn=FetchmailConfigMulti,cn=mail,cn=custom attributes,cn=univention,dc=lan,dc=gehr,dc=club
Traceback (most recent call last):
  File "/usr/share/univention-fetchmail/migrate-fetchmail.py", line 155, in <module>
    main()
  File "/usr/share/univention-fetchmail/migrate-fetchmail.py", line 150, in main
    c.main()
  File "/usr/share/univention-fetchmail/migrate-fetchmail.py", line 91, in main
    self.get_ldap()
  File "/usr/share/univention-fetchmail/migrate-fetchmail.py", line 97, in get_ldap
    self.access, self.position = univention.admin.uldap.getAdminConnection()
  File "/usr/lib/python3/dist-packages/univention/admin/uldap.py", line 161, in getAdminConnection
    lo = univention.uldap.getAdminConnection(start_tls, decode_ignorelist=decode_ignorelist)
  File "/usr/lib/python3/dist-packages/univention/uldap.py", line 124, in getAdminConnection
    bindpw = open('/etc/ldap.secret').read().rstrip('\n')
FileNotFoundError: [Errno 2] No such file or directory: '/etc/ldap.secret'

__JOINERR__:FAILED: /usr/lib/univention-install/92univention-fetchmail-schema.inst
EXITCODE=1
c031f73f-89ca-49d4-a4f8-ecbb2c98f36d
univention-join-hooks: looking for hook type "join/post-joinscripts" on srv01.lan.company.com
Found hooks:


Di 14. Feb 19:58:26 CET 2023
univention-run-join-scripts finished

Does anyone have a tip for me?

with best
Sven

Hello Sven,

I have the same problem.
Currently I’m in the setup phase and because of it I have removed fetchmail.
Now the join scripts are succeeded but I have problems to reinstall fetchmail.

When I try to install fetchmail again I get this console output:

univention-app install fetchmail
Resolving dependencies for fetchmail
Going to install Fetchmail (6.3.26)
Showing License agreement for fetchmail=6.3.26
Showing README for fetchmail=6.3.26
Configuring fetchmail=6.3.26
Creating data directories for fetchmail...
Registering UCR for fetchmail
Marking fetchmail=6.3.26 as installed
File: /etc/univention/service.info/services/univention-appcenter.cfg
Module: kopano-cfg
Adding localhost to LDAP object
Reloading apache2 configuration (via systemctl): apache2.service.
No repository to register
Paketlisten werden gelesen...
Abhängigkeitsbaum wird aufgebaut....
Statusinformationen werden eingelesen....
Die folgenden zusätzlichen Pakete werden installiert:
  fetchmail univention-fetchmail-schema
Vorgeschlagene Pakete:
  fetchmailconf resolvconf
Die folgenden NEUEN Pakete werden installiert:
  fetchmail univention-fetchmail univention-fetchmail-schema
0 aktualisiert, 3 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
                                                                           Es müssen noch 0 B von 659 kB an Archiven heruntergeladen werden.
       Nach dieser Operation werden 2.559 kB Plattenplatz zusätzlich benutzt.
                                                                             Vormals nicht ausgewähltes Paket fetchmail wird gewählt.
(Lese Datenbank ... 100161 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von .../fetchmail_6.4.0~beta4-3+deb10u1A~5.0.0.202104091504_amd64.deb ...
Entpacken von fetchmail (6.4.0~beta4-3+deb10u1A~5.0.0.202104091504) ...
Vormals nicht ausgewähltes Paket univention-fetchmail-schema wird gewählt.
Vorbereitung zum Entpacken von .../univention-fetchmail-schema_13.0.5-1A~5.0.0.202302071552_all.deb ...
Entpacken von univention-fetchmail-schema (13.0.5-1A~5.0.0.202302071552) ...
Vormals nicht ausgewähltes Paket univention-fetchmail wird gewählt.
Vorbereitung zum Entpacken von .../univention-fetchmail_13.0.5-1A~5.0.0.202302071552_all.deb ...
Entpacken von univention-fetchmail (13.0.5-1A~5.0.0.202302071552) ...
fetchmail (6.4.0~beta4-3+deb10u1A~5.0.0.202104091504) wird eingerichtet ...
Job for fetchmail.service failed because the control process exited with error code.
See "systemctl status fetchmail.service" and "journalctl -xe" for details.
invoke-rc.d: initscript fetchmail, action "restart" failed.
 ●  fetchmail.service - LSB: init-Script for system wide fetchmail daemon
   Loaded: loaded (/etc/init.d/fetchmail; generated)
   Active:  failed  (Result: exit-code) since Wed 2023-02-15 00:47:40 CET; 29ms ago
     Docs: man:systemd-sysv-generator(8)
  Process: 51194 ExecStart=/etc/init.d/fetchmail start  (code=exited, status=1/FAILURE)

Feb 15 00:47:39 mail01 systemd[1]: Starting LSB: init-Script for system wide fetchmail daemon...
Feb 15 00:47:40 mail01 fetchmail[51194]: Starting mail retriever agent: fetchmailfetchmail: es wurden keine Mailserver spezifiziert.
Feb 15 00:47:40 mail01 fetchmail[51194]:  failed!
Feb 15 00:47:40 mail01 systemd[1]:    fetchmail.service: Control process exited, code=exited, status=1/FAILURE
Feb 15 00:47:40 mail01 systemd[1]:    fetchmail.service: Failed with result 'exit-code'.
Feb 15 00:47:40 mail01 systemd[1]:    Failed to start LSB: init-Script for system wide fetchmail daemon.
dpkg: Fehler beim Bearbeiten des Paketes fetchmail (--configure):
 »installiertes fetchmail-Skript des Paketes post-installation«-Unterprozess gab den Fehlerwert 1 zurück
univention-fetchmail-schema (13.0.5-1A~5.0.0.202302071552) wird eingerichtet ...
dpkg: Abhängigkeitsprobleme verhindern Konfiguration von univention-fetchmail:
 univention-fetchmail hängt ab von fetchmail; aber:
  Paket fetchmail ist noch nicht konfiguriert.

dpkg: Fehler beim Bearbeiten des Paketes univention-fetchmail (--configure):
 Abhängigkeitsprobleme - verbleibt unkonfiguriert
Trigger für systemd (241-7~deb10u8A~5.0.0.202107221216) werden verarbeitet ...
Trigger für man-db (2.8.5-2) werden verarbeitet ...
Trigger für univention-config (15.0.10-1A~5.0.0.202302031924) werden verarbeitet ...
Fehler traten auf beim Bearbeiten von:
 fetchmail
 univention-fetchmail
E: Sub-process /usr/bin/dpkg returned an error code (1)
Failed to install the App
Aborting...
Resolving dependencies for fetchmail
Going to remove Fetchmail (6.3.26)
Showing README for fetchmail=6.3.26
Configuring fetchmail=6.3.26
No hostdn for fetchmail found. Nothing to remove
Configuring fetchmail=6.3.26
Paketlisten werden gelesen...
Abhängigkeitsbaum wird aufgebaut....
Statusinformationen werden eingelesen....
Die folgenden Pakete werden ENTFERNT:
  fetchmail univention-fetchmail univention-fetchmail-schema
0 aktualisiert, 0 neu installiert, 3 zu entfernen und 0 nicht aktualisiert.
                                                                           2 nicht vollständig installiert oder entfernt.
                                                                                                                         Nach dieser Operation werden 2.559 kB Plattenplatz freigegeben.
(Lese Datenbank ... 100244 Dateien und Verzeichnisse sind derzeit installiert.)
Entfernen von univention-fetchmail (13.0.5-1A~5.0.0.202302071552) ...
Entfernen von fetchmail (6.4.0~beta4-3+deb10u1A~5.0.0.202104091504) ...
Entfernen von univention-fetchmail-schema (13.0.5-1A~5.0.0.202302071552) ...
Trigger für man-db (2.8.5-2) werden verarbeitet ...
Removing localhost from LDAP object
File: /etc/univention/service.info/services/univention-appcenter.cfg
Module: kopano-cfg
Reloading apache2 configuration (via systemctl): apache2.service.
No repository to unregister
Password for Administrator:
Search LDAP binddn:  done
Running pre-joinscripts hook(s):  done
Running 00kopano4ucs-safemode-on.inst skipped (already executed)
Running 03univention-directory-listener.inst skipped (already executed)
Running 04univention-ldap-client.inst skipped (already executed)
Running 08univention-apache.inst skipped (already executed)
Running 11univention-pam.inst skipped (already executed)
Running 18python-univention-directory-manager.inst skipped (already executed)
Running 20univention-directory-policy.inst skipped (already executed)
Running 20univention-join.inst skipped (already executed)
Running 26univention-nagios-common.inst skipped (already executed)
Running 30univention-appcenter.inst skipped (already executed)
Running 30univention-monitoring-client.inst skipped (already executed)
Running 30univention-nagios-client.inst skipped (already executed)
Running 33univention-portal.inst skipped (already executed)
Running 35univention-appcenter-docker.inst skipped (already executed)
Running 35univention-management-console-module-appcenter.inst skipped (already executed)
Running 35univention-management-console-module-diagnostic.inst skipped (already executed)
Running 35univention-management-console-module-join.inst skipped (already executed)
Running 35univention-management-console-module-lib.inst skipped (already executed)
Running 35univention-management-console-module-quota.inst skipped (already executed)
Running 35univention-management-console-module-reboot.inst skipped (already executed)
Running 35univention-management-console-module-services.inst skipped (already executed)
Running 35univention-management-console-module-setup.inst skipped (already executed)
Running 35univention-management-console-module-sysinfo.inst skipped (already executed)
Running 35univention-management-console-module-top.inst skipped (already executed)
Running 35univention-management-console-module-ucr.inst skipped (already executed)
Running 35univention-management-console-module-updater.inst skipped (already executed)
Running 36univention-management-console-module-apps.inst skipped (already executed)
Running 70kopano4ucs-udm.inst skipped (already executed)
Running 70kopano4ucs.inst skipped (already executed)
Running 71kopano4ucs-webapp.inst skipped (already executed)
Running 81univention-nfs-server.inst skipped (already executed)
Running 92univention-management-console-web-server.inst skipped (already executed)
Running 98univention-pkgdb-tools.inst skipped (already executed)
Running 99kopano4ucs-safemode-off.inst skipped (already executed)
Running post-joinscripts hook(s):  done
Potential script hook folder is unused: /var/lib/univention-appcenter/apps/fetchmail/local/hooks/post-remove.d

I assume something regards the assignment of the installed mail server went wrong.
In line 48 there is a message that no mail server is specified and in line 56 there are some dependency problems to configure fetchmail and prevent the installation.

Maybe an update of the fetchmail source packages are required?

Best regards
Hendrik

Hi,

i guess this is related and was already reported: Domain-join script 92univention-fetchmail-schema fails - #6 by hendrix3er

Hi tpfann,

you’re right. I found this topic after I have already written in the recent one.
Unfortunately I got in both no answer that work or did I miss something?

Best regards
Hendrik

Hi,
seems that they have opened a ticket for this and having the plan to release a fix next week.

See here:

and here:
https://forge.univention.org/bugzilla/show_bug.cgi?id=55681

BR
Tom

i looked at the bugzilla entry. I do not understand the last post. Can the problem be solved with the command:

univention-fetchmail-schema installs

fix? The command does not exist on my 5.0.2 node

I have seen that the bux is marked as “fixed / closed”.

I just installed the update again. But the problem remained.

Do I need to perform separate steps?

I have tested the following procedure on the Node (5.0.2 with fetchmail installed):

  • fetchmail uninstalled
  • installed update to 5.0.3
  • restart
  • Executed pending joinscripts
  • System diagnostics: No problem
  • fetchmail installed

→ Same error

How can the bug be marked as “fixed”?

Very similar error here. After updating Master and Kopano Server to 5.0.3 and installing all the updates I have to run the join script on the Master, but I get the error logs :

RUNNING 92univention-fetchmail-schema.inst
2023-03-04 17:54:06.614128568+01:00 (in joinscript_init)
Object exists: cn=ldapschema,cn=univention,dc=example,dc=com
Object exists: cn=ldapacl,cn=univention,dc=example,dc=com
INFO: No change of core data of object univention-fetchmail.
INFO: No change of core data of object 58univention-fetchmail-schema.
No modification: cn=univention-fetchmail,cn=ldapschema,cn=univention,dc=example,dc=com

No modification: cn=58univention-fetchmail-schema,cn=ldapacl,cn=univention,dc=example,dc=com

Waiting for activation of the extension object univention-fetchmail: OK
Waiting for activation of the extension object 58univention-fetchmail-schema: OK
Object exists: cn=udm_syntax,cn=univention,dc=example,dc=com
INFO: No change of core data of object fetchmail.
Object modified: cn=fetchmail,cn=udm_syntax,cn=univention,dc=example,dc=com

Waiting for activation of the extension object fetchmail: OK
Waiting for file /usr/lib/python3/dist-packages/univention/admin/syntax.d/fetchmail.py: OK
Object exists: cn=udm_hook,cn=univention,dc=example,dc=com
INFO: No change of core data of object fetchmail.
No modification: cn=fetchmail,cn=udm_hook,cn=univention,dc=example,dc=com

Waiting for activation of the extension object fetchmail: OK
Waiting for file /usr/lib/python3/dist-packages/univention/admin/hooks.d/fetchmail.py: OK
Object exists: cn=mail,cn=custom attributes,cn=univention,dc=example,dc=com
Object exists: cn=FetchmailConfigSingle,cn=mail,cn=custom attributes,cn=univention,dc=example,dc=com
Create extended attribute univentionFetchmailSingle univentionFetchmailMulti
Object exists: cn=FetchmailConfigMulti,cn=mail,cn=custom attributes,cn=univention,dc=example,dc=com
Converting old fetchmail configuration…
Skip object with uid “Administrator”. Already migrated or incomplete configuration
Traceback (most recent call last):
File “/usr/share/univention-fetchmail/migrate-fetchmail.py”, line 155, in
main()
File “/usr/share/univention-fetchmail/migrate-fetchmail.py”, line 150, in main
c.main()
File “/usr/share/univention-fetchmail/migrate-fetchmail.py”, line 92, in main
ret = self.convert()
File “/usr/share/univention-fetchmail/migrate-fetchmail.py”, line 123, in convert
passwd[0] if passwd else get_pw_from_rc(file, attrs[‘uid’][0].decode(‘UTF-8’)).encode(‘UTF-8’),
File “/usr/share/univention-fetchmail/migrate-fetchmail.py”, line 63, in get_pw_from_rc
for line in lines:
TypeError: ‘NoneType’ object is not iterable

Mastodon