How to Configure Gnus in Emacs to Add Email Address to BBDB?

1.4k views Asked by At

I am trying to change from Wanderlust to Gnus for email in emacs. Out of the box, it automatically adds email addresses of emails to BBDB. I find that this fills BBDB with too much garbage, emails that I will never want to write an email message to.

I would rather have a key, like ':' on an email address either display a matching current BBDB record or create a new one for me to edit.

I thought this would be easy to find an answer to, but I have not yet found a solution.

Any ideas?

Dan

2

There are 2 answers

2
lawlist On

To change the value of bbdb/mail-auto-create-p from t to nil, you can use:

(setq bbdb/mail-auto-create-p nil)

bbdb/mail-auto-create-p is a variable defined in `bbdb.el'.
Its value is t

Documentation:
*If this is t, then Gnus, MH, RMAIL, and VM will automatically
create new bbdb records for people you receive mail from. If this
is a function name or lambda, then it is called with no arguments
to decide whether an entry should be automatically created. You
can use this to, for example, not create records for messages
which have reached you through a particular mailing list, or to
only create records automatically if the mail has a particular
subject.

You can customize this variable.
2
Mark A. Hershberger On

BBDB v3+ has bbdb-mua-auto-update-p, a customizable variable:

How bbdb-mua-auto-update updates BBDB records automatically.

Allowed values are (here ADDRESS is an email address found in a message):

nil Do nothing.

search Search for existing records matching ADDRESS.

update Search for existing records matching ADDRESS; update name and mail field if necessary.

query Search for existing records matching ADDRESS; query for creation of a new record if the record does not exist.

create or t Search for existing records matching ADDRESS; create a new record if it does not yet exist.

a function This functions will be called with no arguments. It should return one of the above values. For an example, see ‘bbdb-select-message’ with ‘bbdb-mua-update-records-p’, ‘bbdb-accept-message-alist’ and ‘bbdb-ignore-message-alist’.

To initiate auto-updating of BBDB records, call ‘bbdb-mua-auto-update-init’ for the respective MUAs in your init file.