Re: 0.70ac1 patch

2001-08-01 Thread Bill Shupp

I've updated the changes to incorporate Antonio's idea of having optional
include files in addition to the header.html and footer.html files.  Here's
how to apply:

cd qmailadmin-0.70
lynx --source http://shupp.org/patches/0.70ac2.patch.gz | patch -p0
./configure options
make install-strip

It's almost identical to the one I released yesterday (see archive), but
here's how it's different:

1. There are 3 new hooks: ##N1, ##N2, ##N3.  These hooks will include
html/include1.html, html/include2.html, and html3.html respectively.  This
gives you 3 unique include files (in addition to header.html and footer.html
which get parsed automatically) to work with.  If you need more, it's pretty
easy to edit template.c to add them.  As an example, this patch puts a
little bit of text in html/include2.html, and this is called (via ##N2) from
html/add_user.html.  I did add error checking to prevent include loops.

2. incremented the version to 0.70ac2.

Please post comments.

Cheers,

Bill Shupp




Re: 0.70ac1 patch

2001-08-01 Thread Oden Eriksson

Bill Shupp writes: 

 I've updated the changes to incorporate Antonio's idea of having optional
 include files in addition to the header.html and footer.html files.  

Cool! 


This is a test of include2.html. This domain is kvikkjokk.net 

file permission error /usr/local/share/qmailadmin/html//include3.html 

But why is there a double slash in there ? 


 --
Kindest regards // Oden Eriksson
Kvikkjokk Networks 



Re: 0.70ac1 patch

2001-08-01 Thread Bill Shupp

on 8/1/01 9:47 AM, Oden Eriksson at [EMAIL PROTECTED] spake:

 Bill Shupp writes:
 
 I've updated the changes to incorporate Antonio's idea of having optional
 include files in addition to the header.html and footer.html files.
 
 Cool! 
 
 
 This is a test of include2.html. This domain is kvikkjokk.net
 
 file permission error /usr/local/share/qmailadmin/html//include3.html
 
 But why is there a double slash in there ?

Hmmm...  I'm not sure.  Did you make any changes to the html files, or is
this out of the box?  Can you post your configure line for qmailadmin?

Thanks,

Bill




Re: 0.70ac1 patch

2001-08-01 Thread Oden Eriksson

Bill Shupp writes: 

 on 8/1/01 9:47 AM, Oden Eriksson at [EMAIL PROTECTED] spake: 
 
 Bill Shupp writes: 
 
 I've updated the changes to incorporate Antonio's idea of having optional
 include files in addition to the header.html and footer.html files.
 
 Cool!  
 
 
 This is a test of include2.html. This domain is kvikkjokk.net 
 
 file permission error /usr/local/share/qmailadmin/html//include3.html 
 
 But why is there a double slash in there ?
 
 Hmmm...  I'm not sure.  Did you make any changes to the html files, or is
 this out of the box?  Can you post your configure line for qmailadmin?

No, no changes. Here's my configure stuff: 

./configure \
 --prefix=/usr \
 --sysconfdir=/etc \
 --mandir=/usr/share/man \
 --infodir=/usr/share/info \
 --enable-vpopmaildir=/home/vpopmail \
 --enable-htmldir=/var/www/html \
 --enable-cgibindir=/var/www/cgi-bin \
 --with-htmllibdir=/usr/local/share/qmailadmin \
 --enable-qmaildir=/var/qmail \
 --enable-cgipath=/cgi-bin/qmailadmin \
 --enable-vpopuser=vpopmail \
 --enable-autoresponder-bin=/usr/local/bin \
 --enable-ezmlmdir=/usr/local/bin \
 --enable-maxpopusers=-1 \
 --enable-maxaliases=-1 \
 --enable-maxforwards=-1 \
 --enable-maxautoresponders=-1 \
 --enable-maxmailinglists=-1 \
 --enable-maxusersperpage=15 \
 --enable-maxaliasesperpage=25 \
 --enable-no-cache=N \
 --disable-nls 
make 
make install 

 

 --
Kindest regards // Oden Eriksson
Kvikkjokk Networks 



Re: 0.70ac1 patch

2001-08-01 Thread Bill Shupp

on 8/1/01 9:55 AM, Oden Eriksson at [EMAIL PROTECTED] spake:

 Bill Shupp writes:
 
 on 8/1/01 9:47 AM, Oden Eriksson at [EMAIL PROTECTED] spake:
 
 Bill Shupp writes:
 
 I've updated the changes to incorporate Antonio's idea of having optional
 include files in addition to the header.html and footer.html files.
 
 Cool!  
 
 
 This is a test of include2.html. This domain is kvikkjokk.net
 
 file permission error /usr/local/share/qmailadmin/html//include3.html
 
 But why is there a double slash in there ?
 
 Hmmm...  I'm not sure.  Did you make any changes to the html files, or is
 this out of the box?  Can you post your configure line for qmailadmin?
 
 No, no changes. Here's my configure stuff:
 
 ./configure \
 --prefix=/usr \
 --sysconfdir=/etc \
 --mandir=/usr/share/man \
 --infodir=/usr/share/info \
 --enable-vpopmaildir=/home/vpopmail \
 --enable-htmldir=/var/www/html \
 --enable-cgibindir=/var/www/cgi-bin \
 --with-htmllibdir=/usr/local/share/qmailadmin \
 --enable-qmaildir=/var/qmail \
 --enable-cgipath=/cgi-bin/qmailadmin \
 --enable-vpopuser=vpopmail \
 --enable-autoresponder-bin=/usr/local/bin \
 --enable-ezmlmdir=/usr/local/bin \
 --enable-maxpopusers=-1 \
 --enable-maxaliases=-1 \
 --enable-maxforwards=-1 \
 --enable-maxautoresponders=-1 \
 --enable-maxmailinglists=-1 \
 --enable-maxusersperpage=15 \
 --enable-maxaliasesperpage=25 \
 --enable-no-cache=N \
 --disable-nls 
 make 
 make install 

Well, first of all it looks like my error checking is broken.  Let me fix
that, then we'll see why yours is generating the extra slash.

What os are you working on?

Thanks,

Bill Shupp




Re: 0.70ac1 patch

2001-08-01 Thread Oden Eriksson

Bill Shupp writes: 

 on 8/1/01 9:55 AM, Oden Eriksson at [EMAIL PROTECTED] spake: 
 
 Well, first of all it looks like my error checking is broken.  Let me fix
 that, then we'll see why yours is generating the extra slash.

I noticed that the configure stuff ignored that I didn't have the 
autorespond binary. 

 What os are you working on?

LFS = Linux From Scratch 

(all the newest stuff..., all djb softwares built against dietlibc, etc.) 


 --
Kindest regards // Oden Eriksson
Kvikkjokk Networks 



Re: 0.70ac1 patch

2001-08-01 Thread Bill Shupp

on 8/1/01 10:27 AM, Oden Eriksson at [EMAIL PROTECTED] spake:

 Bill, 
 
 Here's from my config.h
 
 #define HTMLLIBDIR /usr/local/share/qmailadmin/html/
 
 It's odd because I configured it like:
 
 --with-htmllibdir=/usr/local/share/qmailadmin
 
 and not 
 
 --with-htmllibdir=/usr/local/share/qmailadmin/html/

Well, mine has the trailing slash as well.  But a redundant / is usually
ignored.  I don't understand why only these new include files are causing a
problem and the others are not.  Also, I don't know why it's include3.html
that is being referenced.

I can add a test for a trailing slash and make the path correct.  That's
probably what should happen anyway, as I'm not sure all *nix systems will
ignore a redundant slash in a path.

Bill




Re: 0.70ac1 patch

2001-08-01 Thread Oden Eriksson

Bill Shupp writes: 

 on 8/1/01 10:27 AM, Oden Eriksson at [EMAIL PROTECTED] spake: 
 
 Bill,  
 
 Here's from my config.h 
 
 #define HTMLLIBDIR /usr/local/share/qmailadmin/html/ 
 
 It's odd because I configured it like: 
 
 --with-htmllibdir=/usr/local/share/qmailadmin 
 
 and not  
 
 --with-htmllibdir=/usr/local/share/qmailadmin/html/
 
 Well, mine has the trailing slash as well.  But a redundant / is usually
 ignored.  I don't understand why only these new include files are causing a
 problem and the others are not.  Also, I don't know why it's include3.html
 that is being referenced.

If I add the include3.html file the error is gone. 

 I can add a test for a trailing slash and make the path correct.  That's
 probably what should happen anyway, as I'm not sure all *nix systems will
 ignore a redundant slash in a path. 
 
 Bill 
 

I don't know... 

Here's another issue. 

on line 010 in the translation (no  sv), ##D don't work, I don't know if 
it should 

 --
Kindest regards // Oden Eriksson
Kvikkjokk Networks 



Re: 0.70ac1 patch

2001-08-01 Thread Bill Shupp

on 8/1/01 10:27 AM, Oden Eriksson at [EMAIL PROTECTED] spake:

 Bill, 
 
 Here's from my config.h
 
 #define HTMLLIBDIR /usr/local/share/qmailadmin/html/
 
 It's odd because I configured it like:
 
 --with-htmllibdir=/usr/local/share/qmailadmin
 
 and not 
 
 --with-htmllibdir=/usr/local/share/qmailadmin/html/

Try this:

in configure.in, change line 100 from:

AC_DEFINE_UNQUOTED(HTMLLIBDIR, $htmllibdir/html/)

to:

AC_DEFINE_UNQUOTED(HTMLLIBDIR, $htmllibdir/html)


make distclean
./configure options
make install

See if it works for you then.

Thanks,

Bill Shupp




Re: 0.70ac1 patch

2001-08-01 Thread Oden Eriksson

Bill Shupp writes: 

 Try this: 
 
 in configure.in, change line 100 from: 
 
 AC_DEFINE_UNQUOTED(HTMLLIBDIR, $htmllibdir/html/) 
 
 to: 
 
 AC_DEFINE_UNQUOTED(HTMLLIBDIR, $htmllibdir/html)

Yep, that did the trick. 

file permission error /usr/local/share/qmailadmin/html/include3.html 

 --
Kindest regards // Oden Eriksson
Kvikkjokk Networks 



Re: 0.70ac1 patch

2001-08-01 Thread Oden Eriksson

Bill Shupp writes: 

 on 8/1/01 10:43 AM, Oden Eriksson at [EMAIL PROTECTED] spake: 
 
 If I add the include3.html file the error is gone.
 
 Oh, crap.  I didn't notice that diff -N only creates missing files that have
 more than 0 bytes.  So include1.html and include3.html were not being
 created by the patch.  If you touch each file, you should be ok.

Yes, but I noticed the double slash thing only when I removed the include 
file. I guess I could have gotten the same result if I removed other files 
too. 

 I went ahead and created a 0.70ac4.patch.gz.  It creates all the include
 files, changes configure.in to not append a trailing slash to HTMLLIBDIR,
 and increments the version to 0.70ac4.  Check it out if you want.

Ok, cool! 

 Here's another issue. 
 
 on line 010 in the translation (no  sv), ##D don't work, I don't know if
 it should 
 
 Right.  When I posted 0.60pre9, I pulled it from the en dictionary and left
 it as 'sales'.  I'm not sure if we want to have the dictionaries parsed, or
 not, so I just removed it.

Ok, I remove it from the sv template and send it to you. 


 --
Kindest regards // Oden Eriksson
Kvikkjokk Networks 



Re: 0.70ac1 patch

2001-08-01 Thread Bill Shupp

on 8/1/01 11:09 AM, Oden Eriksson at [EMAIL PROTECTED] spake:

 Yes, but I noticed the double slash thing only when I removed the include
 file. I guess I could have gotten the same result if I removed other files
 too. 

Right.  The problem was NOT the double slash, it was the fact that the
template file was missing.  You only noticed the double slash when the error
message was displayed.  The new patch corrects both issues.

 Ok, I remove it from the sv template and send it to you.

Ok.

Cheers,

Bill Shupp




Re: 0.70ac1 patch

2001-08-01 Thread Antonio Dias

Bill,

On Wed, 1 Aug 2001, Bill Shupp wrote:
 1. There are 3 new hooks: ##N1, ##N2, ##N3.  These hooks will include
 html/include1.html, html/include2.html, and html3.html respectively.  This
 gives you 3 unique include files (in addition to header.html and footer.html
 which get parsed automatically) to work with.  If you need more, it's pretty
 easy to edit template.c to add them.  As an example, this patch puts a
 little bit of text in html/include2.html, and this is called (via ##N2) from
 html/add_user.html.  I did add error checking to prevent include loops.

Why they must be hardcoded? We could have just one ##N command that could
be used like:

##N/test/include.html
##Nheader.html
##Nsomefile.html

and they should be expanded to:

html_dir_of_qmailadmin/test/include.html
html_dir_of_qmailadmin/header.html
html_dir_of_qmailadmin/somefile.html

This is much more clean and there is just one command to remember. What do
you think?

-- 
Antonio Dias




Re: 0.70ac1 patch

2001-08-01 Thread Bill Shupp

on 8/1/01 12:12 PM, Ken Jones at [EMAIL PROTECTED] spake:

 
 I updated the distribution with Bills (Alan Cox?) :) patch and
 updated the version to 0.70.

Ha!  Do I get to be on the Inter7 payroll too? ; )

Did you get the latest patch?  It was 0.70ac4.  ac1 didn't have the ##N[1-3]
hooks, and ac2 and ac3 were broken.  But I'm not sure you were into the
extra include files idea (##N[1-3]).

 One change, I put the version in the footer with a link to
 the qmailadmin page. This might help people looknig for help,
 we can put a qmailadmin howto/help document on the page.

I'm thinking that the ##V (version) should be left out by default, and only
mentioned in the docs.  Also, I'm not sure all the header info should be in
header.html by default, as I'm not sure everyone wants it.  That's just how
I like it.

Thanks,

Bill Shupp




Re: 0.70ac1 patch

2001-08-01 Thread Bill Shupp

on 8/1/01 12:13 PM, Antonio Dias at [EMAIL PROTECTED] spake:

 Why they must be hardcoded? We could have just one ##N command that could
 be used like:
 
 ##N/test/include.html
 ##Nheader.html
 ##Nsomefile.html
 
 and they should be expanded to:
 
 html_dir_of_qmailadmin/test/include.html
 html_dir_of_qmailadmin/header.html
 html_dir_of_qmailadmin/somefile.html
 
 This is much more clean and there is just one command to remember. What do
 you think?

Oh, that's pretty cool.  I can make that work.  I think it's cleaner, too.
Let me get that worked out, and add some documentation...

Cheers,

Bill Shupp




Re: 0.70ac1 patch

2001-08-01 Thread Oden Eriksson

Ken Jones writes: 

 
 I updated the distribution with Bills (Alan Cox?) :) patch and
 updated the version to 0.70. 
 
 One change, I put the version in the footer with a link to
 the qmailadmin page. This might help people looknig for help,
 we can put a qmailadmin howto/help document on the page. 
 
 Ken Jones

Wouldn't that be a security risk to send the whole referrer tag like that ? 


 --
Kindest regards // Oden Eriksson
Kvikkjokk Networks 



Re: 0.70ac1 patch

2001-08-01 Thread Antonio Dias

On Wed, 1 Aug 2001, Bill Shupp wrote:
 on 8/1/01 12:13 PM, Antonio Dias at [EMAIL PROTECTED] spake:

  Why they must be hardcoded? We could have just one ##N command that could
  be used like:
 
  ##N/test/include.html
  ##Nheader.html
  ##Nsomefile.html
 
  and they should be expanded to:
 
  html_dir_of_qmailadmin/test/include.html
  html_dir_of_qmailadmin/header.html
  html_dir_of_qmailadmin/somefile.html
 
  This is much more clean and there is just one command to remember. What do
  you think?

 Oh, that's pretty cool.  I can make that work.  I think it's cleaner, too.
 Let me get that worked out, and add some documentation...

Remember to remove ../ from filename before to open it. This can be a
security improvement.

-- 
Antonio Dias




Re: 0.70ac1 patch

2001-08-01 Thread Ken Jones


I updated the distribution with Bills (Alan Cox?) :) patch and
updated the version to 0.70.

One change, I put the version in the footer with a link to
the qmailadmin page. This might help people looknig for help,
we can put a qmailadmin howto/help document on the page.

Ken Jones



Re: 0.70ac1 patch

2001-08-01 Thread Rob Genovesi



Remember to remove ../ from filename before to open it. This can be a
security improvement.

Could simply check the string for alphanumeric and . only.  This would 
force everyone to put the files in the html directory, but is that such a 
bad thing?  You can always create a link to the proper file if it could not 
actually reside in the html directory for some reason...


-Rob





0.70ac1 patch [was: remaining issues before 1.0]

2001-07-31 Thread Bill Shupp

on 7/31/01 4:07 PM, Rob Genovesi at [EMAIL PROTECTED] spake:
 
 Ok, I'll try to get it done this week.  The next question is, should
 anything be in the header/footer files by default?  If anything, I would
 probably want to put this in the header:
 
 The footer sounds like a perfect place to put our new version tag.  I would
 not object at all to some credits in a footer file either (people who
 really don't want it there can always just go take it out).

Ok, these changes were really easy.  Try out this patch if you want, and
please submit comments.  Here's how to apply:

cd qmailadmin-0.70
lynx --source http://shupp.org/patches/0.70ac1.patch.gz | patch -p0
./configure
make install-strip

Here's what the patch does:

1. creates html/header.html and html/footer.html.  Everything up to and
including h2##S/h2 are in the header.  In the footer is
/BODY/HTML.  These same tags are removed from all other html files.
Seems to work pretty well for me.

2. Adds a new hook ##V to display package name and version.  As an
example, I have this already in header.html: !-- ##V --
So be warned!  This shouldn't be in there by default, but I just put it in
this patch as an example.

3. Increments version number to 0.70ac1.

Cheers,

Bill Shupp