----- Original Message ----- 
From: "Gre7g Luterman" <[EMAIL PROTECTED]>
Sent: Wednesday, August 20, 2003 8:10 PM


> On Mon, 18 Aug 2003 17:23:39 -0700, Stephen Warren
> <[EMAIL PROTECTED]> wrote:
>
> > I'm using tmda-cgi 0.11 on a system with name-based virtual
> > domains.
> >
> > If I go to the Address page, and attempt to generate e.g. a keyword
> > address, leaving "use address" blank, tmda-cgi will use
> > "[EMAIL PROTECTED]" ([EMAIL PROTECTED]) instead of
> > [EMAIL PROTECTED] (the ID I logged in with).
>
> How about I add:
>
> HOSTNAME = "%(Domain)s"
>
> to the skel/install/.tmda/config file instead of patching the
> address generator?  That way HOSTNAME gets put in the config file
> correctly so it won't get guessed incorrectly when you generate an
> address.

OK - If I add this into my config file, it'll fix the problem.

However, if I put it into the skel file, I don't think the auto-install
will do any better - the default code just picks the hostname, like the
current address generator:

  "Domain":    Util.gethostname(),

and it's optionally over-ridden based on the user's home dir:

  Match = re.search(".*/domains?/([^\./]+\.[^/]+)/", Dict["Home"])
  if Match: Dict["Domain"] = Match.group(1)

which won't do the right thing in my setup, since I have virtual users in
/var/qmail/popboxes/$domain/$user - a custom vdomain setup based off some
things I found on the web. I'm using the vpopmail stub with a custom
user-info script.

So, my solution would be for the stub to return the domain-name directly -
the existing vpopmail stub can be updated to include the existing
home-dir-based over-ride code shown above (or perhaps the main code can
still do this only if the stub returns None thus requesting the default).
Also, the vpopmail1 stub could accept an optional "domain: xxx" from the
user-info script to force a specific domain - this could easily work for
IP-based domains too if the stub has access to the IP that's being
accessed, which I assume it does or could quite easily.

Does this sound sensible? If so, I can start looking at the code in more
detail to create a proof-of-concept patch.

-- 
Stephen Warren, Software Engineer, Parama Networks, San Jose, CA
[EMAIL PROTECTED]                  http://www.wwwdotorg.org/
_________________________________________________
tmda-workers mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-workers

Reply via email to