"Jason R. Mastaler" <[EMAIL PROTECTED]> writes:

> Tim Legant <[EMAIL PROTECTED]> writes:
> 
> > I got to thinking, while doing this, that we should just do the
> > -domains thing automatically, without having to say '-domains'.  The
> > domains by themselves won't conflict with email addresses and if
> > people don't store domains in their files/databases, there's no
> > harm.  If they do, it just works.  Seems like a useful
> > simplification.  Perhaps there's something I'm not seeing?
> 
> The only reason I did this was to save processing for those who aren't
> using the -domains capability.  It isn't that much processing though,
> so if you'd like to remove -domains, that's fine.  Just make sure to
> update filter-sources.html and add a note to UPGRADE.

If I do this, I'll probably add code to "uniquify" the sender list at
the same time.

In the common case, where envelope sender and From: (and possibly
Reply-To:) are the same, we end up with two or three identical
addresses in the sender list that we pass to firstmatch().  If the
rule specifies -domains, we end up with two or three identical domains
in the list, a total of anywhere from four to six items when there
only need to be two (one address, one domain).  Ensuring that the list
contains only unique items would help reduce the search time,
especially on the Python side.

In Python 2.3, we'll have Sets to make this easy.  For now, I'll just
do it using dictionaries and create the sender list from the keys.


Tim
_________________________________________________
tmda-workers mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-workers

Reply via email to