Qmail LDAP Authentication: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
To authenticate Qmail Submssion/SMTPS against Dovecot instead of vpopmail download and compile [[https:// | To authenticate Qmail Submssion/SMTPS against Dovecot instead of vpopmail download and compile [[https://github.com/qmtoaster/source/blob/main/qldapauth.c this]] file | ||
<pre> | <pre> | ||
# wget https://raw.githubusercontent.com/qmtoaster/source/main/ | # wget https://raw.githubusercontent.com/qmtoaster/source/main/qldapauth.c | ||
# | # dnf install openldap-devel | ||
# mv | # g++ -o qldapauth qldapauth.cpp -lldap | ||
# chown vpopmail:vchkpw /home/vpopmail/bin/ | # mv qldapauth /home/vpopmail/bin | ||
# chmod 755 /home/vpopmail/bin/ | # chown vpopmail:vchkpw /home/vpopmail/bin/qldapauth | ||
# chmod 755 /home/vpopmail/bin/qldapauth | |||
# systemctl restart dovecot | # systemctl restart dovecot | ||
Line 35: | Line 13: | ||
#VCHKPW="/home/vpopmail/bin/vchkpw" | #VCHKPW="/home/vpopmail/bin/vchkpw" | ||
VCHKPW="/home/vpopmail/bin/ | VCHKPW="/home/vpopmail/bin/qldapauth" | ||
# qmailctl stop | # qmailctl stop | ||
Line 43: | Line 21: | ||
Check for success (or failure) in /var/log/maillog, add to run file | Check for success (or failure) in /var/log/maillog, add to run file | ||
export | export LDAP_HOST="192.168.1.x" | ||
export LDAP_PORT=389 | |||
Revision as of 10:45, 14 April 2024
To authenticate Qmail Submssion/SMTPS against Dovecot 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 # systemctl restart dovecot Change Submission & SMTPS run files: #VCHKPW="/home/vpopmail/bin/vchkpw" VCHKPW="/home/vpopmail/bin/qldapauth" # qmailctl stop # qmailctl start You should be good to go. Check for success (or failure) in /var/log/maillog, add to run file export LDAP_HOST="192.168.1.x" export LDAP_PORT=389 ...qdovauth[210722]: passdb: user@domain.tld auth succeeded:IP:127.0.0.1 or ...qdovauth[210722]: passdb: user@domain.tld auth failed:IP:127.0.0.1