Re: [vchkpw] hyphen in local address part
On 05 Dec 07, Rick Widmer wrote: > > > 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? Yes, I think I should have time for that today! - Hartmut > > Rick > > > !DSPAM:4757ac4f32001310910678!
Re: [vchkpw] hyphen in local address part
On 05 Dec 07, Tom Collins wrote: > 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: I removed the lines 840,841 and 843 - 845. > > 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? OK, this fix works at the first glance but I had a strange feeling about it, so I tested following: (I think in general there should be no ".qmail-something" files in mailboxes, only .qmail files?!) So if we have following example: - A mailbox called "hw" - A mailbox called "hw-foo" with following file in it: .qmail (It should be forwarded to an external address and delivered locally) Tests: 1) Mail to "hw-foo": -> works 2) Mail to "hw-foo-bar": -> wrong! - Mail is forwared correctly to the external address in .qmail - Mail is delivered to the mailbox of "hw" instead of "hw-de"! Creating a ".qmail-bar" file in the mailbox of "hw-foo": (It should be forwarded to an external address and delivered locally) 3) Mail to "hw-foo": -> works 4) Mail to "hw-foo-bar": -> wrong! - Mail is forwarded to the external address of .qmail file in the Mailbox of "hw-de" - Mail is delivered to the mailbox of "hw" instead of "hw-de"! Btw, I have tripple-checked the content of the .qmail and .qmail-test files ;) So the results are not consistent to me. Even if there is only the .qmail file (no .qmail-something) in the mailbox directory the reverse resolution of qmail extension seems to be wrong ( see test 2). It seems that .qmail files and corresponding mailboxes are getting out of sync :-/ Regards, -Hartmut > > -- > Tom Collins - [EMAIL PROTECTED] > Vpopmail - virtual domains for qmail: http://vpopmail.sf.net/ > QmailAdmin - web interface for Vpopmail: http://qmailadmin.sf.net/ > > > > > !DSPAM:4757d23532007720715136!
Re: [vchkpw] hyphen in local address part
On 06 Dec 07, Hartmut Wernisch wrote: > On 05 Dec 07, Tom Collins wrote: > > 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: > > I removed the lines 840,841 and 843 - 845. > > > > > 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? > > OK, this fix works at the first glance but I had a strange feeling > about it, so I tested following: > > > > (I think in general there should be no ".qmail-something" files in > mailboxes, only .qmail files?!) > Sorry, the mailbox of "hw" had also the same external forwarding email address so the right test results are less confusing :) So if we have following example: - A mailbox called "hw" - A mailbox called "hw-foo" with following file in it: .qmail (It should be forwarded to an external address and delivered locally) Tests: 1) Mail to "hw-foo": -> works 2) Mail to "hw-foo-bar": -> wrong! - Mail is delivered to the mailbox of "hw" instead of "hw-de"! Creating a ".qmail-bar" file in the mailbox of "hw-foo": (It should be forwarded to an external address and delivered locally) 3) Mail to "hw-foo": -> works 4) Mail to "hw-foo-bar": -> wrong! - Mail is delivered to the mailbox of "hw" instead of "hw-de"! So it seems that the reverse qmail-ext parsing is not correct. Regards, Hartmut !DSPAM:4757dbc332004177430474!
Re: [vchkpw] mysql sourcing read/update server config file
On 05 Dec 07, 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. In the current vpopmail version with mysql support tries to reconnect to the update server for database queries if an update server was configured in the vpopmail.mysql. I have extended vpopmail to do the same with updates to the update database server. This was realy hard work ;) vpopmail.mysql is extended by a third server configuration line and also the parser in vmysql.c is. It is not a beautiful but a simple patch which works well for me. I have a fully automated setup where also updates happens to non office times. Therefor "failover" for update server queries are good for my sleep ;) Maybe you are interessed in it for an upcoming release? (Or do a better solution) Best, Hartmut > > 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:4758040732004317911302!
Re: [vchkpw] SQL error after upgrade
Hi, > I have to upgrade vpopmail from 5.4.16 because I'm using the > validrcptto patch and need the onchange feature which is not included > in 5.4.16, yet. However, after upgrading to 5.4.20, the POP3 server > will send me the error > > vmysql: error creating table 'limits': Table 'limits' already exists > > as soon as I try to authenticate. The logs (syslog) will show me as > authenticated but my email client will disconnect with an error. > > I don't understand this message because I would expect the table to > exist. Searching the internet didn't get me anywhere, either. > > Any hints? Just in case anyone ever finds this in the archive... I have solved the problem. I realised that the limits table is actually empty. So I just deleted it and had vpopmail create it and everything worked fine. :) I ended up going to 5.4.22 because apparently 5.4.22 was buggy and therefore vdeluser always segfaulted. But as soon as I was on 5.4.22, everything worked fine with the fix mentioned above. Cheers, Christian !DSPAM:47588db532009227019518!