Re: [vchkpw] hyphen in local address part

2007-12-05 Thread Hartmut Wernisch
Hello it's me again!


I examined the source code of vdelivermail.c and in my understanding
".qmail" is never parsed for addresses with hyphens. Only ".qmail-..."
are parsed.
Can anybody confirm my assumption or proof it wrong? 



code snip from version 2.4.25:

[vdelivermail.c]
 .
 .
 .
 810 int check_forward_deliver(char *dir)
 811 {
 812  static char qmail_line[500];
 813  FILE *fs;
 814  int i;
 815  int return_value = 0;
 816 
 817 #ifdef QMAIL_EXT
 818  char tmpbuf[500];
 819 #endif
 820 
 821 chdir(dir);
 822 
 823 #ifdef QMAIL_EXT
 824 /* format the file name */
 825 if (strlen(TheExt)) {
 826 strcpy(tmpbuf,".qmail-");
 827 strcat(tmpbuf,TheExt);
 828 if ( (fs = fopen(tmpbuf,"r")) == NULL ) {
 829 for (i=strlen(TheExt);i>=0;--i) {
 830 if (!i || TheExt[i-1]=='-') {
 831 strcpy(tmpbuf,".qmail-");
 832 strncat(tmpbuf,TheExt,i);
 833 strcat(tmpbuf,"default");
 834 if ( (fs = fopen(tmpbuf,"r")) != NULL) {
 835 break;
 836 }
 837 }
 838 }
 839 }
 840 } else {
 841 fs = fopen(".qmail","r");
 842 }
 843 #else
 844 fs = fopen(".qmail","r");
 845 #endif
 .
 .

[vdelivermail.c/]


best,
Hartmut

On 27 Nov 07, Hartmut Wernisch wrote:
> 
> Hello!
> 
> 
> vpopmail (5.4.25) ignores the .qmail file for addresses with 
> a hyphen in the local part like "foo-bar".
> 
> I know about the qmail-extension but I think that the .qmail file should
> be processed anyway?!
> My (very) old vpopmail (5.4.4) version respected the .qmail file!
> 
> Is this a bug or is my understanding/config wrong?
> 
> 
> vpopmail version 5.4.25 with following compile options:
> 
>   ./configure --prefix=/var/vpopmail --enable-logging=p \
>--enable-auth-module=mysql --disable-passwd \
>--enable-clear-passwd=no --enable-many-domains \
>--enable-auth-logging --enable-valias \
>--enable-mysql-limits=no --enable-qmail-ext=y \
>--enable-ip-alias-domains=y \
>--enable-libdir=/usr/include/mysql \
>--enable-mysql-replication --enable-file-locking=n
> 
> 
> vpopmail version 5.4.4 with following compile options:
>   ./configure  --enable-qmail-ext=y --prefix=/var/vpopmail \
>--enable-ip-alias-domains=y --enable-logging=p \
>--enable-domainquotas=y
> 
> 
> 
> Thanks in advance!
> Hartmut
> 
> 
> 
> 


!DSPAM:475666db32004580016492!



[vchkpw] mysql sourcing read/update server config file

2007-12-05 Thread Hartmut Wernisch
Hello,

I have a question regarding sourcing the vpopmail.mysql config file.

The first line reflect the reading  mysql db server.
If there is no second line the same values are taken for the update
mysql db server.
I am talking about vpopmail-5.4.25.


Here is parsing the first line of vpopmail.mysql in the vmysql.c which
is used for the reading database server:



 142 sprintf(config, "%s/etc/%s", VPOPMAILDIR, "vpopmail.mysql");
 143 
 144 fp = fopen(config, "r");
 145 if (fp == NULL) {
 146 fprintf(stderr, "vmysql: can't read settings from %s\n", config);
 147 return(VA_NO_AUTH_CONNECTION);
 148 }
 149
 150 /* skip comments and blank lines */
 151 do {
 152 eof = (fgets (conn_info, sizeof(conn_info), fp) == NULL);
 153 } while (!eof && ((*conn_info == '#') || (*conn_info == '\n')));
 154 
 155 if (eof) {
 156 /* no valid data read, return error */
 157 fprintf(stderr, "vmysql: no valid settings in %s\n", config);
 158 return(VA_NO_AUTH_CONNECTION);
 159 }
 160 
 161 conf_read = strdup(conn_info);
 162 MYSQL_READ_SERVER = strtok(conf_read, delimiters);
 163 if (MYSQL_READ_SERVER == NULL) return VA_PARSE_ERROR01;
 164 MYSQL_READ_SOCKET = strtok(NULL, delimiters);
 165 if (MYSQL_READ_SOCKET == NULL) return VA_PARSE_ERROR;
 166 
 167 if (MYSQL_READ_SOCKET[0] != '/') {
 168MYSQL_READ_PORT = atoi(MYSQL_READ_SOCKET);
 169MYSQL_READ_SOCKET = NULL;
 170}
 171 
 172 MYSQL_READ_USER = strtok(NULL, delimiters);
 173 if (MYSQL_READ_USER == NULL) return VA_PARSE_ERROR03;
 174 MYSQL_READ_PASSWD = strtok(NULL, delimiters);
 175 if (MYSQL_READ_PASSWD == NULL) return VA_PARSE_ERROR04;
 176 MYSQL_READ_DATABASE = strtok(NULL, delimiters);
 177 if (MYSQL_READ_DATABASE == NULL) return VA_PARSE_ERROR05;



Now reading the second line for the update server information. If there
is no second line use the previous obtained values from the reading
database server, else parse the second line:

 179 /* skip comments and blank lines */
 180 do {
 181 eof = (fgets (conn_info, sizeof(conn_info), fp) == NULL);
 182 } while (!eof && ((*conn_info == '#') || (*conn_info == '\n')));
 183
 184 if (eof) {
 185 /* re-use read-only settings for update */
 186 MYSQL_UPDATE_SERVER = MYSQL_READ_SERVER;
 187 MYSQL_UPDATE_PORT = MYSQL_READ_PORT;
 188 MYSQL_UPDATE_USER = MYSQL_READ_USER;
 189 MYSQL_UPDATE_PASSWD = MYSQL_READ_PASSWD;
 190 MYSQL_UPDATE_DATABASE = MYSQL_READ_DATABASE;
 191 MYSQL_UPDATE_SOCKET = MYSQL_READ_SOCKET;
 192 } else {
 193 conf_update = strdup(conn_info);
 194 MYSQL_UPDATE_SERVER = strtok(conf_update, delimiters);
 195 if (MYSQL_UPDATE_SERVER == NULL) return VA_PARSE_ERROR06;
 196  
 197 MYSQL_READ_SOCKET = strtok(NULL, delimiters);
 198 if (MYSQL_READ_SOCKET == NULL) return VA_PARSE_ERROR;
 199  
 200 if (MYSQL_READ_SOCKET[0] != '/') {
 201 MYSQL_READ_PORT = atoi(MYSQL_READ_SOCKET);
 202 MYSQL_READ_SOCKET = NULL;
 203 }
 204  
 205 MYSQL_UPDATE_USER = strtok(NULL, delimiters);
 206 if (MYSQL_UPDATE_USER == NULL) return VA_PARSE_ERROR08;
 207 MYSQL_UPDATE_PASSWD = strtok(NULL, delimiters);
 208 if (MYSQL_UPDATE_PASSWD == NULL) return VA_PARSE_ERROR09;
 209 MYSQL_UPDATE_DATABASE = strtok(NULL, delimiters);
 210 if (MYSQL_UPDATE_DATABASE == NULL) return VA_PARSE_ERROR10;
 211 }


So now I am wondering why line 197-202 is setting the values to 
MYSQL_READ_SOCKET and MYSQL_READ_PORT instead of MYSQL_UPDATE_SOCKET
and MYSQL_UPDATE_PORT?

In my opinion these values should be set to MYSQL_UPDATE_SOCKET and 
MYSQL_UPDATE_PORT?


Regards,
Hartmut



!DSPAM:475682a432008129516775!



Re: [vchkpw] After 7 years of neglect Qmail is now ours

2007-12-05 Thread Rick Widmer



Christopher Chan wrote:





The question in my mind is who will own the name qmail, and what
product, if any, will bear that name. 


I don't know if it'll be approved, but I got the qmail project name on 
SourceForge, minutes after I heard it was put in public domain.


What license? GPL or BSD? :-D


Public Domain.  That is a valid choice on SouceForge.



I hope you can garner more support.


Me too...  We'll see I'm about to reply to you on the qmail list and 
we'll see what happens...



Rick




!DSPAM:47567e5832001761213935!



Re: [vchkpw] hyphen in local address part

2007-12-05 Thread Tom Collins

On Dec 5, 2007, at 12:52 AM, Hartmut Wernisch wrote:

 823 #ifdef QMAIL_EXT
 824 /* format the file name */
 825 if (strlen(TheExt)) {
 826 strcpy(tmpbuf,".qmail-");
 827 strcat(tmpbuf,TheExt);
 828 if ( (fs = fopen(tmpbuf,"r")) == NULL ) {
 829 for (i=strlen(TheExt);i>=0;--i) {
 830 if (!i || TheExt[i-1]=='-') {
 831 strcpy(tmpbuf,".qmail-");
 832 strncat(tmpbuf,TheExt,i);
 833 strcat(tmpbuf,"default");
 834 if ( (fs = fopen(tmpbuf,"r")) != NULL) {
 835 break;
 836 }
 837 }
 838 }
 839 }
 840 } else {
 841 fs = fopen(".qmail","r");
 842 }
 843 #else
 844 fs = fopen(".qmail","r");
 845 #endif



I think I know what the problem is, and it should be a simple fix.

Before line 823, add:

 fs = NULL;

Remove lines 840 - 845 and replace with the following:

 840 #endif
 841 if (fs == NULL) fs = fopen (".qmail", "r");

Hartmut, can you test this fix?  Rick, can you get this into the next  
vpopmail release if Hartmut reports it as good?


--
Tom Collins  -  [EMAIL PROTECTED]
Vpopmail - virtual domains for qmail: http://vpopmail.sf.net/
QmailAdmin - web interface for Vpopmail: http://qmailadmin.sf.net/



!DSPAM:4756f8b332001478990189!



Re: [vchkpw] mysql sourcing read/update server config file

2007-12-05 Thread Tom Collins

On Dec 5, 2007, at 2:51 AM, Hartmut Wernisch wrote:

So now I am wondering why line 197-202 is setting the values to
MYSQL_READ_SOCKET and MYSQL_READ_PORT instead of MYSQL_UPDATE_SOCKET
and MYSQL_UPDATE_PORT?

In my opinion these values should be set to MYSQL_UPDATE_SOCKET and
MYSQL_UPDATE_PORT?



You are correct, and that probably fixes an outstanding bug report on  
SourceForge.  Most people use the same info for read and update, so  
no one has fixed the problem before.


Rick, another fix for the next release.

--
Tom Collins  -  [EMAIL PROTECTED]
Vpopmail - virtual domains for qmail: http://vpopmail.sf.net/
QmailAdmin - web interface for Vpopmail: http://qmailadmin.sf.net/



!DSPAM:4756f8ce32009276917098!



Re: [vchkpw] hyphen in local address part

2007-12-05 Thread Hartmut Wernisch
On 05 Dec 07, Tren Blackburn wrote:
> Try disabling qmail-ext in your vpopmail build and see what happens.


Yes, disabling qmail-ext parses the .qmail file, which also can be seen
in the source code after the part I have posted, but this breaks other
things in my setup (i.e. mailing-list handling)

Regards,
Hartmut

> 
> Regards,
> 
> Tren
> 
> - Original Message -
> From: Hartmut Wernisch <[EMAIL PROTECTED]>
> To: vchkpw@inter7.com 
> Sent: Wed Dec 05 00:52:39 2007
> Subject: Re: [vchkpw] hyphen in local address part
> 
> Hello it's me again!
> 
> 
> I examined the source code of vdelivermail.c and in my understanding
> ".qmail" is never parsed for addresses with hyphens. Only ".qmail-..."
> are parsed.
> Can anybody confirm my assumption or proof it wrong? 
> 
> 
> 
> code snip from version 2.4.25:
> 
> [vdelivermail.c]
>  .
>  .
>  .
>  810 int check_forward_deliver(char *dir)
>  811 {
>  812  static char qmail_line[500];
>  813  FILE *fs;
>  814  int i;
>  815  int return_value = 0;
>  816 
>  817 #ifdef QMAIL_EXT
>  818  char tmpbuf[500];
>  819 #endif
>  820 
>  821 chdir(dir);
>  822 
>  823 #ifdef QMAIL_EXT
>  824 /* format the file name */
>  825 if (strlen(TheExt)) {
>  826 strcpy(tmpbuf,".qmail-");
>  827 strcat(tmpbuf,TheExt);
>  828 if ( (fs = fopen(tmpbuf,"r")) == NULL ) {
>  829 for (i=strlen(TheExt);i>=0;--i) {
>  830 if (!i || TheExt[i-1]=='-') {
>  831 strcpy(tmpbuf,".qmail-");
>  832 strncat(tmpbuf,TheExt,i);
>  833 strcat(tmpbuf,"default");
>  834 if ( (fs = fopen(tmpbuf,"r")) != NULL) {
>  835 break;
>  836 }
>  837 }
>  838 }
>  839 }
>  840 } else {
>  841 fs = fopen(".qmail","r");
>  842 }
>  843 #else
>  844 fs = fopen(".qmail","r");
>  845 #endif
>  .
>  .
> 
> [vdelivermail.c/]
> 
> 
> best,
> Hartmut
> 
> On 27 Nov 07, Hartmut Wernisch wrote:
> > 
> > Hello!
> > 
> > 
> > vpopmail (5.4.25) ignores the .qmail file for addresses with 
> > a hyphen in the local part like "foo-bar".
> > 
> > I know about the qmail-extension but I think that the .qmail file should
> > be processed anyway?!
> > My (very) old vpopmail (5.4.4) version respected the .qmail file!
> > 
> > Is this a bug or is my understanding/config wrong?
> > 
> > 
> > vpopmail version 5.4.25 with following compile options:
> > 
> > ./configure --prefix=/var/vpopmail --enable-logging=p \
> >  --enable-auth-module=mysql --disable-passwd \
> >  --enable-clear-passwd=no --enable-many-domains \
> >  --enable-auth-logging --enable-valias \
> >  --enable-mysql-limits=no --enable-qmail-ext=y \
> >  --enable-ip-alias-domains=y \
> >  --enable-libdir=/usr/include/mysql \
> >  --enable-mysql-replication --enable-file-locking=n
> > 
> > 
> > vpopmail version 5.4.4 with following compile options:
> > ./configure  --enable-qmail-ext=y --prefix=/var/vpopmail \
> >  --enable-ip-alias-domains=y --enable-logging=p \
> >  --enable-domainquotas=y
> > 
> > 
> > 
> > Thanks in advance!
> > Hartmut
> > 
> > 
> > 
> > 
> 
> 
> 
> 
> 
> 

-- 
DI Hartmut Wernisch
Technischer Leiter (CIO)Domaintechnik.at
email: [EMAIL PROTECTED]  Wiener Strasse 2
www:   www.domaintechnik.at A-5202 Neumarkt/Wallersee

!DSPAM:47566ad832001645415496!



Re: [vchkpw] hyphen in local address part

2007-12-05 Thread Tren Blackburn
Try disabling qmail-ext in your vpopmail build and see what happens.

Regards,

Tren

- Original Message -
From: Hartmut Wernisch <[EMAIL PROTECTED]>
To: vchkpw@inter7.com 
Sent: Wed Dec 05 00:52:39 2007
Subject: Re: [vchkpw] hyphen in local address part

Hello it's me again!


I examined the source code of vdelivermail.c and in my understanding
".qmail" is never parsed for addresses with hyphens. Only ".qmail-..."
are parsed.
Can anybody confirm my assumption or proof it wrong? 



code snip from version 2.4.25:

[vdelivermail.c]
 .
 .
 .
 810 int check_forward_deliver(char *dir)
 811 {
 812  static char qmail_line[500];
 813  FILE *fs;
 814  int i;
 815  int return_value = 0;
 816 
 817 #ifdef QMAIL_EXT
 818  char tmpbuf[500];
 819 #endif
 820 
 821 chdir(dir);
 822 
 823 #ifdef QMAIL_EXT
 824 /* format the file name */
 825 if (strlen(TheExt)) {
 826 strcpy(tmpbuf,".qmail-");
 827 strcat(tmpbuf,TheExt);
 828 if ( (fs = fopen(tmpbuf,"r")) == NULL ) {
 829 for (i=strlen(TheExt);i>=0;--i) {
 830 if (!i || TheExt[i-1]=='-') {
 831 strcpy(tmpbuf,".qmail-");
 832 strncat(tmpbuf,TheExt,i);
 833 strcat(tmpbuf,"default");
 834 if ( (fs = fopen(tmpbuf,"r")) != NULL) {
 835 break;
 836 }
 837 }
 838 }
 839 }
 840 } else {
 841 fs = fopen(".qmail","r");
 842 }
 843 #else
 844 fs = fopen(".qmail","r");
 845 #endif
 .
 .

[vdelivermail.c/]


best,
Hartmut

On 27 Nov 07, Hartmut Wernisch wrote:
> 
> Hello!
> 
> 
> vpopmail (5.4.25) ignores the .qmail file for addresses with 
> a hyphen in the local part like "foo-bar".
> 
> I know about the qmail-extension but I think that the .qmail file should
> be processed anyway?!
> My (very) old vpopmail (5.4.4) version respected the .qmail file!
> 
> Is this a bug or is my understanding/config wrong?
> 
> 
> vpopmail version 5.4.25 with following compile options:
> 
>   ./configure --prefix=/var/vpopmail --enable-logging=p \
>--enable-auth-module=mysql --disable-passwd \
>--enable-clear-passwd=no --enable-many-domains \
>--enable-auth-logging --enable-valias \
>--enable-mysql-limits=no --enable-qmail-ext=y \
>--enable-ip-alias-domains=y \
>--enable-libdir=/usr/include/mysql \
>--enable-mysql-replication --enable-file-locking=n
> 
> 
> vpopmail version 5.4.4 with following compile options:
>   ./configure  --enable-qmail-ext=y --prefix=/var/vpopmail \
>--enable-ip-alias-domains=y --enable-logging=p \
>--enable-domainquotas=y
> 
> 
> 
> Thanks in advance!
> Hartmut
> 
> 
> 
> 





!DSPAM:4756676932001178316281!


Re: [vchkpw] After 7 years of neglect Qmail is now ours

2007-12-05 Thread Christopher Chan



Public Domain.  That is a valid choice on SouceForge.



:-)




I hope you can garner more support.


Me too...  We'll see I'm about to reply to you on the qmail list and 
we'll see what happens...




Well, now that Charles has responded...

You did previously say that you would rather not have a qmail 
specifically for vpopmail. Are you going to stick to that? At the 
moment, I do not see netqmail adding support for user verification at 
rcpt to time in the near future...


!DSPAM:4756b83c32001521588453!



Re: [vchkpw] mysql sourcing read/update server config file

2007-12-05 Thread Rick Widmer



Tom Collins wrote:

On Dec 5, 2007, at 2:51 AM, Hartmut Wernisch wrote:

So now I am wondering why line 197-202 is setting the values to
MYSQL_READ_SOCKET and MYSQL_READ_PORT instead of MYSQL_UPDATE_SOCKET
and MYSQL_UPDATE_PORT?

In my opinion these values should be set to MYSQL_UPDATE_SOCKET and
MYSQL_UPDATE_PORT?



You are correct, and that probably fixes an outstanding bug report on 
SourceForge.  Most people use the same info for read and update, so no 
one has fixed the problem before.


Added to cvs.

Tom:  Do you have the tracker number?  I did not see anything that 
jumped out at me from the open reports, or even the first 50 any entries.


Rick

!DSPAM:4757551332001174195099!



Re: [vchkpw] After 7 years of neglect Qmail is now ours

2007-12-05 Thread Rick Widmer



Christopher Chan wrote:



Public Domain.  That is a valid choice on SouceForge.



:-)




I hope you can garner more support.


Me too...  We'll see I'm about to reply to you on the qmail list and 
we'll see what happens...




Well, now that Charles has responded...

You did previously say that you would rather not have a qmail 
specifically for vpopmail. Are you going to stick to that? 


Yes.  As far as I am concerned, the project is not possible without the 
support of the major qmail players.  I will probably see about shutting 
it down.


At the 
moment, I do not see netqmail adding support for user verification at 
rcpt to time in the near future...


We'll see what happens.  I haven't had a chance to look at netqmail-1.06 
yet, but I see it is now out.



Rick

!DSPAM:475758fc32001368557541!



Re: [vchkpw] hyphen in local address part

2007-12-05 Thread Rick Widmer



Tom Collins wrote:


Hartmut, can you test this fix?  Rick, can you get this into the next 
vpopmail release if Hartmut reports it as good?



That looks like a reasonable fix to me.  Hartmut: can you check it 
before I commit the patch?


Rick

!DSPAM:4757599032005180316192!



Re: [vchkpw] After 7 years of neglect Qmail is now ours

2007-12-05 Thread Christopher Chan


Yes.  As far as I am concerned, the project is not possible without the 
support of the major qmail players.  I will probably see about shutting 
it down.


none of the lads here interested? I doubt many of you use vpopmail with 
postfix like i do and now that qmail is public domain, i will probably 
try to lift some code for a postfix qmail lda...but surely there is 
interest in a proper qmail based smtp frontend?




At the moment, I do not see netqmail adding support for user 
verification at rcpt to time in the near future...


We'll see what happens.  I haven't had a chance to look at netqmail-1.06 
yet, but I see it is now out.


Same as netqmail-1.04 plus the qmail-isoc patch for the qmail-smtpd 
signed integer bug. So no vpopmail user verification support.


!DSPAM:4757611532006275313444!



Re: [vchkpw] After 7 years of neglect Qmail is now ours

2007-12-05 Thread aichains
On Wed, 2007-12-05 at 19:05 -0700, Rick Widmer wrote:
> 
> Christopher Chan wrote:
> > 
> >> Public Domain.  That is a valid choice on SouceForge.
> >>
> > 
> > :-)
> > 
> >>
> >>> I hope you can garner more support.
> >>
> >> Me too...  We'll see I'm about to reply to you on the qmail list and 
> >> we'll see what happens...
> >>
> > 
> > Well, now that Charles has responded...
> > 
> > You did previously say that you would rather not have a qmail 
> > specifically for vpopmail. Are you going to stick to that? 
> 
> Yes.  As far as I am concerned, the project is not possible without the 
> support of the major qmail players.  I will probably see about shutting 
> it down.
> 
> > At the 
> > moment, I do not see netqmail adding support for user verification at 
> > rcpt to time in the near future...
> 
> We'll see what happens.  I haven't had a chance to look at netqmail-1.06 
> yet, but I see it is now out.
> 
> 
> Rick
> 
> 
> 

it appears 1.06 is for legal purposes only...no changes to the codebase.
this is an excerpt from the top of netqmail-1.06/CHANGES

20071130 version: netqmail 1.06
20071130 legal: qmail-1.03 is now in the public domain
20051103 doc: dot-qmail.9 updated for changed (19980613) ...

btw the link on the homepage http://www.qmail.org/netqmail/CHANGES
still references the changelog from 1.05, but inside
http://www.qmail.org/netqmail-1.06.tar.gz tarball there is an updated
CHANGES file.


-- 
aichains <[EMAIL PROTECTED]>


!DSPAM:4757785e32001514716618!



Re: [vchkpw] mysql sourcing read/update server config file

2007-12-05 Thread Tom Collins

On Dec 5, 2007, at 5:49 PM, Rick Widmer wrote:
Tom:  Do you have the tracker number?  I did not see anything that  
jumped out at me from the open reports, or even the first 50 any  
entries.



Maybe it was something that I saw on the list.  I went in and looked  
at the trackers and didn't see anything.


-Tom



!DSPAM:4757804532001552416675!