{"id":204,"date":"2019-07-11T21:11:25","date_gmt":"2019-07-11T21:11:25","guid":{"rendered":"https:\/\/www.huerter.me\/?p=204"},"modified":"2020-01-21T19:53:15","modified_gmt":"2020-01-21T19:53:15","slug":"howto-setup-kopano-mit-debian-10-buster","status":"publish","type":"post","link":"https:\/\/www.huerter.me\/index.php\/2019\/07\/11\/howto-setup-kopano-mit-debian-10-buster\/","title":{"rendered":"HowTo: Setup Kopano mit Debian 10 (Buster)"},"content":{"rendered":"<h2>Vorwort:<\/h2>\n<p>Ankn\u00fcpfen an das alte manuelle HowTo f\u00fcr Kopano\u00a0 unter Debian 9 gibt es nun eine Update in Form von Debian 10 und einer Installation mittels Paketmanager.<\/p>\n<h2>Voraussetzungen:<\/h2>\n<p>Installiertes und lauff\u00e4higes Debian 10<\/p>\n<p>Es ist nicht notwendig weitere externe Repositories zu erg\u00e4nzen, da Kopano bereits im Debian Repo mit enthalten ist. Dank der Pakete kommen die meisten (nicht alle) Abh\u00e4ngigkeiten automatisch mit und man muss nicht mehr manuell auf eine gewisse Reihenfolge achten.<\/p>\n<h2>Die Installation:<\/h2>\n<p>Sicherheitshalber Updates installieren, sofern vorhanden<\/p>\n<pre class=\"lang:bash\">root@mail:~# apt-get update &amp; apt-get dist-upgrade -V<\/pre>\n<p>Installation Kopano Pakete als Basis. Alle notwendigen Abh\u00e4ngigkeiten werden installiert. Man kann auch statt dem Nginx alternativ Apache oder Lighthttpd verwenden.<\/p>\n<pre class=\"lang:bash\">root@mail2:~# apt-get install kopano-core kopano-webapp-nginx<\/pre>\n<p>W\u00e4hrend der Installation muss man ein Kennwort f\u00fcr den MySQL Server angeben sowie best\u00e4tigen:<\/p>\n<p><a href=\"https:\/\/www.huerter.me\/wp-content\/uploads\/2019\/07\/1.png\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-206 aligncenter\" src=\"https:\/\/www.huerter.me\/wp-content\/uploads\/2019\/07\/1.png\" alt=\"\" width=\"651\" height=\"251\" srcset=\"https:\/\/www.huerter.me\/wp-content\/uploads\/2019\/07\/1.png 1702w, https:\/\/www.huerter.me\/wp-content\/uploads\/2019\/07\/1-300x116.png 300w, https:\/\/www.huerter.me\/wp-content\/uploads\/2019\/07\/1-768x296.png 768w, https:\/\/www.huerter.me\/wp-content\/uploads\/2019\/07\/1-1024x395.png 1024w, https:\/\/www.huerter.me\/wp-content\/uploads\/2019\/07\/1-656x253.png 656w\" sizes=\"auto, (max-width: 651px) 100vw, 651px\" \/><\/a><\/p>\n<p>Im n\u00e4chsten Schritt wird ein erster Admin-User erstellt. Dank CLI Tools sehr einfach:<\/p>\n<pre class=\"lang:bash\">root@mail2:~# kopano-admin -c thuerter -p %passwort% -e tim@mail2.huerter.me -f \"Tim Huerter\" -a1\r\nUser created.<\/pre>\n<p>Update: Bei einem zweiten Test zwischenzeitlich muss man eine neue SSH Sitzung er\u00f6ffnen bzw. die Umgebung neuladen, da der Befehl &#8222;kopano-admin&#8220; ansonsten mit &#8222;command not found&#8220; fehlschl\u00e4gt.<\/p>\n<p>&nbsp;<\/p>\n<p>Die Webseite kann nun per https:%servername% aufgerufen werden. Jedoch wird es einen Fehler beim Login geben in Form von &#8222;Unknown MAPI Error: MAPI_E_NOT_FOUND&#8220;<\/p>\n<p>&nbsp;<\/p>\n<p>Der genannte Fehler resultiert aus einem fehlenden Datenstore f\u00fcr den User.<\/p>\n<p>Pr\u00fcfen ob ein User einen Store hat:<\/p>\n<pre class=\"lang:bash\">root@mail2:~# kopano-cli --list-orphans\r\nStores without users:\r\nStore guid                       Username             Last login       Store size       Store type\r\n--------------------------------------------------------------------------------------------------------\r\nUsers without stores (1):\r\nUser             Full Name            Homeserver\r\n----------------------------------------------------------\r\nthuerter        Tim Huerter           Unknown<\/pre>\n<p>Erstellen eines globalen Stores:<\/p>\n<pre class=\"lang:bash\">root@mail2:~# kopano-cli --create-store<\/pre>\n<p>Erstellen eines User-Stores:<\/p>\n<pre class=\"lang:bash\">root@mail2:~# kopano-cli --create-store -u thuerter<\/pre>\n<p>Erneute Store-Pr\u00fcfung:<\/p>\n<pre class=\"lang:bash\">root@mail2:~# kopano-cli --list-orphans\r\nStores without users:\r\nStore guid                       Username             Last login       Store size       Store type\r\n--------------------------------------------------------------------------------------------------------\r\nUsers without stores (0):\r\nUser             Full Name            Homeserver\r\n----------------------------------------------------------<\/pre>\n<p>&nbsp;<\/p>\n<p>Update: Die &#8222;default&#8220; nginx Konfiguration sollte deaktiviert werden per &#8222;rm -f \/etc\/nginx\/sites-enabled\/default&#8220;, der Nginx sollte per &#8222;systemctl restart nginx&#8220; neugestartet werden.<\/p>\n<p>Nun kann man sich unter https:\/\/server-name und dem zuvor erstellten User einloggen.<\/p>\n<p><a href=\"https:\/\/www.huerter.me\/wp-content\/uploads\/2019\/07\/2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-207\" src=\"https:\/\/www.huerter.me\/wp-content\/uploads\/2019\/07\/2.png\" alt=\"\" width=\"1167\" height=\"716\" srcset=\"https:\/\/www.huerter.me\/wp-content\/uploads\/2019\/07\/2.png 1167w, https:\/\/www.huerter.me\/wp-content\/uploads\/2019\/07\/2-300x184.png 300w, https:\/\/www.huerter.me\/wp-content\/uploads\/2019\/07\/2-768x471.png 768w, https:\/\/www.huerter.me\/wp-content\/uploads\/2019\/07\/2-1024x628.png 1024w, https:\/\/www.huerter.me\/wp-content\/uploads\/2019\/07\/2-656x402.png 656w\" sizes=\"auto, (max-width: 1167px) 100vw, 1167px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.huerter.me\/wp-content\/uploads\/2019\/07\/3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-208\" src=\"https:\/\/www.huerter.me\/wp-content\/uploads\/2019\/07\/3.png\" alt=\"\" width=\"1282\" height=\"580\" srcset=\"https:\/\/www.huerter.me\/wp-content\/uploads\/2019\/07\/3.png 1282w, https:\/\/www.huerter.me\/wp-content\/uploads\/2019\/07\/3-300x136.png 300w, https:\/\/www.huerter.me\/wp-content\/uploads\/2019\/07\/3-768x347.png 768w, https:\/\/www.huerter.me\/wp-content\/uploads\/2019\/07\/3-1024x463.png 1024w, https:\/\/www.huerter.me\/wp-content\/uploads\/2019\/07\/3-656x297.png 656w\" sizes=\"auto, (max-width: 1282px) 100vw, 1282px\" \/><\/a><\/p>\n<p><strong>Hinweis: Eine automatisch Weiterleitung von http auf https existiert nicht!<\/strong><\/p>\n<p>Nun ist Kopano grundinstalliert jedoch nicht nicht nutzbaz, da man weder Mails versenden noch empfangen kann. Hierf\u00fcr wird ein MTA ben\u00f6tigt.<\/p>\n<p>Installation MTA (Mailserver) in Form von Postfix inklusive MySQL Anbindung<\/p>\n<pre class=\"lang:bash\">root@mail2:~# apt-get install postfix postfix-mysql<\/pre>\n<p><a href=\"https:\/\/www.huerter.me\/wp-content\/uploads\/2019\/07\/4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-209\" src=\"https:\/\/www.huerter.me\/wp-content\/uploads\/2019\/07\/4.png\" alt=\"\" width=\"659\" height=\"452\" srcset=\"https:\/\/www.huerter.me\/wp-content\/uploads\/2019\/07\/4.png 659w, https:\/\/www.huerter.me\/wp-content\/uploads\/2019\/07\/4-300x206.png 300w, https:\/\/www.huerter.me\/wp-content\/uploads\/2019\/07\/4-656x450.png 656w\" sizes=\"auto, (max-width: 659px) 100vw, 659px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.huerter.me\/wp-content\/uploads\/2019\/07\/5.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-210\" src=\"https:\/\/www.huerter.me\/wp-content\/uploads\/2019\/07\/5.png\" alt=\"\" width=\"1225\" height=\"430\" srcset=\"https:\/\/www.huerter.me\/wp-content\/uploads\/2019\/07\/5.png 1225w, https:\/\/www.huerter.me\/wp-content\/uploads\/2019\/07\/5-300x105.png 300w, https:\/\/www.huerter.me\/wp-content\/uploads\/2019\/07\/5-768x270.png 768w, https:\/\/www.huerter.me\/wp-content\/uploads\/2019\/07\/5-1024x359.png 1024w, https:\/\/www.huerter.me\/wp-content\/uploads\/2019\/07\/5-656x230.png 656w\" sizes=\"auto, (max-width: 1225px) 100vw, 1225px\" \/><\/a><\/p>\n<p>Meine \/etc\/postfix\/main.cf habe ich um folgende Parameter erweitert:<\/p>\n<p><em>#Kopano Custom<\/em><br \/>\n<em>virtual_alias_maps = hash:\/etc\/postfix\/virtual # Aliase\/Weiterleitungen f\u00fcr Postf\u00e4cher<\/em><br \/>\n<em>virtual_mailbox_maps = mysql:\/etc\/postfix\/mysql-users.cf # Auslesen vorhandener Postf\u00e4cher<\/em><br \/>\n<em>virtual_transport = lmtp:127.0.0.1:2003 # Weiterleiten der Mail an Dagent f\u00fcr die Zustellung an das Postfach<\/em><br \/>\n<em>virtual_mailbox_domains = mail2.huerter.me # Berechtigte Empfangs-Domains<\/em><\/p>\n<p><em>smtpd_recipient_restrictions = permit_mynetworks,<\/em><br \/>\n<em>reject_non_fqdn_recipient,<\/em><br \/>\n<em>reject_non_fqdn_hostname,<\/em><br \/>\n<em>reject_invalid_hostname,<\/em><br \/>\n<em>reject_non_fqdn_recipient,<\/em><br \/>\n<em>reject_non_fqdn_sender,<\/em><br \/>\n<em>reject_unauth_pipelining,<\/em><br \/>\n<em>reject_unverified_recipient<\/em><\/p>\n<p>&nbsp;<\/p>\n<p>Inhalt &#8222;\/etc\/postfix\/virtual&#8220; f\u00fcr Weiterleitungen:<\/p>\n<pre class=\"lang:bash\">#ALIAS  E-MAIL\r\nkontakt@mail2.huerter.me      tim@mail2.huerter.me<\/pre>\n<p>Damit Postfix sich auch verbinden zum Auslesenn der Benutzer, erstellen wir noch die passende MySQL-Berechtigung:<\/p>\n<pre class=\"lang:bash\">root@mail2:\/etc\/postfix# mysql -u root<\/pre>\n<p>Der Login ohne Passwort ist m\u00f6glich, da die UNIX Socket Authentisierung genutzt wird.<\/p>\n<pre class=\"lang:bash\">MariaDB [(none)]&gt; GRANT ALL PRIVILEGES ON kopanoserver.* TO 'kopano'@'localhost' IDENTIFIED BY '%mein-passwort%' WITH GRANT OPTION;\r\nMariaDB [(none)]&gt; flush privileges;<\/pre>\n<p>Inhalt &#8222;\/etc\/postfix\/mysql-users.cf&#8220; f\u00fcr die Pr\u00fcfung, ob der Empf\u00e4nger \u00fcberhaupt existiert:<\/p>\n<pre class=\"lang:bash\">user = kopano\r\npassword = %mein-passwort%\r\nhosts = 127.0.0.1\r\ndbname = kopanoserver\r\nquery = SELECT value FROM objectproperty where propname = 'emailaddress' and value = '%s';<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Umwandeln der Map Dateien in ein lesbares Format f\u00fcr Postfix sowie Neustart des Dienstes<\/p>\n<pre class=\"lang:bash\">root@mail2:\/etc\/postfix# chmod 600 \/etc\/postfix\/mysql-users.cf\r\nroot@mail2:\/etc\/postfix# postmap \/etc\/postfix\/mysql-users.cf\r\nroot@mail2:\/etc\/postfix# postmap \/etc\/postfix\/virtual<\/pre>\n<p>Optional k\u00f6nnen noch WebApps installiert werden<\/p>\n<pre class=\"lang:bash\">root@mail:~# apt-get install kopano-webapp-contactfax kopano-webapp-gmaps kopano-webapp-pimfolder kopano-webapp-quickitems kopano-webapp-titlecounter kopano-webapp-webappmanual kopano-webapp-zdeveloper kopano-webapp-files<\/pre>\n<p>&nbsp;<\/p>\n<p>Update\/Zwischenstand: Z-Push und andere Anpassungen fehlen wohl in den bereitgestellten Paketen f\u00fcr nginx statt apache2&#8230; Mittels apache2 fehlt lediglich die Anbindung per IMAP\/POP3 welche einige Schwierigkeiten bereith\u00e4lt&#8230;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Vorwort: Ankn\u00fcpfen an das alte manuelle HowTo f\u00fcr Kopano\u00a0 unter Debian 9 gibt es nun eine Update in Form von Debian 10 und einer Installation mittels Paketmanager. Voraussetzungen: Installiertes und lauff\u00e4higes Debian 10 Es ist nicht notwendig weitere externe Repositories zu erg\u00e4nzen, da Kopano bereits im Debian Repo mit enthalten ist. Dank der Pakete kommen [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-204","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.huerter.me\/index.php\/wp-json\/wp\/v2\/posts\/204","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.huerter.me\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.huerter.me\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.huerter.me\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.huerter.me\/index.php\/wp-json\/wp\/v2\/comments?post=204"}],"version-history":[{"count":8,"href":"https:\/\/www.huerter.me\/index.php\/wp-json\/wp\/v2\/posts\/204\/revisions"}],"predecessor-version":[{"id":225,"href":"https:\/\/www.huerter.me\/index.php\/wp-json\/wp\/v2\/posts\/204\/revisions\/225"}],"wp:attachment":[{"href":"https:\/\/www.huerter.me\/index.php\/wp-json\/wp\/v2\/media?parent=204"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.huerter.me\/index.php\/wp-json\/wp\/v2\/categories?post=204"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.huerter.me\/index.php\/wp-json\/wp\/v2\/tags?post=204"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}