On Wed, Mar 07, 2001 at 09:30:47PM -0800, Hampton Maxwell wrote:
> On Wed, Mar 07, 2001 at 06:21:41PM -0800, Lu wrote:
> > Yes, I am looking for a solution that can make domain value a variable and
> > dynamically replace it with the HOST HEADER ( minus the www)
> >
> > Thanks.
> >
> IMHO, the best solution is to make the login screen recognize the form variable
>'domain' so that you could do:
> http://host/qmailadmin?domain=somedomain and have it fill in the domain box with
>somedomain.
>
> I'm going to see what I can do with that.
>
> Hampton
I went ahead and wrote a quick patch (included) this. Just patch, and enter
http://host/cgi-bin/qmailadmin?domain=domainname and it will fill in the domain box
with domainname.
Hampton
> >
> > > -----Original Message-----
> > > From: Bill Shupp [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, March 07, 2001 5:11 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: virtualhost in qmailadmin
> > >
> > >
> > > on 3/7/01 7:07 PM, Bill Shupp at [EMAIL PROTECTED] wrote:
> > >
> > > > Try this..
> > > >
> > > > In html/show_login.html, change:
> > > >
> > > > <input type=text size=14 name=domain maxlength=128>
> > > >
> > > > to: <input type=hidden size=14 name=domain value="<mymail.com>"
> > > > maxlength=128>
> > > >
> > > > You'll need to edit the table structure around it so that
> > > "Domain:" doesn't
> > > > show..
> > > >
> > > > Hope that works.
> > >
> > >
> > > But of course, this will force everyone using these HTML pages to login as
> > > mymail.com. If you're asking for it to be dynamic (same html for multiple
> > > domains), I don't know how to do that...
> > >
> > > -Bill
> >
*** qmailadmin.c.old Thu Mar 8 01:56:43 2001
--- qmailadmin.c Wed Mar 7 22:22:26 2001
***************
*** 233,238 ****
--- 233,242 ----
}
}
}
+ TmpCGI = (char *)getenv("QUERY_STRING");
+ TmpCGI = strdup(TmpCGI);
+ GetValue(TmpCGI,Domain, "domain=",MAX_BUFF);
+
show_login();
}
*** show_login.html.old Thu Mar 8 01:57:09 2001
--- show_login.html Thu Mar 8 01:58:17 2001
***************
*** 44,50 ****
<form method=post name=logon action=##C>
<table>
<tr><td>##X112</td><td><input type=text size=14 name=username
value="postmaster" maxlength=128></td></tr>
! <tr><td>##X113</td><td><input type=text size=14 name=domain
maxlength=128></td></tr>
<tr><td>##X057</td><td><input type=password size=14 name=password
maxlength=128></td></tr>
<tr><td><input type=submit value="##X114" name="##X114"></td>
</table>
--- 44,50 ----
<form method=post name=logon action=##C>
<table>
<tr><td>##X112</td><td><input type=text size=14 name=username
value="postmaster" maxlength=128></td></tr>
! <tr><td>##X113</td><td><input type=text size=14 name=domain
value="##D" maxlength=128></td></tr>
<tr><td>##X057</td><td><input type=password size=14 name=password
maxlength=128></td></tr>
<tr><td><input type=submit value="##X114" name="##X114"></td>
</table>