Qmail LDAP Authentication: Difference between revisions

From QmailToaster
Jump to navigation Jump to search
No edit summary
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Configuration#Qmail_LDAP_Authentication | 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
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>
<pre>
Line 12: Line 13:
#VCHKPW="/home/vpopmail/bin/vchkpw"
#VCHKPW="/home/vpopmail/bin/vchkpw"
VCHKPW="/home/vpopmail/bin/qldapauth"
VCHKPW="/home/vpopmail/bin/qldapauth"
export LDAP_HOST="192.168.1.x"
export LDAP_PORT=389


# qmailctl stop
# qmailctl stop
# qmailctl start
# qmailctl start


You should be good to go.
Check for success (or failure) in /var/log/maillog.
 
Check for success (or failure) in /var/log/maillog, add to run file
export LDAP_HOST="192.168.1.x"
export LDAP_PORT=389
 


...qldapauth[246984]: Auth succeded for: administrator@roosmem.org:192.168.1.x
...qldapauth[246984]: Auth succeded for: administrator@roosmem.org:192.168.1.x

Latest revision as of 20:44, 24 April 2024

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@roosmem.org:192.168.1.x
or
...qldapauth[246984]: Auth failed for: administrator@roosmem.org:192.168.1.x