OPNsense Forum

International Forums => German - Deutsch => Topic started by: jd7 on July 16, 2020, 01:58:40 PM

Title: Postfix / ldap
Post by: jd7 on July 16, 2020, 01:58:40 PM
Hallo,

ich versuche gerade Postfix als Mail-Gateway für einen Exchange Server zu konfigurieren. Hierzu soll postfix über das ActiveDirectory prüfen, ob der Empfänger bekannt ist. Dazu habe ich verschiedene Anleitungen gefunden, wie man das machen kann. Leider funktioniert die Abfrage über LDAP nicht, stattdessen bekomme ich die Fehlermeldung "postmap: fatal: unsupported dictionary type: ldap". Kann es sein, dass ldap nicht "reinkompiliert" ist? Ich verwende die aktuelle Version (20.1) von opnsense. Danke im Voraus.

Gruß Jochen
Title: Re: Postfix / ldap
Post by: mimugmail on July 16, 2020, 03:40:20 PM
Nein, das gibt das Paket nicht her.
Title: Re: Postfix / ldap
Post by: jd7 on July 16, 2020, 05:40:55 PM
Ich bin ein Opnsense Neuling. Gibt es eine gute Anleitung, wie man solche Plugins entwickelt bzw. erweitert? Ich würde meine "Verbesserung" gerne allen zur Verfügung stellen. Oder ist das ein Feature was man bewusst nicht unterstützen will, weil es die Sicherheit von Opnsense negativ beeinflusst?
Title: Re: Postfix / ldap
Post by: mimugmail on July 16, 2020, 06:40:01 PM
Dazu bräuchten wir erst Mal das LDAP Paket von Postfix. Erweiterung sollte nicht so ein Drama sein. Stell mal Feature request in GitHub rein
Title: Re: Postfix / ldap
Post by: jd7 on July 17, 2020, 08:35:54 AM
OK. Werde ich machen.

Im Prinzip müsste dann in main.cf der Eintrag

relay_recipient_maps = ldap:/etc/postfix/ldap_relay_recipient_maps.cf

hinzugefügt werden und dann in dieser Datei folgende Parameter aus meiner Sicht gesetzt werden.

server_host = ad-01.example.com
              ad-02.example.com
search_base = dc=example, dc=com
version = 3

bind_dn = CN=postfix,CN=Users,DC=example,DC=com
bind_pw = password

query_filter = (proxyAddresses=smtp:%s)
result_attribute = mail
Title: Re: Postfix / ldap
Post by: jd7 on July 17, 2020, 08:49:03 AM
Ich habe hierzu ein Ticket angelegt: https://github.com/opnsense/plugins/issues/1926
Title: Re: Postfix / ldap
Post by: jd7 on July 21, 2020, 09:36:31 AM
Kann mir jemand einen Tip geben, wie man Plugins entwickelt bzw. bestehende Plugins erweitern kann? Ein Hinweis auf ein Tutorial würde mir sehr helfen. Vielen Dank im Voraus.
Title: Re: Postfix / ldap
Post by: micneu on July 21, 2020, 10:40:00 AM
google ist dein freund:
https://docs.opnsense.org/development/examples/helloworld.html
Title: Re: Postfix / ldap
Post by: mimugmail on July 21, 2020, 10:44:10 AM
Quote from: jd7 on July 21, 2020, 09:36:31 AM
Kann mir jemand einen Tip geben, wie man Plugins entwickelt bzw. bestehende Plugins erweitern kann? Ein Hinweis auf ein Tutorial würde mir sehr helfen. Vielen Dank im Voraus.

https://www.routerperformance.net/opnsense/plugin-development/

Oder du schaust dir alte commits an die ähnlich gelaufen sind:
https://github.com/opnsense/plugins/pull/1406