I use mu4e
to read and write email. One email address that was in the LDAP server before no longer exists, but it still shows and auto-completes in mu4e
.
How can I remove that address from the local database? And where is that database stored?
I use mu4e
to read and write email. One email address that was in the LDAP server before no longer exists, but it still shows and auto-completes in mu4e
.
How can I remove that address from the local database? And where is that database stored?
For mu version > 1.3.2. you need to define a filtering function and store its name in mu4e-contact-process-function
, e.g. like in this example
(defun my-mu4e-contact-filter-function (addr)
(if (string-match-p
(concat "\\(?:no-?reply\\|.*\\.unwanted\\.domain\\.com\\|"
"unwanted\\.user@somedomain\\.com\\)")
addr)
nil
addr))
(setq mu4e-contact-process-function 'my-mu4e-contact-filter-function)
Note that the contact list only seems to get renewed when mu4e is started. So you will need to stop/restart mu4e upon changes.
Following the GitHub issue, one solution is to ignore that address in address completion. Add this code in ~/.emacs
:
(setq mu4e-compose-complete-ignore-address-regexp
(concat "\\(?:no-?reply\\|.*\\.unwanted\\.domain\\.com\\|"
"unwanted.email@domain\\.com\\)"))
and notice the escaping of periods with (\\.
). Then restart mu4e
.
The database of contacts will be stored in the Xapian database starting with mu4e
1.4.
mu4e-compose-complete-ignore-address-regexp
has been obsoleted since mu 1.3.2. You need now to define the name of a filtering function in the variable mu4e-contact-process-function
.