Skip to content

Use courier-imap to auth for postfix with encrypted passowords in mysql #14

@dkounal

Description

@dkounal

Hi,
I used your postfix howto but sasl sucks with encrypted passwords from mysql and postfix.admin.
Based on information in the following pages:
https://www.brandonchecketts.com/archives/configuring-postfix-sasl-to-authenticate-against-courier-authlib
https://www.thelazysysadmin.net/2009/08/cannot-connect-to-courier-authdaemond-no-such-file-or-directory/
https://askubuntu.com/questions/303120/how-folders-created-in-var-run-on-each-reboot
I used courier-imap to do the authentication, and it needs:
a) as my postfix is chroot we should move the socket of the courier-authdaemon (courier should be shutdown):
mkdir -p /var/spool/postfix/var/run/courier/authdaemon
rm -rf /run/courier/authdaemon
ln -s /var/spool/postfix/var/run/courier/authdaemon /run/courier/authdaemon
b) use the following contents in smatpd.conf in /etc/postfix/sasl
pwcheck_method: authdaemond
mech_list: PLAIN LOGIN
authdaemond_path: /var/run/courier/authdaemon/socket
c) as /run is recreated in each reboot, we should ask the system to recreate the symlink by adding the following line in file eg courier-authdaemon.conf in /etc/tmpfiles.d/:
L+ /run/courier/authdaemon - - - - /var/spool/postfix/var/run/courier/authdaemon

Postfix now can use courier-IMAP for authentication the smtp clients

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions