/[smeserver]/rpms/qpsmtpd/sme9/qpsmtpd-0.96-remove_karma_rcpt_handler.patch
ViewVC logotype

Annotation of /rpms/qpsmtpd/sme9/qpsmtpd-0.96-remove_karma_rcpt_handler.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Wed Jun 15 20:22:07 2016 UTC (7 years, 11 months ago) by vip-ire
Branch: MAIN
CVS Tags: qpsmtpd-0_96-6_el6_sme, qpsmtpd-0_96-8_el6_sme, qpsmtpd-0_96-7_el6_sme, qpsmtpd-0_96-10_el6_sme, qpsmtpd-0_96-11_el6_sme, qpsmtpd-0_96-9_el6_sme, HEAD
* Wed Jun 15 2016 Daniel Berteaud <daniel@firewall-services.com> 0.96-6.sme
- Remove karma rcpt handling (buggy and doesn't make a lot of sense)
  [SME: 9502]

1 vip-ire 1.1 diff -Nur qpsmtpd-0.96/plugins/karma qpsmtpd-0.96_bz9462/plugins/karma
2     --- qpsmtpd-0.96/plugins/karma 2016-06-15 22:06:13.483902705 +0200
3     +++ qpsmtpd-0.96_bz9462/plugins/karma 2016-06-15 22:11:15.371747989 +0200
4     @@ -274,7 +274,6 @@
5     #$self->prune_db(); # keep the DB compact
6     $self->register_hook('connect', 'connect_handler');
7     $self->register_hook('mail', 'from_handler');
8     - $self->register_hook('rcpt', 'rcpt_handler');
9     $self->register_hook('data', 'data_handler');
10     $self->register_hook('data_post', 'data_handler');
11     $self->register_hook('disconnect', 'disconnect_handler');
12     @@ -380,44 +379,6 @@
13     return DECLINED;
14     }
15    
16     -sub rcpt_handler {
17     - my ($self,$transaction, $recipient, %args) = @_;
18     -
19     - $self->illegal_envelope_format(
20     - $self->connection->notes('envelope_rcpt'),
21     - );
22     -
23     - my $count = $self->connection->notes('recipient_count') || 0;
24     - $count++;
25     - if ( $count > 1 ) {
26     - $self->log(LOGINFO, "recipients c: $count ($recipient)");
27     - $self->connection->notes('recipient_count', $count);
28     - }
29     -
30     - return DECLINED if $self->is_immune();
31     -
32     - my $recipients = scalar $self->transaction->recipients or do {
33     - $self->log(LOGDEBUG, "info, no recipient count");
34     - return DECLINED;
35     - };
36     - $self->log(LOGINFO, "recipients t: $recipients ($recipient)");
37     -
38     - my $history = $self->connection->notes('karma_history');
39     - if ( $history > 0 ) {
40     - $self->log(LOGINFO, "info, good history");
41     - return DECLINED;
42     - }
43     -
44     - my $karma = $self->connection->notes('karma');
45     - if ( $karma > 0 ) {
46     - $self->log(LOGINFO, "info, good connection");
47     - return DECLINED;
48     - }
49     -
50     - # limit # of recipients if host has negative or unknown karma
51     - return DENY, "too many recipients for karma $karma (h: $history)";
52     -}
53     -
54     sub data_handler {
55     my ($self, $transaction) = @_;
56    

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed