Qmail LDAP Authentication: Difference between revisions

From QmailToaster
Jump to navigation Jump to search
(Created page with "# wget https://raw.githubusercontent.com/qmtoaster/source/main/qldapauth.c # gcc -o qdovauth qdovauth.c # mv qdovauth /home/vpopmail/bin # chown vpopmail:vchkpw /home/vpopmail/bin/qdovauth # chmod 755 /home/vpopmail/bin/qdovauth Add services to Dovecot configuration file service stats { unix_listener stats-reader { user = vpopmail group = vchkpw mode = 0660 } unix_listener stats-writer { user = vpopmail group = vchkpw mode = 0660...")
 
No edit summary
Line 1: Line 1:
# wget https://raw.githubusercontent.com/qmtoaster/source/main/qldapauth.c
To authenticate Qmail Submssion/SMTPS  against Dovecot instead of vpopmail download and compile [[https://raw.githubusercontent.com/qmtoaster/source/main/qdovauth.c this]] file
<pre>
# wget https://raw.githubusercontent.com/qmtoaster/source/main/qdovauth.c
# gcc -o qdovauth qdovauth.c
# gcc -o qdovauth qdovauth.c
# mv qdovauth /home/vpopmail/bin
# mv qdovauth /home/vpopmail/bin
Line 47: Line 49:
or
or
...qdovauth[210722]: passdb: user@domain.tld auth failed:IP:127.0.0.1
...qdovauth[210722]: passdb: user@domain.tld auth failed:IP:127.0.0.1
</pre>

Revision as of 10:41, 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/qdovauth.c
# gcc -o qdovauth qdovauth.c
# mv qdovauth /home/vpopmail/bin
# chown vpopmail:vchkpw /home/vpopmail/bin/qdovauth
# chmod 755 /home/vpopmail/bin/qdovauth

Add services to Dovecot configuration file

service stats {
    unix_listener stats-reader {
    user = vpopmail
    group = vchkpw
    mode = 0660
    }
    unix_listener stats-writer {
    user = vpopmail
    group = vchkpw
    mode = 0660
    }
}

service auth {
   unix_listener auth-qmail {
   mode = 0600
   user = vpopmail
   group = vchkpw
  }
}

# systemctl restart dovecot

Change Submission & SMTPS run files:

#VCHKPW="/home/vpopmail/bin/vchkpw"
VCHKPW="/home/vpopmail/bin/qdovauth"

# qmailctl stop
# qmailctl start

You should be good to go.

Check for success (or failure) in /var/log/maillog, add to run file
export QDOVAUTH_LOG=""


...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