Univention Bugzilla – Bug 48243
maildomain in JSON config is required to use scheme:email
Last modified: 2021-05-06 14:10:51 CEST
maildomain in JSON config is required to use scheme:email. Alternatively if maildomain is not set, the UCRV mail/hosteddomains is used. If this UCRV is not set, scheme:email is not used and no mail addresses are generated without any further notice/debug output.
6d3bc17e7 Bug #48243: improve import manual
I suggest to add a test to ucs-school-import/usr/share/ucs-school-import/checks/defaults.py. It would verify (and abort if not) that if config{scheme:email} is set, a domain can be found with either config{maildomain} or ucr{mail/hosteddomains}. @sönke: OK?
Implemented the suggested check to ucs-school-import/usr/share/ucs-school-import/checks/defaults.py. Behavior was tested by importing a testuser.csv while no maildomain was specified and mail/hosteddomains was unset. Solution pushed to branch troehmey/bug48243 with commit commit ffc95c7c2a29518ad08662c65302092b90452ebb Bug #48243: added importer check Waiting for QA
QA → All OK → rebase, merge, etc. since there is no pre-commit in this branch you will have to do this e.g. manually (not too much, only one file) before fix: email is set to none, no error after fix File "/usr/share/ucs-school-import/checks/defaults.py", line 216, in test_maildomain_is_set raise InitialisationError('No domain could be found in the configuration or under locally hosted domains.') InitialisationError: No domain could be found in the configuration or under locally hosted domains. is raised when importing "Schulen","Vorname","Nachname","Klassen","Telefonnumer" "DEMOSCHOOL","Anton1","Meyer","DEMOSCHOOL-1A,DEMOSCHOOL-2B","" with "scheme": { "email": "<:umlauts><firstname>.<lastname><:lower>[COUNTER2]@<maildomain>", ... } making sure everything works as before: ucr set mail/hosteddomains="wenzel-univention.intranet,some-domain.intranet" → no error, first domain is used for maildomain setting "maildomain": "some-univention-domain.intranet" in the user_import.json → no error, correct maildomain is used.
I applied the fix in a new commit directly on branch 4.4 in order to deal with the missing pre-commit on the feature branch and avoid unnecessary fixups and merging: 415245af8 Bug #48243: added yaml 718a634b7 Bug #48243: added changelog entry d4a2b0d4a Bug #48243: added importer check test_maildomain_is_set I also tested the behavior once more, just to be sure. Successful build: Package: ucs-school-import Version: 17.0.55A~4.4.0.202104221857 Branch: ucs_4.4-0 Scope: ucs-school-4.4
QA → All OK → Verify Merge/ new commit → OK, because change is very small changelog → OK yaml → OK Jenkins → happy
Errata updates for UCS@school 4.4 v9 have been released. https://docs.software-univention.de/changelog-ucsschool-4.4v9-de.html If this error occurs again, please clone this bug.