2 messages in net.sourceforge.lists.courier-sqwebmailRe: [sqwebmail] domainlist
FromSent OnAttachments
David SankelJun 23, 2005 11:30 am 
Kurt BiglerAug 2, 2005 10:55 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [sqwebmail] domainlistActions...
From:Kurt Bigler (kk@breathsense.com)
Date:Aug 2, 2005 10:55:53 pm
List:net.sourceforge.lists.courier-sqwebmail

on 6/23/05 11:30 AM, David Sankel <cam@gmail.com> wrote:

I was wondering why the domainlist disallows using wildcards for ip addresses. It would be nice to be able to set a default domain for all access scenarios. For example, the following domainlist,

{{{ domain1 domain2:* domain3 }}}

defaults to domain2 for every scenario except the one where the server was accessed via ip address.

If no-one objects to adding wildcards for ip addresses, I'd be happy to code it up if someone who knows the code-base could write me up a quick design.

Sorry so slow responding. I don't watch this list regularly now.

There are a vast number of permutations in how the logindomainlist can be used. When Jesse Guardiani and I and a couple others worked on the design in early '03 it was boggling at times to hold in the mind all the implications of various aspects of the design.

The implementation time tended to be a limiting factor and it is likely that things can be generalized further than the current implementation without breaking the basic design. But it might be easy to inadvertently break a (possibly unintended) feature that someone is making use of.

If you care to study it carefully you might look through the archives of the old list sqwe@inter7.com from 2/21/03 to 4/16/03, but you'd have to wade through a lot of ultimately impertinent stuff.

I've never used any of the IP-related features myself, but a few things come to mind off-hand:

(1) In dealing with IPv4 addresses it is common to want wildcards in various fields of the IP. (And IPv6 I don't even understand yet.) If you don't want to deal with this, I suppose implementing a IP wildcard with no dots in it would not risk breaking compatibility with a more complete IP wildcard implementation that could come later.

(2) Maybe * intentionally excludes IPs so that * is a way of wildcarding name-based domains specifically. I don't even know whether the same server can have both name- and IP-based virtual hosting, but I suspect so.

(3) Perhaps relevant, here is something Jesse said on the old list. Particularly note item 3 in the quoted material:

on 4/8/03 2:48 PM, Jesse Guardiani <jes@wingnet.net> wrote:

Mr. Sam, Kurt, List,

Attached is my latest version of the logindomainlist patch.

In function it is very similar to the last patch. However, some new functionality has been added, and some functionality has been removed due to redundancy and such. The following changes have been made:

1.) * modifier has been removed! Use @ modifier instead.

2.) - modifier has been added. It creates a text field.

3.) wildcarding is now enabled for the @ and - modifiers. Normally this would mean that you couldn't do IP matching, but I've rigged it to do IP matching if (and only if) neither field #1 nor field #2 contain a wildcard character.

4.) empty lines are detected better now, IMHO. I simply look for a whitespace character at position 1 on each line. If position 1 is whitespace, I assume it's an empty line.

Other than that, I believe everything is the same as far as functionality is concerned.

Also there was this comment:

on 3/3/03 11:38 AM, Jesse Guardiani <jes@wingnet.net> wrote:

I HAVE NOT removed the '@' modifier. I was contemplating it, but I decided against it since it allows for limited IP based matching. The '*' modifier does NOT match IPs. I think the IP matching functionality might be extended in the future, so I have decided to keep the '@' modifier.

But that might be old history since I think there is no longer a '*' modifier.

Jesse doesn't seem to be around anymore on the new list, but I cc'd him on this message at his old address and maybe he will chime in.

If you want to look at the code, start with sqwebmail/logindomainlist.c and the places functions there are called from sqwebmail/sqwebmail.c.

Good luck.

Please cc me on any replies.