Re: [vchkpw] [SPAM] block vpopmail brute force

2012-09-06 Thread Hartmut Wernisch | Domaintechnik.at
Hello!


I am using fail2ban (http://www.fail2ban.org/wiki/index.php/Main_Page).
Maybe it is useful for you, too.


Best,
Harti

On 06 Sep 12, Thibault Richard wrote:
 Hello,
 
 It seems good !
 
 For such purpose I use this kind of rules
 
 iptables -P INPUT DROP
 ...
 iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
 ...
 iptables -A INPUT -m state --state NEW -p TCP --dport 110 --syn -m limit 
 --limit 3/s --limit-burst 3 -j ACCEPT
 ...
 iptables -A INPUT -i lo -s 0.0.0.0/0 -d 0.0.0.0/0 -j ACCEPT
 ...
 iptables -A INPUT -m state --state NEW -j DROP
 
 
 If more than 3 connection/sec on POP3 port, drop the packet (in fact the real 
 rule is drop everything except if less than 3/sec on POP3 port )
 
 
 -Original Message-
 From: John Stile [mailto:j...@stilen.com] 
 Sent: jeudi 6 septembre 2012 08:04
 To: vchkpw@inter7.com
 Subject: [vchkpw] [SPAM] block vpopmail brute force
 
 Has anyone experienced people trying to brute force vpopmail?  
 
 I'm sick of it, so I cron'ed a little script others might enjoy.
 
 http://stilen.com/scripts/perl/vpopmail_fail2drop.pl
 
 Feedback appreciated.
 
 
 
 
 
 
 
 
 
 


!DSPAM:5048545334212031748905!



Re: [vchkpw] [SPAM] Problem with authentication

2012-04-10 Thread Hartmut Wernisch | Domaintechnik.at
On 08 Apr 12, David Leangen wrote:
 
 Hello!
 
 I just set up a new instance of vpopmail, but it's not going as well as it 
 usually does. I've set up about 10 or so servers over the past years, and 
 usually the installation goes very smoothly.
 
 The problem is with authentication.
 
 When I run my test:
 
 /var/qmail/bin/qmail-popup blah /home/vpopmail/bin/vhckpw pwd

is this just a typo? -^

Best
-harti

 +OK 17922.1333842429@blah
 user t...@test.com
 +OK 
 pass asdf
 -ERR authorization failed
 
 
 Usually that test works just fine...
 
 Has something changed?
 
 Thanks!
 =David
 
 
 
 


!DSPAM:4f83de4334848540410135!



[vchkpw] ignoring quotas if .qmail exists

2011-05-25 Thread Hartmut Wernisch | Domaintechnik.at
Hello!

I investigated that our quotas are ignored if the .qmail file exists
in the mailbox.
After some research I found that this behaviour was discussed 2003 in
the mailing list, too:

http://www.mail-archive.com/vchkpw@inter7.com/msg10744.html


Will/can this be fixed or are there some reasons for that?

Best regards,
Hartmut

!DSPAM:4ddcb17032711715311411!



Re: [vchkpw] ignoring quotas if .qmail exists

2011-05-25 Thread Hartmut Wernisch | Domaintechnik.at
On 25 May 11, Hartmut Wernisch | Domaintechnik.at wrote:
 Hello!
 
 I investigated that our quotas are ignored if the .qmail file exists
 in the mailbox.

I am using vpopmail 5.4.33 with vusaged on Debian Squeeze:

./configure --prefix=/var/vpopmail \
--enable-logging=p  \
--disable-passwd \
--enable-auth-logging  \
--enable-qmail-ext=y \
--enable-ip-alias-domains=y 


 After some research I found that this behaviour was discussed 2003 in
 the mailing list, too:
 
 http://www.mail-archive.com/vchkpw@inter7.com/msg10744.html
 
 
 Will/can this be fixed or are there some reasons for that?
 

Best regards,
Hartmut

!DSPAM:4ddcb6fc32718147712508!



[vchkpw] quotawarn file in users maildir

2011-05-11 Thread Hartmut Wernisch | Domaintechnik.at
Hello!

I have installed vpopmail 5.4.33 and I plan to use quotas with vusaged.

After some research I found that the quota warning messages are sent
once in 24 hours (except the Maildir/quotawarn file is deleted
manually).

Therefor, the owner of the mailbox gets a warning mail, remove some
mails within the 24 hours and did not recognize if the mailbox is over
quota until the 24 hours are over. Even worse, he will think that he has
solved the problem while new mails are bouncing.

In my opinion it would be better if vpopmail removes the quotawarn file
if the user is below the quota warning threshold. Vpopmail anyway hast
to query if the mailbox is over quota on new mails so why not delete an existing
quotawarn file if the mailbox is below the threshold?

Best regards,
Hartmut

!DSPAM:4dca5bbf32711017712204!



Re: [vchkpw] Help with java using vpopmail database

2007-12-14 Thread Hartmut Wernisch
On 13 Dec 07, Rick Widmer wrote:
 
 
 Luciano Bolonheis wrote:
 Hi,
 i installed vpopmail on a server and now other person wants to
 authenticate a software he is developing in the vpopmail database. He
 is coding in Java.
 Can anyone tell me how can he do it ? The function to use, or the
 method used by vpopmail...
 
 It depends on which back end you are using.  If it is a sql database 
 like mysql or posgresql use Java to connect to the database.  If you are 
 using the cdb back end use Class Cdb:
 
 http://www.strangegizmo.com/products/sg-cdb/doc/com/strangegizmo/cdb/Cdb.html
 
 In general idea is to just access the database directly and check the 
 password either in the query, or looking at the returned data.

I would prefer to use password checking from vpopmail like you do with
qmail if it is possible:

 /var/qmail/bin/qmail-smtpd /var/vpopmail/bin/vchkpw /bin/true

So you software will not depend on the backend you are using or any
other changes.

Best,
Hartmut


!DSPAM:47625cd432007811420334!



Re: [vchkpw] hyphen in local address part

2007-12-13 Thread Hartmut Wernisch
On 06 Dec 07, Hartmut Wernisch wrote:
 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:
 
  
 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!

sry test output for 2) was:

 - Mail is delivered to the mailbox of hw instead of hw-foo!

  
  
 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!

sry test outpu for test 4) was:

 - Mail is delivered to the mailbox of hw instead of hw-foo!



I think the problem is in here?!:

217 
218 #ifdef QMAIL_EXT
219 /* !! Shouldn't this work its way backwards, and try all 
possibilities?
220  * e.g., a-b-c-d should try a-b-c then a-b then a, instead of just 
a?
221  */
222 /* delete the '-' and following chars if any and store in 
TheUserExt */
223 for(i = 0; (TheUser[i] != 0)  (TheUser[i] != '-' ); i++) {
224 TheUserExt[i] = TheUser[i];
225 }
226 TheUserExt[i] = 0;
227 
228 if ( is_username_valid(TheUserExt) != 0 ) {
229 vexit(EXIT_BOUNCE);
230 }
231 
232 strncpy(TheExt, TheUser[i+1], AUTH_SIZE);
233 for (i = 0; (TheExt[i] != 0); i++) {
234   if (TheExt[i] == '.') TheExt[i] = ':';
235 }
236 
237 #endif


Best,
Hartmut


!DSPAM:47610e0f32003535473722!



Re: [vchkpw] [SPAM] Footer for each domains

2007-12-12 Thread Hartmut Wernisch

On 13 Dec 07, Kenny Lee wrote:
 Hi all,
 
 How to add difference footer for each mail send out from difference email 
 domains?

I looked for such a thing one year ago, but dropped it again. Adding a
footer can easily break the whole mail. I think at least you have to
honor plain text and HTML mails differently.

Sorry that I can not provide a solution but only a warning :)

Regards,
Hartmut Wernisch


!DSPAM:4760e0d032001706846521!



Re: [vchkpw] hyphen in local address part

2007-12-06 Thread Hartmut Wernisch
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

2007-12-06 Thread Hartmut Wernisch
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

2007-12-06 Thread Hartmut Wernisch
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

2007-12-06 Thread Hartmut Wernisch
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] 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] 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 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!



[vchkpw] hyphen in local address part

2007-11-27 Thread Hartmut Wernisch

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:474c252632003703113950!