This is not a chkuser problem, as chkuser simply uses qmail philosophy, checking for aliases in the qmail way.


Anyway, I'm planning to add an option excluding any acceptance for "default" user (I'm thinking this since two years, but I've forgot to do until now) . This has nothing to do with the bounce string.

I don't see any reason to check for the content of alias, looking for a "bouncing" string. Apart .qmail-default, I don't see a reason why a .qmail-ALIAS should contain a bouncing string.

Instead, we should find a standard notation to identify a "custom reject string" for a single user. Something that can be put inside .qmail-ALIAS or inside user's .qmail-default. If such a notation is identified, rcpt is rejected with this message.

Ciao,

Tonino


At 20.43 17/04/2007, Stephane Bouvard (ML) wrote:
Hi,

With chkuser 2.0.8 (not yet updated to 2.0.9, sorry :)), someone reported me that chkuser wrongly accept emails adressed to [EMAIL PROTECTED] , as there is a .qmail-default "alias" file, even if this file specify bounce-no-mailbox...

The same problem occur for any alias defined (why ?) with bounce-no-mailbox...

Here's a little fix to verify if the alias is not bounce-no-mailbox...

--- chkuser.c   Tue Apr 17 20:11:24 2007
+++ chkuser.c   Tue Apr 17 20:31:24 2007
@@ -756,12 +756,20 @@ static int realrcpt (stralloc *sender, s
                 if (!stralloc_cats (&alias_path, tmp_path.s)) DIE_NOMEM();
                 if (!stralloc_0 (&alias_path)) DIE_NOMEM();

-               fd_file = open_read (alias_path.s);
-               if (fd_file != -1) {
-                       close (fd_file);
-                       retstat = CHKUSER_OK;
-                       break;
-               }
+                fd_file = open_read (alias_path.s);
+                read_char = 0;
+                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;
+                }
+
 #endif

        case 9:



--
Bien à toi...
 _
(_'  L'informatique est ma passion, vous la simplifier, mon métier !
,_)téphane Bouvard [antarex AT freenet DOT be] http://www.antarex.be

Reply via email to