pam: Make dovecot check the mailHost attribute.
[matthijs/servers/drsnuggles.git] / etc / pam_ldap_dovecot.conf
diff --git a/etc/pam_ldap_dovecot.conf b/etc/pam_ldap_dovecot.conf
new file mode 100644 (file)
index 0000000..b5c31c8
--- /dev/null
@@ -0,0 +1,21 @@
+#
+# See /usr/share/libpam-ldap/ldap.conf for example configuration and more
+# options.
+#
+#
+# Dovecot-specific version of pam_ldap.conf that checks the mailHost attribute
+# instead of the "host" attribute, so people without SSH access can still use
+# IMAP, and only people whose mail is delivered on this host can use IMAP.
+
+# The distinguished name of the search base.
+base dc=drsnuggles,dc=stderr,dc=nl
+
+# The LDAP server. ldaps:// is secure, ldapi:// is local socket
+uri ldap://ldap.drsnuggles.stderr.nl
+
+# The LDAP version to use
+ldap_version 3
+
+# Only allow people to login to dovecot when their email is delivered here.
+# Too bad this uses a hardcoded hostname, though...
+pam_filter mailHost=mail.drsnuggles.stderr.nl