Len Trigg wrote:
> Robert Widhopf-Fenk wrote:
> > No, but maybe you just want to ignore the messages which go
> > to the mailing list.
I tried setting things up this way and, it doesn't work for me.
I have bbdb/mail-auto-create-p and bbdb/news-auto-create-p both set to
nil, so that new bbdb records are never created based on viewing email
(to stop being pestered about junk addresses when spam comes in). I
have instead configured wanderlust to automatically create new bbdb
records only on outgoing emails.
BBDB records for existing addresses do get updated when viewing email
though, and that's when I want to suppress the name updating.
I had a bit of a hack and this is what I came up with (bits were
copied from the beginning of bbdb-annotate-message-sender). Basically
it sets bbdb-readonly-p to true if there's a field called readonly
associated with the record (if any). Please show me if there's a
better way to accomplish this (in particular how it interacts with
typical use of bbdb-readonly-p):
(defadvice bbdb-annotate-message-sender (before filter-readonly-addresses
activate)
"Sets BBDB to readonly if the record for an address (if any) has a field
called readonly"
;;(message "Advice for bbdb-annotate-message-sender")
(let* ((from (ad-get-arg 0))
(data (if (consp from)
from ; if from is a cons, it's pre-parsed (hack hack)
(mail-extract-address-components from)))
(name (car data))
(net (car (cdr data))))
(if (equal name net) (setq name nil))
(if (and net bbdb-canonicalize-net-hook)
(setq net (bbdb-canonicalize-address net)))
;;(message (format "Checking whether to update record for %s (%s)" name
net))
(let* ((record (or (bbdb-search-simple nil net)
(bbdb-search-simple name nil))))
(setq bbdb-readonly-p (and record
(listp (bbdb-record-raw-notes record))
(cdr (assq 'readonly (bbdb-record-raw-notes
record)))))
(when bbdb-readonly-p (message (format "BBDB record %s (%s) is readonly"
name net))))))
Cheers,
Len.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
[email protected]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/