User Tools

Site Tools


doc:appunti:linux:sa:postfix_courier_authdaemon_debian_12

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
doc:appunti:linux:sa:postfix_courier_authdaemon_debian_12 [2024/02/23 10:11] – [Moving the Courier Authdaemon socket into the Postfix chroot] niccolodoc:appunti:linux:sa:postfix_courier_authdaemon_debian_12 [2024/02/26 10:13] (current) – [Moving the Courier Authdaemon socket into the Postfix chroot] niccolo
Line 1: Line 1:
-====== Postfix with Courier Authdaemon in Debian 12 ====== +====== Postfix with Courier Authdaemon in Debian 12 Bookworm ======
- +
-===== Configuring the Courier Authdaemon =====+
  
 We want to enable authentication on **virtual users** (i.e. using a login name which is not an Unix username), e.g. we want to use an email address as a login name. We want to enable authentication on **virtual users** (i.e. using a login name which is not an Unix username), e.g. we want to use an email address as a login name.
 +
 +We want the same authentication schema to work on both authenticated SMTP sumbission (sending mail via Postfix) and on POP3/IMAP (incoming mail via Courier daemons).
 +
 +===== Configuring the Courier Authdaemon =====
  
 Into the configuration file **/etc/courier/authdaemonrc** we add the module **authuserdb** to the **authmodulelist**, beside the standard Unix PAM (i.e. the ''passwd'' and ''shadow'' files ): Into the configuration file **/etc/courier/authdaemonrc** we add the module **authuserdb** to the **authmodulelist**, beside the standard Unix PAM (i.e. the ''passwd'' and ''shadow'' files ):
Line 64: Line 66:
 </code> </code>
  
-To enable the bind mount at bootstrap we create a **systemd mount service** creating the file **/etc/systemd/system/var-spool-postfix-var-run-courier-authdaemon.mount** with the following content:+To enable the bind mount at bootstrap we define a **systemd mount service** creating the file **/etc/systemd/system/var-spool-postfix-var-run-courier-authdaemon.mount** with the following content:
  
 <file> <file>
 [Unit] [Unit]
 Description=Mount Courier Authdaemon into Postfix chroot Description=Mount Courier Authdaemon into Postfix chroot
-Requires=courier-authdaemon.service +Wants=courier-authdaemon.service
-After=courier-authdaemon.service+
  
 [Mount] [Mount]
-What=/var/run/courier/authdaemon+What=/run/courier/authdaemon
 Where=/var/spool/postfix/var/run/courier/authdaemon Where=/var/spool/postfix/var/run/courier/authdaemon
 Type=bind Type=bind
Line 81: Line 82:
 WantedBy=postfix.service WantedBy=postfix.service
 </file> </file>
 +
 +**NOTICE**: The weak dependency ''Wants=courier-authdaemon.service'' is preferable than the stronger ones ''Requires='' and ''After=''. In Debian 12 the strong dependencies cause a Systemd ordering cycle problem, see **[[systemd_tmpfiles_problem]]**.
  
 This is a **[[https://www.freedesktop.org/software/systemd/man/systemd.mount.html|systemd mount unit]]**, we need to reload the systemd daemon and enable that unit for the next reboot: This is a **[[https://www.freedesktop.org/software/systemd/man/systemd.mount.html|systemd mount unit]]**, we need to reload the systemd daemon and enable that unit for the next reboot:
Line 96: Line 99:
 </code> </code>
  
 +  * **[[https://www.freedesktop.org/software/systemd/man/latest/systemd.syntax.html|Systemd Syntax]]**
   * **[[https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html|Systemd Unit]]**   * **[[https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html|Systemd Unit]]**
   * **[[https://www.freedesktop.org/software/systemd/man/latest/systemd.mount.html|Systemd Mount]]**   * **[[https://www.freedesktop.org/software/systemd/man/latest/systemd.mount.html|Systemd Mount]]**
doc/appunti/linux/sa/postfix_courier_authdaemon_debian_12.1708679502.txt.gz · Last modified: 2024/02/23 10:11 by niccolo