On 4/17/2007 2:43 PM, Stephane Bouvard (ML) wrote: > Here's a little fix to verify if the alias is not bounce-no-mailbox... [...] > + if (fd_file != -1) { > + read_char = read (fd_file, read_buf, > sizeof(read_buf) - 1); > + close (fd_file); > + if (read_char < 0) read_char = 0; > + } > + read_buf[read_char] = 0; > + > + if ( strstr(read_buf, CHKUSER_BOUNCE_STRING) == NULL ) { > + retstat = CHKUSER_OK; > + break; > + } > +
Great idea. I'm no C guy, but shouldn't that second conditinal be inside the first? + if (fd_file != -1) { + read_char = read (fd_file, read_buf, sizeof(read_buf) - 1); + close (fd_file); + if (read_char < 0) read_char = 0; + read_buf[read_char] = 0; + + if ( strstr(read_buf, CHKUSER_BOUNCE_STRING) == NULL ) { + retstat = CHKUSER_OK; + break; + } + } Otherwise if the .qmail-user does not exist, retstat = 1 or am I being silly ? -- Jeremy Kister http://jeremy.kister.net./