Jason R. Mastaler wrote:
> 1. The 'domain address' feature (discussed on tmda-users a couple of
>    weeks ago).
> 
>    Assigned to: Ed Blackman

I was cleaning up the patch for submission when I thought of a
different implementation.  Currently the domain address implementation
is separate from the sender address code, though it's mostly very
similar.  It also requires a new argument to tmda-address, a new
subclass of Address, new methods in Cookie, etc.

What I realized is that sender address code has a completely useless
(I think) behavior that I could change slightly to make useful,
implementing domain addresses in the process.  Currently, if you run
"tmda-address -s example.com", it will happily give you an address
that is completely useless, since the sender address will never be a
bare "example.com".  

My current domain address implementation leaves that useless behavior
in place, and adds a bunch of new, but mostly duplicated from
'sender', code to implement domain addresses.  I could submit that,
OR, I could simply change the 'sender' HMAC matching logic to use the
same sort of fallback algorithm I use for domain addresses: if the
hmac generated from the full sender address doesn't match the one on
the message, strip 'local@' from the sender address and try again.  If
it still doesn't match, strip the most qualified domain part (eg,
'foo.example.com' -> 'example.com') and try again, until there's
either a match or nothing left to test.

An illustration of how that would work:

tmda-address args       sender                  allowed in?
-----------------       ------                  ----------
-s [EMAIL PROTECTED]    [EMAIL PROTECTED]       yes
                        [EMAIL PROTECTED]       no
-s foo.example.com      [EMAIL PROTECTED]       yes
                        [EMAIL PROTECTED]       yes
                        [EMAIL PROTECTED]               no
-s example.com          [EMAIL PROTECTED]       yes
                        [EMAIL PROTECTED]       yes
                        [EMAIL PROTECTED]               yes
                        [EMAIL PROTECTED]       no
-s com                  [EMAIL PROTECTED]       yes
                        [EMAIL PROTECTED]       yes
                        [EMAIL PROTECTED]       yes
                        [EMAIL PROTECTED]       yes
                        [EMAIL PROTECTED]               no

Thoughts?  Comments?  Unless people don't like my alternate design, or
there's a problem with it I don't see, that's what I'm going to
submit: it's a lot less new code, and I don't think there are
backwards-compatibility issues, since I'm pretty sure it was useless
behavior before.

Ed


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

Reply via email to