bbdb-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: add sender without mail if mail is in some ignored-list?


From: Roland Winkler
Subject: Re: add sender without mail if mail is in some ignored-list?
Date: Tue, 28 Dec 2021 23:57:02 -0600

On Fri, Mar 27 2020, Michael Richardson wrote:
> This might be what I'd like.
>
> Roland Winkler <winkler@gnu.org> wrote:
>     > If gets an email from
>     > John Doe <no-reply@exmple.com>
>
> 1) look up no-reply@example.com in BBDB, see flag that says this is an
>     ignorable "role" address.
>               -> do nothing
>
> If there is a second flag "show-name" (maybe) set then:
>
> 2) Lookup the name in BBDB, and show that entry instead.

I am sorry for the long delay with this old thread.  Finally, when I
looked into the code, I found the function
`bbdb-clean-address-components'.  It massages the name and mail address
in a mail message before BBDB tries to find a record matching the name
and/or mail address.  For this, it passes the name through a
(customizable) `bbdb-message-clean-name-function' and the mail address
through a (customizable) `bbdb-canonicalize-mail-function'.

The docstring of the variable `bbdb-canonicalize-mail-function' says"

If this function returns nil, BBDB assumes that there is no mail address.

So it seems to me, the best way to ignore mail addresses like
<no-reply@exmple.com> is to define a function for
`bbdb-canonicalize-mail-function' that returns nil in such a case.
Then, BBDB should look up the record that matches the name, but it will
not associate the bogus address <no-reply@exmple.com> with the record
for this name.

Or am I still misunderstanding the nature of this issue?

(I thought about adding a new feature along these lines to BBDB, when I
realized that the feature is already in place, though the name
`bbdb-canonicalize-mail-function' suggests that historically it got
developed for a different purpose.)

> 3) maybe, if there is no reply-To, and the user asks to reply,
>    use the email from that entry.

That goes beyond BBDB because it needs to hook into how a message buffer
is set up by a MUA if one wants to reply to such a message.  I expect
that this works differently for Gnus, Rmail, etc.  But if BBDB displays
the record for the name, one can easily copy the mail address into the
reply buffer (use `bbdb-mail-address', bound to M in BBDB).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]