Benutzer-Werkzeuge

Webseiten-Werkzeuge


benno_mailarchiv

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Nächste Überarbeitung
Vorhergehende Überarbeitung
benno_mailarchiv [2018/08/13 09:00] – angelegt matthiasbenno_mailarchiv [2019/11/25 18:33] (aktuell) matthias
Zeile 1: Zeile 1:
 ====== benno Mailarchiv ====== ====== benno Mailarchiv ======
  
-Siehe: 
  
  
-https://wiki.benno-mailarchiv.de/doku.php/konfigurationsbeispiele:univention:schemaerweiterung+=====Integration in die Univention Managemnt Console (Web UI)=====
  
 +https://github.com/mahescho/benno4ucs
  
-https://wiki.benno-mailarchiv.de/doku.php/konfigurationsbeispiele:univention:erweiterte_attribute 
  
 +Vereinfacht die etwas komplizierte Aktion wie hier beschrieben [[https://wiki.benno-mailarchiv.de/doku.php/konfigurationsbeispiele:univention:schemaerweiterung|1]] | [[https://wiki.benno-mailarchiv.de/doku.php/konfigurationsbeispiele:univention:erweiterte_attribute |2]] auf das ausführen eines Scripts.
  
-Schema: 
  
-<code benno.schema> +=====benno auf eigenem Server===== 
-## Attribute (1.3.6.1.4.1.30259.1.2.1)+Für den Betrieb eines vom Kopan-Server getrennten Benno-Servers ist eine manuelle Anpassung der Postfix-Configuration auf dem Kopano-Server nötig:
  
-# global attributes +  ucr set mail/postfix/mastercf/options/smtp/smtpd_milters=inet:benno.domain.lan:22500 
-attributetype ( 1.3.6.1.4.1.30259.1.2.1.1 NAME 'bennoContainer' +  ucr set mail/postfix/mastercf/options/smtp/milter_default_action=tempfail 
-    DESC 'Benno Container the user has access to' +   
-    EQUALITY caseExactMatch +  ucr set mail/postfix/mastercf/options/smtps/smtpd_milters=inet:benno.domain.lan:22500 
-    SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )+  ucr set mail/postfix/mastercf/options/smtps/milter_default_action=tempfail 
 +   
 +  ucr commit /etc/postfix/{main,master}.cf 
 +  systemctl restart postfix
  
-# user attributes +Auf dem Benno Server muss die Datei /etc/defaul/benno-milter wie folgt angepasst werden:
-attributetype ( 1.3.6.1.4.1.30259.1.2.1.2 NAME 'bennoEmailAddress' +
-    DESC 'Additional E-Mail addresses that could be searched by user' +
-    EQUALITY caseIgnoreIA5Match +
-    SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )+
  
-attributetype ( 1.3.6.1.4.1.30259.1.2.1.3 NAME 'bennoRole' +SOCKET auskommentieren oder löschen: 
-    DESC 'Role of the user[USER|ADMIN|REVISOR]' +  #SOCKET=/var/spool/postfix/benno-milter/benno-milter.sock 
-    EQUALITY caseIgnoreIA5Match +Einfügen
-    SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} SINGLE-VALUE)+  SOCKET_TYPE=inet 
 +  SOCKET=22500@0.0.0.0
  
-## Objektklassen (1.3.6.1.4.1.30259.1.2.2)+:!: benno-milter unterstützt kein IPv6 :!:
  
-objectclass ( 1.3.6.1.4.1.30259.1.1.2.2 NAME 'BennoMailarchivUser' +===== LDAP Authentisierung ===== 
-    DESC 'Per user configuration data of Benno Mailarchiv' SUP top AUXILIARY +/etc/benno-web/ldapauth.conf 
-    MAY  ( bennoContainer $ bennoEmailAddress $ bennoRole ) ) +<code> 
-</code>+
 +# LDAP Authentication configuration file 
 +
 +# This file must be readable by the user of the web server 
 +#
  
-Schema anlegen:+# LDAP host 
 +
 +# <hostname>:<port> 
 +
 +# Univention UCS + Samba4: <hostname>:7389 
 +
 +host = ucs.domain.lan:7389
  
-<code> 
-export UNIVENTION_APP_IDENTIFIER="Benno MailArchiv" 
-. /usr/share/univention-lib/ldap.sh 
-ucs_registerLDAPExtension --schema /tmp/bennomailarchiv.schema --packagename BennoMailArchiv --packageversion 1 
-</code> 
  
-Syntax File:+# LDAP base dn 
 +
 +# Base dn of the ldap directory, the bind dn will be determined by a search 
 +
 +# request the user uid 
 +
 +basedn = dc=domain,dc=lan
  
-<code benno.py> 
-from univention.admin.syntax import select 
  
 +# User id attribute
 +#
 +# The attribute which holds the user id for authentication
 +#
 +# Windows AD: userattr = sAMAccountName
 +#userattr = uid
  
-class bennoRole(select):+# user rdn 
 +
 +# Authentication will be performed as$userattr=USERLOGIN,$usersuffix 
 +
 +# If disabled, a LDAP search operation will be performed to detect the user dn 
 +usersuffix = cn=users,dc=domain,dc=lan
  
- choices = [ 
- ('USER', 'Benutzer'), 
- ('ADMIN', 'Administrator'), 
- ('REVISOR', 'Revisor'), 
- ] 
-</code> 
-GUI-Attribute anlegen: 
-<code> 
-eval "$(univention-config-registry shell)" 
  
-univention-directory-manager settings/extended_attribute create \ +# User objectclas 
---position="cn=custom attributes,cn=univention,$ldap_base" \ +# 
---set name="bennoContainer" \ +# Objectclass of user object 
---set CLIName="bennoContainer" \ +# 
---set shortDescription="benno Container auf den der Benuzter Zugriff hat" \ +# Windows AD: objectclass = user 
---set module=users/user +objectclass posixAccount
---set module=groups/group \ +
---set objectClass="BennoMailarchivUser"+
---set ldapMapping="bennoContainer"+
---set tabName="Benno Mailarchiv"+
---set mayChange=1 \ +
---set multivalue=1 \ +
---set syntax=string+
  
-univention-directory-manager settings/extended_attribute create \ +# Encrypt LDAP connection with TLS if set to "true
---position="cn=custom attributes,cn=univention,$ldap_base"+tls true
---set name="bennoEmailAddress\ +
---set CLIName="bennoEmailAddress"+
---set shortDescription="benno Adressliste für Zugriffssteuerung"+
---set module=users/user \ +
---set module=groups/group \ +
---set objectClass="BennoMailarchivUser"+
---set ldapMapping="bennoEmailAddress"+
---set tabName="Benno Mailarchiv"+
---set mayChange=1 \ +
---set multivalue=1 \ +
---set syntax=string+
  
 +# DN to bind for search requests
 +#
 +# Dn of an user with permissions to search at the ldap tree.
 +# Enable if anonymous search is not permitted!
 +#
 +# Windows AD: binddn = <username>@<windows-domain>
 +#binddn =
  
-univention-directory-manager settings/extended_attribute create \ +# Password of the admin user 
---position="cn=custom attributes,cn=univention,$ldap_base"+# 
---set name="bennoRole"+#password 
---set CLIName="bennoRole"+
---set shortDescription="benno Rolle" \ +
---set module=users/user \ +
---set module=groups/group \ +
---set objectClass="BennoMailarchivUser"+
---set ldapMapping="bennoRole"+
---set tabName="Benno Mailarchiv"+
---set mayChange=1 \ +
---set multivalue=0 \ +
---set syntax=bennoRole+
  
-ucs_registerLDAPExtension  --udm_syntax benno.py --packagename BennoMailArchiv --packageversion 1+## User is allowed to access his own email adresses and 
 +## addtional adresses 
 + 
 +# Email address attribute 
 +# Univention UCS: mailPrimaryAddress 
 +email = mailPrimaryAddress 
 + 
 +# Email alias attribute 
 +# Windows AD: proxyAddress | proxyAddresses 
 +# Univention UCS: mailAlternativeAddress 
 +alias = mailAlternativeAddress,bennoEmailAddress 
 + 
 +# Allow access to additional email addresses 
 +addemail = bennoEmailAddress 
 + 
 + 
 +# Benno role attribute 
 +role = bennoRole 
 + 
 +# Benno container name attribute 
 +container = bennoContainer 
 + 
 +# Default container (if containerattr not set in LDAP) 
 +default_container = BennoContainer 
 + 
 +# Username who will always assigned the admin role 
 +adminuser = Administrator 
 + 
 + 
 +# remove domain from username during authentication if set to "true" 
 +#remove_domainsuffix = true
 </code> </code>
 +
 +LDAP-Modul aktivieren:
 +
 +  cd /etc/benno-web/auth.d/
 +  ln -s /usr/lib/benno-web/benno_ldapauth .
 +
 +Die Datei /etc/benno-web/benno.conf muss um folgende Zeile ergänzt werden
 +
 +  EXTERNAL_AUTH = /usr/sbin/benno_auth.d
 +
 +===== Mailadressen ausschliessen und Kopano =====
 +
 +Für das Filtern von Mails in Benno sind nur die Evnelope-Adressen sinnvolles Ziel. Postfix kann X-Original-To Headere einfügen. Per Default ist das aber mit Kopano am UCS nicht so. Dazu müssen folgende Anpassungen vorgenommen werden:
 +
 +/etc/postfix/master.cf.local
 +  kopano unix  -                         10      pipe flags=ODRhu user=kopano argv=/usr/sbin/kopano-dagent -R ${recipient}
 +
 +/etc/postfix/main.cf.local
 +  kopano_destination_recipient_limit = 1
 +
 +Aktivieren:
 +  ucr set mail/postfix/virtual/transport=kopano
 +  ucr commit /etc/postfix/{main,master}.cf
 +  systemctl restart postfix
 +
 +[[https://help.univention.com/t/x-original-to-fehlt-im-header-jeder-mail/9172/2|Quelle]]
 +
 +Dann noch auf dem Benno Server der Datei /etc/benno/benno.xml in der Section <mailfile> <recipientheaders> die folgende Zeile einfügen:
 +
 +  <name>X-Original-To</name>
 +
 +=====Kopano Plugin installieren=====
 +
 +  echo "deb https://www.benno-mailarchiv.de/download/debian /" > /etc/apt/sources.list.d/benno.list
 +  wget -O - https://www.benno-mailarchiv.de/download/debian/benno.asc | apt-key add -
 +  apt update
 +  apt install benno-kopano-webapp-plugin
 +
benno_mailarchiv.1534150842.txt.gz · Zuletzt geändert: 2018/08/13 09:00 von matthias