Qmail Active Directory Authentication

From QmailToaster
Revision as of 08:03, 2 November 2024 by Ebroch (talk | contribs) (Created page with " Back<br> To authenticate Qmail Submssion/SMTPS against LDAP server instead of vpopmail download and compile https://github.com/qmtoaster/source/blob/main/qldapauth.c this file <pre> # wget https://raw.githubusercontent.com/qmtoaster/source/main/qldapauth.c # dnf install openldap-devel # g++ -o qldapauth qldapauth.cpp -lldap # mv qldapauth /home/vpopmail/bin # chown vpopmail:vchkpw /home/vpopmail/bin/qldapauth # chmod 755...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Back
To authenticate Qmail Submssion/SMTPS against LDAP server instead of vpopmail download and compile [this] file

# wget https://raw.githubusercontent.com/qmtoaster/source/main/qldapauth.c
# dnf install openldap-devel
# g++ -o qldapauth qldapauth.cpp -lldap
# mv qldapauth /home/vpopmail/bin
# chown vpopmail:vchkpw /home/vpopmail/bin/qldapauth
# chmod 755 /home/vpopmail/bin/qldapauth

Change Submission & SMTPS run files:

#VCHKPW="/home/vpopmail/bin/vchkpw"
VCHKPW="/home/vpopmail/bin/qldapauth"
export LDAP_HOST="192.168.1.x"
export LDAP_PORT=389

# qmailctl stop
# qmailctl start

Check for success (or failure) in /var/log/maillog.

...qldapauth[246984]: Auth succeded for: administrator@domain.tld:192.168.1.x
or
...qldapauth[246984]: Auth failed for: administrator@domain.tld:192.168.1.x

*Email Client: Connection Security:   SSL/TLS
               Authentication Method: Normal Password