Re: Establish record-addresses associations before annotating records

"Roland Winkler" <[email protected]> Tue, 22 Feb 2022 21:25:58 -0600
Newsgroups gmane.emacs.bbdb.user
Message-ID <[email protected]>
On Mon, Feb 21 2022, Bob Newell wrote:
> I might be missing the point entirely here so apologies if that is the
> case. But this is what I have done for a long time and it has worked
> for me.
>
> (setq bbdb-ignore-message-alist
>       '(("From" . "donotreply")
[snip]
>
> Perhaps the intent was something different, but this always seemed an
> easy way to keep nearly all of those messages from injecting things
> into the database.

There is indeed a subtle difference between the above and the new stuff:

The above makes BBDB ignore messages completely.  But imagine your
friend Joe Smith sends you an email with the From header

   Joe Smith <[email protected]>

(I've been told that github may do this, and a similar things has lately
happened to me at work.)  The point is: here BBDB should not ignore the
message.  But BBDB should only ignore the mail address [email protected],
because Joe Smith already has a BBDB record with a "proper" mail address,
and you do not want to add the bogus address [email protected] to Joe's
record.  The new patch lets you ignore just the mail address.
(Use bbdb-message-ignore-mail-re for this.)

One day the above might not be sufficient anymore.  Therefore, the new
variable bbdb-record-address-alist-function gives you yet more freedom
what information in a message BBDB considers to annotate existing
records and to create new ones.  Instead of processing the addresses in
From and To headers one by one and grabbing matching records on the fly,
all this information is first accumulated in an alist which the user can
massage in whatever way before BBDB will actually annotate existing
records and create new ones.