Standalone program that maintains a local sqlite cache of (name . email) pairs by extracting senders and recipients from email messages in an IMAP-accessible inbox.

Provides additional emacs utility to enable completing read of email addresses by name/email within gnus message mode.

Features

  • Not too slow: extracts only TO/FROM/CC/BCC fields. Does not fetch or store message bodies, attachments or other heavier fields.
  • Batches of emails processed in parallel
  • Fetches newest messages first. It is not necessary to process entire inbox to have usable completion
  • Not gmail specific, works with any imap server

Building/Installation

  • Clone this repository, then run lein uberjar.
  • Alternatively, use a standalone jar from the releases (TODO)

Emacs Installation

  • Place resources/imap-contacts.el in your emacs load path.
  • (require 'imap-contacts)
  • Alternatively, install from MELPA (TODO)

A binding C-c i is made available in gnus message-mode for completing read of a contact. A hook to briefly refresh contacts is automatically added to gnus-summary-mode.

Usage and options

Option Default Description
-e, –email EMAIL   email address
-d, –db DB *home/ealfonso*.imap-contacts.db path to sqlite db
-m, –max-results MAX 600 max results to fetch, default 600, 0 for infinite
-p, –passwd-file PASSWD\_FN   path to file containing app specific pass. user is prompted if not provided
-n, –newline   flag to insert newlines instead of \r
-q, –quiet   quiet
-s, –imap-protocol-host-port IMAP\_SERVER ["https" "imap.gmail.com" 993] url for for imap server including protocol, host, port, example 'https://imap.gmail.com:993'
-b, –batch-size   batch size per thread