Benutzer-Werkzeuge

Webseiten-Werkzeuge


benno_mailarchiv

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
benno_mailarchiv [2018/08/13 09:10] 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 
  
-Schema: benno.schema +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.
-<code> +
-## Attribute (1.3.6.1.4.1.30259.1.2.1)+
  
-# global attributes 
-attributetype ( 1.3.6.1.4.1.30259.1.2.1.1 NAME 'bennoContainer' 
-    DESC 'Benno Container the user has access to' 
-    EQUALITY caseExactMatch 
-    SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 ) 
  
-# user attributes +=====benno auf eigenem Server===== 
-attributetype ( 1.3.6.1.4.1.30259.1.2.1.2 NAME 'bennoEmailAddress' +Für den Betrieb eines vom Kopan-Server getrennten Benno-Servers ist eine manuelle Anpassung der Postfix-Configuration auf dem Kopano-Server nötig:
-    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' +  ucr set mail/postfix/mastercf/options/smtp/smtpd_milters=inet:benno.domain.lan:22500 
-    DESC 'Role of the user[USER|ADMIN|REVISOR]' +  ucr set mail/postfix/mastercf/options/smtp/milter_default_action=tempfail 
-    EQUALITY caseIgnoreIA5Match +   
-    SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256SINGLE-VALUE)+  ucr set mail/postfix/mastercf/options/smtps/smtpd_milters=inet:benno.domain.lan:22500 
 +  ucr set mail/postfix/mastercf/options/smtps/milter_default_action=tempfail 
 +   
 +  ucr commit /etc/postfix/{main,master}.cf 
 +  systemctl restart postfix
  
-## Objektklassen (1.3.6.1.4.1.30259.1.2.2)+Auf dem Benno Server muss die Datei /etc/defaul/benno-milter wie folgt angepasst werden:
  
-objectclass ( 1.3.6.1.4.1.30259.1.1.2.2 NAME 'BennoMailarchivUser' +SOCKET auskommentieren oder löschen: 
-    DESC 'Per user configuration data of Benno Mailarchiv' SUP top AUXILIARY +  #SOCKET=/var/spool/postfix/benno-milter/benno-milter.sock 
-    MAY  ( bennoContainer $ bennoEmailAddress $ bennoRole ) ) +Einfügen: 
-</code>+  SOCKET_TYPE=inet 
 +  SOCKET=22500@0.0.0.0
  
-Schema anlegen:+:!: benno-milter unterstützt kein IPv6 :!:
  
 +===== LDAP Authentisierung =====
 +/etc/benno-web/ldapauth.conf
 <code> <code>
-export UNIVENTION_APP_IDENTIFIER="Benno MailArchiv" +# 
-. /usr/share/univention-lib/ldap.sh +# LDAP Authentication configuration file 
-ucs_registerLDAPExtension --schema /tmp/bennomailarchiv.schema --packagename BennoMailArchiv --packageversion 1 +# 
-</code>+# This file must be readable by the user of the web server 
 +#
  
-Syntaxfilebenno.py+# LDAP host 
 +
 +# <hostname>:<port> 
 +
 +# Univention UCS + Samba4: <hostname>:7389 
 +
 +host = ucs.domain.lan:7389
  
-<code benno.py> 
-from univention.admin.syntax import select 
  
 +# 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
  
-class bennoRole(select): 
  
- choices = [ +# User id attribute 
- ('USER', 'Benutzer'), +# 
- ('ADMIN', 'Administrator'), +# The attribute which holds the user id for authentication 
- ('REVISOR', 'Revisor'), +# 
- ] +# Windows AD: userattr = sAMAccountName 
-</code>+#userattr = uid
  
-Syntaxfile installieren: +# user rdn 
-<code> +# 
-export UNIVENTION_APP_IDENTIFIER="Benno MailArchiv" +# Authentication will be performed as: $userattr=USERLOGIN,$usersuffix 
-. /usr/share/univention-lib/ldap.sh +# 
-ucs_registerLDAPExtension  --udm_syntax benno.py --packagename BennoMailArchiv --packageversion 1 +# If disabled, a LDAP search operation will be performed to detect the user dn 
-</code>+usersuffix = cn=users,dc=domain,dc=lan
  
-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" \ +## User is allowed to access his own email adresses and 
---set module=users/user \ +## addtional adresses 
---set module=groups/group \ + 
---set objectClass="BennoMailarchivUser" \ +# Email address attribute 
---set ldapMapping="bennoRole" \ +# Univention UCS: mailPrimaryAddress 
---set tabName="Benno Mailarchiv\ +email mailPrimaryAddress 
---set mayChange=1 \ + 
---set multivalue=0 \ +# Email alias attribute 
---set syntax=bennoRole+# 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.1534151423.txt.gz · Zuletzt geändert: 2018/08/13 09:10 von matthias