Wiki-Quellcode von Kopano mit lokalem Betrieb einrichten
Version 13.1 von Jonas Mayer am 2022/05/23 13:27
Zeige letzte Bearbeiter
| author | version | line-number | content |
|---|---|---|---|
| 1 | (% style="color:#000000" %)__**Voraussetzung**:__ Abgeschlossene Kopano-Grundinstallation mit Anbindung an die MariaDB103 als Datenbank | ||
| 2 | |||
| 3 | |||
| 4 | (% style="color:#000000" %)Um Kopano im lokalen Betrieb einzurichten, muss man Anpassungen an Konfigurationsdateien im Puppeteer vornehmen. Dadurch erhalten Benutzer dann [[username@schule.local>>mailto:username@schule.local]] als lokale Mailadresse und können untereinander Nachrichten verschicken. | ||
| 5 | **__Wichtig:__** Im lokalen Betrieb können keine Nachrichten an externe Mailadressen versendet werden. Die Kommunikation ist strikt auf interne Adressen beschränkt. | ||
| 6 | |||
| 7 | |||
| 8 | (% style="color:#000000" %)Um die Anpassungen vorzunehmen wechselt man in den (% style="color:#3498db" %)Puppeteer (% style="color:#000000" %)und dort in das Verzeichnis(% style="color:#3498db" %) /etc/logodidact/hiera/custom.d/ | ||
| 9 | |||
| 10 | (% class="box" %) | ||
| 11 | ((( | ||
| 12 | (% style="color:#000000" %)##cd /etc/logodidact/hiera/custom.d/## | ||
| 13 | ))) | ||
| 14 | |||
| 15 | (% style="color:#000000" %)In diesem Verzeichnis liegen mehrere YAML-Konfigurationsdateien mit Bezug zu Kopano abgespeichert. Für die Einrichtung sind die Nachfolgenden von Relevanz: | ||
| 16 | |||
| 17 | (% class="box" %) | ||
| 18 | ((( | ||
| 19 | (% style="color:#000000" %)##kopano-g1.yaml / ldhost.yaml / samba4-ad.yaml## | ||
| 20 | ))) | ||
| 21 | |||
| 22 | |||
| 23 | (% style="color:#000000" %)Anpassungen in der (% style="color:#3498db" %)kopano-g1.yaml(% style="color:#000000" %): | ||
| 24 | Üblicherweise trägt man in der kopano-g1.yaml die gewünschte externe Maildomain sowie Zugangsdaten für das zugehörige Catchall-Postfach der Domain ein. Da wir jedoch keine externe Maildomain verwenden, bleiben diese Felder auf den Default-Wert bestehen. | ||
| 25 | |||
| 26 | (% class="box" %) | ||
| 27 | ((( | ||
| 28 | (% style="color:#000000" %)##ld_multidrop::ensure: absent | ||
| 29 | \\ld_kopano::amavisd_new::configs: | ||
| 30 | '@local_domains_maps': "( new_RE( qr'[@.](.*~\~\.?%{::domain})$'i ) )" | ||
| 31 | \\ld_kopano::postfix::configs: | ||
| 32 | smtp_generic_maps: | ||
| 33 | value: 'hash:%{dir_etc}/smtp_generic_maps.hash' | ||
| 34 | sender_dependent_relayhost_maps: | ||
| 35 | value: 'pcre:%{dir_etc}/sender_dependent_relayhost_maps_internal.pcre' | ||
| 36 | smtp_sender_dependent_authentication: | ||
| 37 | value: 'yes' | ||
| 38 | smtp_sasl_auth_enable: | ||
| 39 | value: 'yes' | ||
| 40 | smtp_sasl_password_maps: | ||
| 41 | value: 'hash:%{dir_etc}/smtp_sasl_password_maps.hash' | ||
| 42 | smtp_sasl_security_options: | ||
| 43 | value: 'noanonymous, noplaintext' | ||
| 44 | smtp_sasl_tls_security_options: | ||
| 45 | value: 'noanonymous' | ||
| 46 | smtp_tls_session_cache_database: | ||
| 47 | value: 'btree:${data_directory}/smtp_scache' | ||
| 48 | smtp_use_tls: | ||
| 49 | value: 'yes' | ||
| 50 | virtual_mailbox_domains: | ||
| 51 | value: 'pcre:%{dir_etc}/virtual_mailbox_domains_internal.pcre' | ||
| 52 | # Einschränken von vordefinierte Absendern auf Empfänger der lokalen Maildomäne##(%%) | ||
| 53 | (% style="color:#000000" %)## smtpd_restriction_classes: | ||
| 54 | value: 'local_only' | ||
| 55 | local_only: | ||
| 56 | value: 'check_recipient_access pcre:%{dir_etc}/local_domains.pcre, reject' | ||
| 57 | smtpd_recipient_restrictions: | ||
| 58 | value: 'check_sender_access pcre:%{dir_etc}/restricted_senders.pcre, permit_mynetworks,permit_sasl_authenticated, reject_invalid_hostname, reject_non_fqdn_hostname, reject_non_fqdn_recipient, reject_non_fqdn_sender, reject_unknown_recipient_domain, reject_unknown_sender_domain, reject_unauth_destination, reject_unauth_pipelining, reject' | ||
| 59 | \\\\ld_kopano::postfix::hashes: | ||
| 60 | '%{dir_etc}/smtp_generic_maps.hash': | ||
| 61 | content: | | ||
| 62 | %{header} | ||
| 63 | # Umschreibung der Absender-Domain bei externem Mailversand | ||
| 64 | # (Dummy-Eintrag, durch Empfängerfilterung nicht genutzt) | ||
| 65 | @%{::fqdn} @example.com | ||
| 66 | '%{dir_etc}/sender_dependent_relayhost_maps_external.hash': | ||
| 67 | content: | | ||
| 68 | %{header} | ||
| 69 | # Bounce-Nachrichten mit Null-Sender via Relayhost versenden | ||
| 70 | <> smtp.example.com | ||
| 71 | # Mails an externe Empfänger via Relayhost versenden | ||
| 72 | @example.com smtp.example.com | ||
| 73 | '%{dir_etc}/smtp_sasl_password_maps.hash': | ||
| 74 | content: | | ||
| 75 | %{header} | ||
| 76 | #user1@example.com user1@example.com:geheim | ||
| 77 | '%{dir_etc}/virtual_mailbox_domains_external.hash': | ||
| 78 | content: | | ||
| 79 | %{header} | ||
| 80 | example.com ACCEPT | ||
| 81 | '%{dir_etc}/restricted_senders.pcre': | ||
| 82 | content: | | ||
| 83 | %{header} | ||
| 84 | # Regular Expression Format: Liste an Absendern, deren Versand eingeschränkt wird | ||
| 85 | /@(.+?\.)?%{::domain}$/ local_only | ||
| 86 | '%{dir_etc}/local_domains.pcre': | ||
| 87 | content: | | ||
| 88 | %{header} | ||
| 89 | # Regular Expression Format: Liste erlaubter Empfängerdomänen für die eingeschränkten Absender | ||
| 90 | /@(.+?\.)?%{::domain}$/ OK | ||
| 91 | \\\\ld_kopano::postfix::verbose: false | ||
| 92 | \\ld_kopano::ldap_type: openldap | ||
| 93 | \\ld_kopano::db_server: mariadb103## | ||
| 94 | ))) | ||
| 95 | |||
| 96 | |||
| 97 | (% style="color:#000000" %)Anpassungen in der (% style="color:#3498db" %)ldhost.yaml(% style="color:#000000" %): | ||
| 98 | Hier wird die Maildomain festgelegt, die Benutzer im Attribut mail unter (% style="color:#3498db" %)/var/lds/user/username/mail(% style="color:#000000" %) im (% style="color:#3498db" %)logosrv (% style="color:#000000" %)erhalten. | ||
| 99 | |||
| 100 | (% class="box" %) | ||
| 101 | ((( | ||
| 102 | (% style="color:#000000; font-family:~"Open Sans~",~"Helvetica Neue~",Helvetica,Arial,sans-serif" %)### Kopano: Definition einer Maildomain (abweichend zu schule.local), die Benutzer & Gruppen im LDAP-Feld 'mail' erhalten sollen##(%%) | ||
| 103 | (% style="color:#000000" %)###ld_legacy::mail::filters: | ||
| 104 | # '(zarafaaccount=1)': 'example.com' | ||
| 105 | # Kopano: Definition von Gruppen, die eine Mailadresse erhalten sollen und dadurch anschreibbar werden | ||
| 106 | ld_legacy::mail::zarafa_groups: | ||
| 107 | - elehrer## | ||
| 108 | ))) | ||
| 109 | |||
| 110 | |||
| 111 | (% style="color:#000000" %)Nun fehlen noch die Anpassungen in der (% style="color:#3498db" %)samba4-ad.yaml(% style="color:#000000" %): | ||
| 112 | Hier kann dem admin die administrativen Rechte zugeteilt. Falls noch andere Benutzer mit administrativen Rechten innerhalb von Kopano vergeben werden sollen, können diese ergänzt werden. | ||
| 113 | |||
| 114 | (% class="box" %) | ||
| 115 | ((( | ||
| 116 | (% style="color:#000000" %)### Kopano: Definition von Benutzern, die administrative Rechte erhalten sollen | ||
| 117 | # (Einstellung wird nicht benutzt, sofern Kopano an das OpenLDAP angebunden ist, was dem Standard entspricht) | ||
| 118 | ld_samba4::ad::kopano::admins: | ||
| 119 | - 'admin'## | ||
| 120 | ))) | ||
| 121 | |||
| 122 | |||
| 123 | Weitere Optimierungen können in folgendem Artikel nachgelesen werden. | ||
| 124 | [[https:~~/~~/kb.logodidact.com/xwiki/bin/view/Main/Kopano/Allgemein/Optimierungen%20von%20Kopano/>>https://kb.logodidact.com/xwiki/bin/view/Main/Kopano/Allgemein/Optimierungen%20von%20Kopano/]] | ||
| 125 | |||
| 126 | |||
| 127 | (% style="color:#000000" %)Damit die Änderungen sauber übernommen werden, fehlt noch ein {{box}}git commit{{/box}} im (% style="color:#3498db" %)Puppeteer(% style="color:#000000" %). | ||
| 128 | |||
| 129 | (% class="box" %) | ||
| 130 | ((( | ||
| 131 | (% style="color:#000000" %)##cd /etc/logodidact/ | ||
| 132 | git add * | ||
| 133 | git commit -am "Kopano für den lokalen Betrieb eingerichtet"## | ||
| 134 | ))) | ||
| 135 | |||
| 136 | |||
| 137 | (% style="color:#000000" %)Führen Sie bitte abschließend noch einen {{box}}prun{{/box}}(%%) in den betreffenden LXC-Containern aus (% style="color:#000000" %)(d.h. in allen Container, die durch Anpassungen in den YAML-Dateien Änderungen erhalten). |