doh. you are right. I wonder why I didn't think of that myself. it works fine, 
thanks!

-- 
Igor


On Fri, Jul 01, 2005 at 08:49:38AM +0100, tonix (Antonio Nati) wrote:
-> 
-> There is no need to change the code...
-> 
-> Once you've enabled
->         #define CHKUSER_RCPT_LIMIT_VARIABLE "CHKUSER_RCPTLIMIT"
-> 
-> it's enought you declare this variable "CHKUSER_RCPTLIMIT" with the limit 
-> you want before running qmail-smtpd.
-> 
-> So add a
->         export CHKUSER_RCPTLIMIT=50
-> before running qmail-smtpd (and be sure it can see this variable);
-> 
-> Tonino
-> 
-> At 01.18 01/07/2005, you wrote:
-> >I went ahead and tried modifying chkuser. these two little quick and dirty 
-> >changes seem to make it work. I'm still open to hearing alternatives (if 
-> >there are any).
-> >
-> >--- ../chkuser-2.0.8b-release/chkuser.c 2004-12-08 17:10:36.000000000 -0800
-> >+++ chkuser.c   2005-06-30 17:10:44.192650158 -0700
-> >@@ -435,15 +435,10 @@
-> > #endif
-> >
-> > #if defined CHKUSER_RCPT_LIMIT_VARIABLE
-> >-        maxrcpt_string = env_get (CHKUSER_RCPT_LIMIT_VARIABLE);
-> >-        if (maxrcpt_string) {
-> >-                maxrcpt_limit = atoi (maxrcpt_string);
-> >+        maxrcpt_limit = CHKUSER_RCPT_LIMIT_VARIABLE;
-> >                 if (maxrcpt_limit < 1) {
-> >                         maxrcpt_limit = 0;
-> >                 }
-> >-        } else {
-> >-                maxrcpt_string = "";;
-> >-        }
-> > #endif
-> >
-> > #if defined CHKUSER_WRONGRCPT_LIMIT_VARIABLE
-> >
-> >
-> >
-> >--- ../chkuser-2.0.8b-release/chkuser_settings.h        2004-12-08 
-> >17:10:36.000000000 -0800
-> >+++ chkuser_settings.h  2005-06-30 17:01:28.512240856 -0700
-> >@@ -160,7 +160,7 @@
-> >  * The first reached, between CHKUSER_RCPT_LIMIT_VARIABLE and 
-> >CHKUSER_WRONGRCPT_LIMIT_VARIABLE,
-> >  * makes chkuser rejecting everything else
-> >  */
-> >-#define CHKUSER_RCPT_LIMIT_VARIABLE "CHKUSER_RCPTLIMIT"
-> >+#define CHKUSER_RCPT_LIMIT_VARIABLE 25
-> >
-> > /*
-> >  * Uncomment to define a variable which contains the max unknown 
-> >recipients number
-> >
-> >--
-> >Igor
-> >
-> >
-> >On Thu, Jun 30, 2005 at 04:21:24PM -0700, Igor Grinchenko wrote:
-> >-> Hello everyone,
-> >->
-> >-> I have a pop-before-smtp server running vpopmail 5.4.5. That server 
-> >only serves clients that supply a valid login/password pair.
-> >-> Some clients, however, started abusing this system by sending tons of 
-> >spam which gets us blacklisted in various RBL DBs.
-> >-> what I'm trying to do is use CHKUSER_RCPTLIMIT option to at least limit 
-> >the number of emails that gets sent at once.
-> >->
-> >-> it seems like for that I need to have the following line in 
-> >tcp.smtp.cdb for every entry: 
-> >RELAYCLIENT="",RBLSMTPD="",CHKUSER_RCPTLIMIT"<some number>"
-> >-> since vpopmail only creates RELAYCLIENT="",RBLSMTPD="" - it seems like 
-> >the only way is to hack vpopmail.c around line 2526.
-> >->
-> >-> another way is to hack chkuser to hardcode some value to 
-> >CHKUSER_RCPT_LIMIT_VARIABLE instead of looking at the env variable from 
-> >the cdb file.
-> >->
-> >-> which way should I go? I don't think I'll have a problem modifying 
-> >either source code, since it seems like a pretty straightforward change.
-> >->
-> >-> am I missing some other, simplier way?
-> >->
-> >-> --
-> >-> Igor
-> >->
-> >->
-> 
-> 

Reply via email to