Changes between Version 2 and Version 3 of LDAP


Ignore:
Timestamp:
01/06/19 17:57:23 (5 years ago)
Author:
admin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • LDAP

    v2 v3  
    2323}}}
    2424Falls sich der user nicht per ssh anmelden können soll -> in ldap.thinkthinkdo.com loginShell auf /bin/false setzen.
     25
     26=== Autoresponder, LDAP, postfix, gnarwl ===
     27Use information stored in LDAP for autoresponder messages.
     28
     29This is using a specific LDAP schema ttdmin.schema (see attachements).
     30==== LDAP ====
     31The user has to belong to to ObjectClass TTDMinAccount.
     32
     33The following attributes are relevant for the vation autoresponder:
     34{{{
     35accountActive (flag if the account is active - has to be true)
     36delete (flag for deleten - has to be FALSE
     37mailAutoreply (the mail address that is used to answer incomming mail - has to be set)
     38vacationActive (flag if the autoresponder is active - has to be TRUE if vacation should be activated)
     39vacationInfo (text in utf-8 encoding that is used to respond)
     40}}}
     41==== gnarwl ====
     42installed from my clone of gnawrl at https://github.com/guhl/gnarwl
     43
     44Config at /etc/gnarwl.cfg
     45{{{
     46map_sender $sender
     47map_receiver $recepient
     48map_subject $subject
     49map_field $begin vacationStart
     50map_field $end vacationEnd
     51map_field $fullname cn
     52map_field $deputy vacationForward
     53map_field $reply mail
     54server localhost
     55port 389
     56scope sub
     57login cn=Manager,dc=thinkthinkdo,dc=com
     58password totally_secret
     59protocol 0
     60base ou=People,dc=thinkthinkdo,dc=com
     61queryfilter (&(mailAutoreply=$recepient)(vacationActive=TRUE))
     62result vacationInfo
     63blockfiles /var/lib/gnarwl/block/
     64umask 0644
     65blockexpire 48
     66mta /usr/sbin/sendmail -F $recepient -t $sender
     67maxreceivers 64
     68maxheader 512
     69charset utf-8
     70badheaders /var/lib/gnarwl/badheaders.db
     71blacklist /var/lib/gnarwl/blacklist.db
     72forceheader /var/lib/gnarwl/header.txt
     73forcefooter /var/lib/gnarwl/footer.txt
     74recvheader To Cc
     75loglevel 3
     76}}}
     77
     78==== postfix ====
     79The principle here is:
     80All messages are BCCed to a gnarwl transport. This is done by adding this to /etc/postfix/main.cf
     81{{{
     82recipient_bcc_maps =
     83        ldap:/etc/postfix/ldap_vacation.cf
     84}}}
     85in /etc/postfix/ldap_vacation.cf
     86{{{
     87server_host = ldap://localhost
     88search_base = ou=People,dc=thinkthinkdo,dc=com
     89version = 3
     90bind = yes
     91start_tls = no
     92bind_dn = cn=Manager,dc=thinkthinkdo,dc=com
     93bind_pw = totally_secret
     94search_base = ou=People,dc=thinkthinkdo,dc=com
     95scope = sub
     96query_filter = (&(&(objectClass=TTDMinAccount)(mail=%s))(vacationActive=TRUE)(accountActive=TRUE)(delete=FALSE))
     97result_attribute = mailAutoreply
     98result_format = %s,%s@autoreply.thinkthinkdo.com
     99expansion_limit = 1
     100}}}
     101This basically adds the @autoreply.thinkthinkdo.com to the mail-addressed that is defined to be used for autoresponding and later used in transport.
     102
     103This transport is defined in /etc/postfix/transport - add:
     104{{{
     105autoreply.thinkthinkdo.com      gnarwl:
     106}}}
     107after adding this use {{{ postmap /etc/postfix/transport }}} to convert this to the db format.
     108
     109In /etc/postfix/main.cf this transport is added by adding the line:
     110{{{
     111transport_maps = hash:/etc/postfix/transport
     112}}}
     113
     114gnawrl itself is added to /etc/postfix/master.cf by adding this:
     115{{{
     116gnarwl    unix  -       n       n       -       -       pipe
     117         flags=F  user=gnarwl argv=/usr/bin/gnarwl -a ${user} -s ${sender}
     118}}}
     119
     120afterwards restart postfix.