I'm using GNUS to access a bunch of IMAP servers. When composing new messages it would be nice to have access to the companies ldap server for autocompletion on address headers TO/CC/BCC. Is this possible, and if, how?
Asked
Active
Viewed 639 times
3
-
Here are some patches that try to simplify EUDC configuration. – legoscia Nov 17 '14 at 15:45
-
@legoscia this looks great; time to compile master again already? ;-) – Tom Regner Nov 17 '14 at 23:35
1 Answers
1
[Update per comments]
Disclaimer: I'm not using EUDC or LDAP at this time, thus I have no current setup of it.
I've had success with EUDC in the past, it wasn't complicated to setup with autocompletion.
First, I copied exactly the configuration described in the EUDC
wiki page.
The only thing that I recall being an issue was making sure that I had the right LDAP base
, address
and binddn
fields setup.
I ended up setting credentials via M-x customize-group
as I far as I know.
I then replaced all the related server fields with my configuration (Copying wiki stuff here, just for inline reference...).
(require 'ldap)
(require 'eudc)
(setq eudc-default-return-attributes nil
eudc-strict-return-matches nil)
(setq ldap-ldapsearch-args (quote ("-tt" "-LLL" "-x")))
(setq eudc-inline-query-format '((name)
(firstname)
(firstname name)
(email)
))
(setq ldap-host-parameters-alist
(quote (("your_server" base "ou=addressbook,dc=your_dc_here,dc=fr"
binddn "cn=admin,dc=your_dc_here,dc=fr"
passwd "your_password"))))
(eudc-set-server "your_server" 'ldap t)
(setq eudc-server-hotlist '(("your_server" . ldap)))
(setq eudc-inline-expansion-servers 'hotlist)
(defun enz-eudc-expand-inline()
(interactive)
(move-end-of-line 1)
(insert "*")
(unless (condition-case nil
(eudc-expand-inline)
(error nil))
(backward-delete-char-untabify 1))
)
;; Adds some hooks
(eval-after-load "message"
'(define-key message-mode-map (kbd "TAB") 'enz-eudc-expand-inline))
(eval-after-load "sendmail"
'(define-key mail-mode-map (kbd "TAB") 'enz-eudc-expand-inline))
(eval-after-load "post"
'(define-key post-mode-map (kbd "TAB") 'enz-eudc-expand-inline))

rimero
- 634
- 5
- 6
-
1Please ellaborate on how you set it up/what you have as your configuration. Link only answers are not recommended because the link can change in the future. – Jonathan Leech-Pepin Oct 30 '14 at 15:41
-
The linked config does not work for me (with the relevant parts filled in with correct values); the paramters used directly with ldapsearch at the commandline gets results, emacs apparently does not even try something; is there proper documentation somewhere? – Tom Regner Oct 30 '14 at 15:59
-
I renounce anything I said -- it works now; somewhere in my attempts to get it working I added "scope 'subtree" according to the docs for other client-systems -- that got in the way; all I had to add was "-ZZ" to the ldap-ldapsearch-args for TLS. – Tom Regner Oct 30 '14 at 16:16