Re: [Q]



On Tue, 27 November 14:06 Emmanuel wrote:

>>> But the problem is : how can I distinct between a "normal" address and one 
>>> that is in one of the address books
>> 
>> I'm not clear what you mean here.
> 
> That is when a filter applies to a message, it just has a field of type 
> LibBalsaAdress with no reference/index to an address of an address book,

OK, I see now.

> even if the address is actually in the address book. I think there is just 
> no way (but to lookup the address in all addresses books, but that's far too 
> long) to determine if the address contained in the message has a "reliable" 
> phrase because it comes in fact from the user address book or "unreliable".

I'm sure an efficient searchable address book module could be designed.  
Nutscrape Communicator seems to have something like this judging by the way it 
uses its address book these days.  Though I conceed that designing one would 
be a fair amount of work for relatively little benefit here.

> So I think that the better I can do is just trust the phrase (anyway, like I 
> said this phrase is wrote in the messages index, so that, IMHO, the user 
> should be able to filter upon it).

OK.

>>> (moreover I want to be able to do that as fast as possible)?
>> 
>> I would guess that some kind of hashed lookup is needed.
>> 
> 
> I think this is far too expensive (and if I don't make a mistake you can 
> have remote address books?)

Well, hashed lookups tend to take constant time so long as the hash table does 
not have too many collisions, so I think a simple mailbox -> phrase lookup 
would not be too expensive. (Building the hash table might be but that happens 
once only.)

For remote address books, LDAP is perfect for this - search on something like
	(& (objectclass=person) (mail=%v))
where %v is the mailbox to be looked up.  We must presume that the server 
searches efficiently, since that's what LDAP is for :)

Brian



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