HI Markus,

> Unexpectedly, I'm currently sending a newsletter again with 8k+
> recipients. So what kind of debug information do you need?
> 
> And I think I discovered another bug:
> 
> > [2008/07/17-23:25:46 - 7396] [CORE] INFO: module=Quotas, mode=update, 
> > host=192.168.98.31, helo=automatix.seier.at, [EMAIL PROTECTED], [EMAIL 
> > PROTECTED], reason=quota_update, policy=6, quota=3, limit=4, 
> > track=Recipient:@styriawest.at, counter=MessageCount, quota=1/25 (4.0%)
> > [2008/07/17-23:25:46 - 7396] [CORE] INFO: module=Quotas, action=none, 
> > host=192.168.98.31, helo=automatix.seier.at, [EMAIL PROTECTED], [EMAIL 
> > PROTECTED], reason=no_quota
> 
> so the message should be accepted, but
> 
> > Jul 17 23:25:50 automatix postfix/smtp[7392]: A32F971A4F: to=<[EMAIL 
> > PROTECTED]>, relay=192.168.98.31[192.168.98.31]:2025, conn_use=11, 
> > delay=36194, delays=35377/810/1/6.1, dsn=4.5.3, status=deferred (host 
> > 192.168.98.31[192.168.98.31] said: 452 4.5.3 <END-OF-MESSAGE>: End-of-data 
> > rejected: No more transactions for this domain allowed (in reply to end of 
> > DATA command))
> 
> there seems to be a similar problem with the check at end-of-data as we
> discussed tuesday?

I have reproduced the problem with 100% accuracy.

I can also confirm the patch I posted named
protocols-init-data-per-request.diff fixes it.

Here are the steps to reproduce...
1. Setup a policy matching something
2. Attach a quota & limit to the policy (I used 5 messages)
3. Exceed the policy and get rejection message, the email must match the
policy every time
4. Send a valid email (may or may not get rejected depending on which
thread answers)
5. If #4 didn't reproduce the problem, wait 30 seconds, try again and
you'll get a rejection message.

(you can also set the number of servers 1 one to get #4 hit the bug
every time)

With the patch I'm unable, using the above steps, to reproduce the
problem.

-N
Index: cbpolicyd
===================================================================
--- cbpolicyd	(revision 261)
+++ cbpolicyd	(working copy)
@@ -381,6 +381,9 @@
 
 	# Set protocol handler
 	$server->{'_protocol_handler'} = $found;
+
+	# If we have a init function, call it before processing...
+	$server->{'_protocol_handler'}->{'protocol_init'}($self) if (defined($server->{'_protocol_handler'}->{'protocol_init'}));
 	
 	# Process buffer
 	my $request = $server->{'_protocol_handler'}->{'protocol_parse'}($self,$buf);
Index: cbp/protocols/Bizanga.pm
===================================================================
--- cbp/protocols/Bizanga.pm	(revision 261)
+++ cbp/protocols/Bizanga.pm	(working copy)
@@ -37,6 +37,7 @@
 	name 			=> "Bizanga Protocol Support Module",
 	init		 	=> \&init,
 	priority	 	=> 50,
+	protocol_init	=> \&protocol_init,
 	protocol_check	=> \&protocol_check,
 	protocol_parse	=> \&protocol_parse,
 	protocol_response	=> \&protocol_response,
@@ -68,6 +69,13 @@
 }
 
 
+# Initialize per request data...
+sub protocol_init {
+	$response = undef;
+	$response_data = undef;
+}
+
+
 # Check the buffer to see if this protocol is what we want
 sub protocol_check {
 	my ($server,$buffer) = @_;
Index: cbp/protocols/Postfix.pm
===================================================================
--- cbp/protocols/Postfix.pm	(revision 261)
+++ cbp/protocols/Postfix.pm	(working copy)
@@ -33,6 +33,7 @@
 	name 			=> "Postfix SMTP Access Delegation Protocol Suppot Module",
 	init		 	=> \&init,
 	priority	 	=> 50,
+	protocol_init	=> \&protocol_init,
 	protocol_check	=> \&protocol_check,
 	protocol_parse	=> \&protocol_parse,
 	protocol_response	=> \&protocol_response,
@@ -64,6 +65,13 @@
 }
 
 
+# Initialize per request data...
+sub protocol_init {
+	$response = undef;
+	$response_data = undef;
+}
+
+
 # Check the buffer to see if this protocol is what we want
 sub protocol_check {
 	my ($server,$buffer) = @_;

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Users mailing list
[email protected]
http://lists.policyd.org/mailman/listinfo/users

Reply via email to