Courier-authdaemon and authpam

hjheins via courier-users <[email protected]> Fri, 22 Nov 2024 14:27:02 +0000
Newsgroups gmane.mail.imap.courier.general
Message-ID <bTjBnyDCgGgcVgLrV-wA4X814Xi1M4h_WcdwpbzpjWRo83j7-PzOD0Edm07vjX8CEeSx0iH7Q_ckTmck-ADbbZjys1FrrlfHzBoljnIk1bw=@proton.me>
Apologies for spamming the list, something went wrong when I sent the mail.

The issue:
I have a setup running Arch Linux with courier-imap and courier-authd for accessing the mailboxes on the mailserver. This works, but the authorisation runs over authshadow. As that is not the preferred way, I tried to get this running over authpam.
For this I followed the guide at: https://www.courier-mta.org/authlib/README_authlib.html#authpam
and I changed the settings to "include system-auth" to make it fit for my system.

This doesn't work, and throws authentication failures.

The reason this doesn't work seems to be that authpam expects the requesting process to run as root. Courier-* is running as user "courier". so this wil not work according to the pam documentation: https://www.kilala.nl/index.php?id=2485

I looked for a way to solve this, and found pam-sss, which seems to be able to act as a proxy between the service (courier-authdaemon) and pam.
I set it up according to: https://wiki.archlinux.org/title/SSSD but I am running it as user "sssd" and not as root as in the article, as that seems to be superseded by now.

pam-sss seems to work however when I try to connetc to a mailbox with a know user + password, I get the following error:

imapd[31562]: LOGIN, user=<username>, ip=[<ip>], port=[<port>], protocol=IMAP
authdaemond[1086]: pam_sss(imap:auth): authentication failure; logname= uid=<uid> euid=<euid> tty= ruser= rhost=<rhost> user=<username>
authdaemond[1086]: pam_sss(imap:auth): received for user <username>: 7 (Authentication failure)

How can I solve this, or maybe asked differently: how can I get courier-authdaemon to play nice with authpam ?

thanks,

Hendrik-Jan

Sent with [Proton Mail](https://proton.me/mail/home) secure email.

_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users