Skip to content

Commit 5a4dc7c

Browse files
committed
Read a per-user mailbox_command from LDAP
scriptsMailboxCommand is currently generated as an operational attribute using the following CoS template in LDAP: dn: cn=scriptsMailboxCommandTemplate,ou=People,dc=scripts,dc=mit,dc=edu cn: scriptsMailboxCommandTemplate objectClass: top objectClass: cosTemplate objectClass: extensibleObject scriptsmailboxcommand: /usr/bin/procmail -t -p -a "${EXTENSION}" ~/mail_scripts/procmailrc dn: cn=scriptsMailboxCommandCoS,ou=People,dc=scripts,dc=mit,dc=edu cn: scriptsMailboxCommandCoS objectClass: top objectClass: ldapSubEntry objectClass: cosSuperDefinition objectClass: cosPointerDefinition costemplatedn: cn=scriptsMailboxCommandTemplate,ou=People,dc=scripts,dc=mit,dc=edu cosAttribute: scriptsMailboxCommand operational-default Legacy-ID: 2841
1 parent 80a2c18 commit 5a4dc7c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
server_host = ldapi://%2fvar%2frun%2fslapd-scripts.socket/
2+
search_base = ou=People,dc=scripts,dc=mit,dc=edu
3+
query_filter = (&(objectClass=posixAccount)(uid=%s))
4+
result_attribute = scriptsMailboxCommand
5+
bind = no
6+
version = 3

server/fedora/config/etc/postfix/main.cf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ myorigin = scripts.mit.edu
1212
mydestination = scripts.mit.edu, scripts, $myhostname, scripts-test.mit.edu, scripts-test, localhost
1313
relayhost =
1414
mynetworks_style = host
15-
mailbox_command = /usr/bin/procmail -t -p -a "${EXTENSION}" ~/mail_scripts/procmailrc
15+
mailbox_command_maps = ldap:/etc/postfix/mailbox-command-maps-ldap.cf
1616
mailbox_size_limit = 0
1717
message_size_limit = 41943040
1818
recipient_delimiter = +

0 commit comments

Comments
 (0)