I'm trying to set up SMTP outbound throttling. I have cluebringer installed
and I see data being added to my session_tacking table in mysql but nothing
in my quotas_tracking table.

as a test my rule is (limit user to sending 3 emails per hour)

Policy: Default Outbound
Name: Submission
Track: Sender:u...@domain
Period: 3600 (1 hour)
Verdict: Reject
Data: Throttle Limit Reached
Disabled: no
Type: Message Count
Counter Limit: 3
Disabled: no

My /etc/postfix/main.cf has

smtpd_recipient_restrictions = check_policy_service inet:127.0.0.1:10031,
permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
smtpd_end_of_data_restrictions = check_policy_service inet:127.0.0.1:10031

cbpolicyd log is set to level 4 with details for modules,tracking,policies
and it shows:

[2010/11/15-19:05:15 - 6392] [CORE] NOTICE: Process Backgrounded
[2010/11/15-19:05:15 - 6392] [CBPOLICYD] NOTICE: Policyd v2 / Cluebringer -
v2.0.10
[2010/11/15-19:05:15 - 6392] [CBPOLICYD] NOTICE: Initializing system
modules.
[2010/11/15-19:05:15 - 6392] [CBPOLICYD] NOTICE: System modules initialized.
[2010/11/15-19:05:15 - 6392] [CBPOLICYD] NOTICE: Module load started...
[2010/11/15-19:05:15 - 6392] [CORE] NOTICE:   => Quotas: enabled
[2010/11/15-19:05:15 - 6392] [CORE] NOTICE:   => Protocol(Postfix): enabled
[2010/11/15-19:05:15 - 6392] [CBPOLICYD] NOTICE: Module load done.
[2010/11/15-19:05:15 - 6392] [CBPOLICYD] DEBUG: Opening syslog, destination
= 'unix', facility = 'mail'.
[2010/11/15-19:05:15 - 6392] [CORE] NOTICE: 2010/11/15-19:05:15 cbp (type
Net::Server::PreFork) starting! pid(6392)
[2010/11/15-19:05:15 - 6392] [CORE] NOTICE: Binding to TCP port 10031 on
host *
[2010/11/15-19:05:15 - 6392] [CORE] NOTICE: Setting gid to "1005 1005"
[2010/11/15-19:05:15 - 6392] [CORE] NOTICE: Setting uid to "1005"
[2010/11/15-19:05:15 - 6392] [CORE] INFO: Setting up serialization via flock
[2010/11/15-19:05:15 - 6392] [CORE] INFO: Beginning prefork (4 processes)
[2010/11/15-19:05:15 - 6392] [CORE] INFO: Starting "4" children
[2010/11/15-19:05:15 - 6393] [CORE] DEBUG: Child Preforked (6393)
[2010/11/15-19:05:15 - 6393] [CBPOLICYD] DEBUG: Starting up caching engine
[2010/11/15-19:05:15 - 6394] [CORE] DEBUG: Child Preforked (6394)
[2010/11/15-19:05:15 - 6394] [CBPOLICYD] DEBUG: Starting up caching engine
[2010/11/15-19:05:15 - 6395] [CORE] DEBUG: Child Preforked (6395)
[2010/11/15-19:05:15 - 6392] [CORE] DEBUG: Parent ready for children.
[2010/11/15-19:05:15 - 6395] [CBPOLICYD] DEBUG: Starting up caching engine
[2010/11/15-19:05:15 - 6396] [CORE] DEBUG: Child Preforked (6396)
[2010/11/15-19:05:15 - 6396] [CBPOLICYD] DEBUG: Starting up caching engine
[2010/11/15-19:07:10 - 6392] [CORE] INFO: Starting "1" children
[2010/11/15-19:07:10 - 6394] [CORE] INFO: 2010/11/15-19:07:10 CONNECT TCP
Peer: "127.0.0.1:42233" Local: "127.0.0.1:10031"
[2010/11/15-19:07:10 - 6420] [CORE] DEBUG: Child Preforked (6420)
[2010/11/15-19:07:10 - 6420] [CBPOLICYD] DEBUG: Starting up caching engine
[2010/11/15-19:07:10 - 6394] [TRACKING] DEBUG: No session tracking data
exists for request: $VAR1 = {
          'ccert_fingerprint' => '',
          'sasl_method' => 'PLAIN',
          'sasl_sender' => '',
          'size' => '394',
          '_timestamp' => 1289848030,
          'helo_name' => '[192.168.13.63]',
          'reverse_client_name' => 'cedar.domain.com',
          'queue_id' => '',
          'encryption_cipher' => '',
          'encryption_protocol' => '',
          'etrn_domain' => '',
          'ccert_subject' => '',
          'request' => 'smtpd_access_policy',
          'protocol_state' => 'RCPT',
          'stress' => '',
          'recipient' => '[email protected]',
          'sasl_username' => '[email protected]',
          'instance' => '1910.4ce184de.93676.0',
          'protocol_name' => 'ESMTP',
          'encryption_keysize' => '0',
          'recipient_count' => '0',
          'ccert_issuer' => '',
          'sender' => '[email protected]',
          'client_name' => 'cedar.domain.com',
          'client_address' => '192.168.13.63',
          '_protocol_transport' => 'Postfix'
        };
[2010/11/15-19:07:10 - 6394] [TRACKING] DEBUG: Added session tracking
information for: $VAR1 = {
          'ccert_fingerprint' => '',
          'sasl_method' => 'PLAIN',
          'sasl_sender' => '',
          'size' => '394',
          '_timestamp' => 1289848030,
          'helo_name' => '[192.168.13.63]',
          'reverse_client_name' => 'cedar.domain.com',
          'queue_id' => '',
          'encryption_cipher' => '',
          'encryption_protocol' => '',
          'etrn_domain' => '',
          'ccert_subject' => '',
          'request' => 'smtpd_access_policy',
          'protocol_state' => 'RCPT',
          'stress' => '',
          'recipient' => '[email protected]',
          'sasl_username' => '[email protected]',
          'instance' => '1910.4ce184de.93676.0',
          'protocol_name' => 'ESMTP',
          'encryption_keysize' => '0',
          'recipient_count' => '0',
          'ccert_issuer' => '',
          'sender' => '[email protected]',
          'client_name' => 'cedar.domain.com',
          'client_address' => '192.168.13.63',
          '_protocol_transport' => 'Postfix'
        };
[2010/11/15-19:07:10 - 6394] [TRACKING] DEBUG: Protocol state is 'RCPT',
resolving policy...
[2010/11/15-19:07:10 - 6394] [POLICIES] DEBUG: Going to resolve session data
into policy: $VAR1 = {
          'Recipient' => '[email protected]',
          'SASLUsername' => '[email protected]',
          'QueueID' => '',
          'RecipientData' => '',
          'Instance' => '1910.4ce184de.93676.0',
          'EncryptionCipher' => '',
          'Size' => '394',
          'EncryptionKeySize' => '0',
          'EncryptionProtocol' => '',
          'Helo' => '[192.168.13.63]',
          'ClientAddress' => '192.168.13.63',
          'ClientName' => 'cedar.domain.com',
          'Sender' => '[email protected]',
          'SASLSender' => '',
          'Protocol' => 'ESMTP',
          'ClientReverseName' => 'cedar.domain.com',
          'SASLMethod' => 'PLAIN'
        };
[2010/11/15-19:07:10 - 6394] [POLICIES] DEBUG: Found policy member with ID
'1' in policy 'Default'
[2010/11/15-19:07:10 - 6394] [POLICIES] DEBUG: Found policy member with ID
'5' in policy 'Default Outbound'
[2010/11/15-19:07:10 - 6394] [POLICIES] DEBUG: Found policy member with ID
'9' in policy 'Default Inbound'
[2010/11/15-19:07:10 - 6394] [POLICIES] DEBUG: [ID:1/Name:Default]: Source
not defined or 'any', explicit match: matched=1
[2010/11/15-19:07:10 - 6394] [POLICIES] INFO: [ID:1/Name:Default]: Source
matching result: matched=1
[2010/11/15-19:07:10 - 6394] [POLICIES] DEBUG: [ID:1/Name:Default]:
Destination not defined or 'any', explicit match: matched=1
[2010/11/15-19:07:10 - 6394] [POLICIES] INFO: [ID:1/Name:Default]:
Destination matching result: matched=1
[2010/11/15-19:07:10 - 6394] [POLICIES] DEBUG: [ID:5/Name:Default Outbound]:
Main policy sources '!%internal_ips,!%internal_domains'
[2010/11/15-19:07:10 - 6394] [POLICIES] DEBUG: [ID:5/Name:Default Outbound]:
Group 'internal_ips' has 1 source(s) => 10.0.0.0/8
[2010/11/15-19:07:10 - 6394] [POLICIES] DEBUG: [ID:5/Name:Default
Outbound]=>(group:internal_ips): - Resolved source '10.0.0.0/8' to a IP/CIDR
specification, match = 0
[2010/11/15-19:07:10 - 6394] [POLICIES] DEBUG: [ID:5/Name:Default
Outbound]=>(group:internal_ips): Source group result: matched=0
[2010/11/15-19:07:10 - 6394] [POLICIES] DEBUG: [ID:5/Name:Default Outbound]:
Group 'internal_domains' has 0 source(s) =>
[2010/11/15-19:07:10 - 6394] [POLICIES] WARNING: [ID:5/Name:Default
Outbound]: No group members for source group 'internal_domains'
[2010/11/15-19:07:10 - 6394] [POLICIES] DEBUG: [ID:5/Name:Default
Outbound]=>(group:internal_domains): Source group result: matched=0
[2010/11/15-19:07:10 - 6394] [POLICIES] INFO: [ID:5/Name:Default Outbound]:
Source matching result: matched=1
[2010/11/15-19:07:10 - 6394] [POLICIES] DEBUG: [ID:5/Name:Default Outbound]:
Main policy destinations '%internal_domains'
[2010/11/15-19:07:10 - 6394] [POLICIES] DEBUG: [ID:5/Name:Default Outbound]:
Group 'internal_domains' has 0 destination(s) =>
[2010/11/15-19:07:10 - 6394] [POLICIES] WARNING: [ID:5/Name:Default
Outbound]: No group members for destination group 'internal_domains'
[2010/11/15-19:07:10 - 6394] [POLICIES] DEBUG: [ID:5/Name:Default
Outbound]=>(group:internal_domains): Destination group result: matched=0
[2010/11/15-19:07:10 - 6394] [POLICIES] INFO: [ID:5/Name:Default Outbound]:
Destination matching result: matched=0
[2010/11/15-19:07:10 - 6394] [POLICIES] DEBUG: [ID:9/Name:Default Inbound]:
Main policy sources '@example.net'
[2010/11/15-19:07:10 - 6394] [POLICIES] DEBUG: [ID:9/Name:Default Inbound]:
- Resolved source '@example.net' to a email address specification, match = 0
[2010/11/15-19:07:10 - 6394] [POLICIES] INFO: [ID:9/Name:Default Inbound]:
Source matching result: matched=0
[2010/11/15-19:07:10 - 6394] [POLICIES] DEBUG: END RESULT: prio=0 => policy
ids: 1
[2010/11/15-19:07:10 - 6394] [TRACKING] DEBUG: Policy resolved into: $VAR1 =
{
          '0' => [
                   '1'
                 ]
        };
[2010/11/15-19:07:10 - 6394] [TRACKING] DEBUG: Request translated into
session data: $VAR1 = {
          'Recipient' => '[email protected]',
          'SASLUsername' => '[email protected]',
          'QueueID' => '',
          'RecipientData' => '',
          'Instance' => '1910.4ce184de.93676.0',
          'EncryptionCipher' => '',
          'Size' => '394',
          'EncryptionKeySize' => '0',
          'ParsedClientAddress' => {
                                     'Broadcast_Long' => 3232238911,
                                     'Network' => '192.168.13.63',
                                     'IP_Long' => 3232238911,
                                     'Broadcast' => '192.168.13.63',
                                     'IP' => '192.168.13.63',
                                     'Mask_Long' => 4294967295,
                                     'Network_Long' => 3232238911
                                   },
          'ProtocolTransport' => 'Postfix',
          'EncryptionProtocol' => '',
          'Helo' => '[192.168.13.63]',
          'ClientAddress' => '192.168.13.63',
          'ClientName' => 'cedar.domain.com',
          'Sender' => '[email protected]',
          'SASLSender' => '',
          'Timestamp' => 1289848030,
          'ProtocolState' => 'RCPT',
          'Policy' => {
                        '0' => [
                                 '1'
                               ]
                      },
          'Protocol' => 'ESMTP',
          'ClientReverseName' => 'cedar.domain.com',
          'SASLMethod' => 'PLAIN'
        };
[2010/11/15-19:07:10 - 6394] [CBPOLICYD] DEBUG: Got request, running
modules...
[2010/11/15-19:07:10 - 6394] [CBPOLICYD] DEBUG: Running module: Quotas
Plugin
[2010/11/15-19:07:10 - 6394] [CBPOLICYD] DEBUG: Done with modules
[2010/11/15-19:07:11 - 6393] [CORE] INFO: 2010/11/15-19:07:11 CONNECT TCP
Peer: "127.0.0.1:42240" Local: "127.0.0.1:10031"
[2010/11/15-19:07:11 - 6393] [TRACKING] DEBUG: Protocol state is
'END-OF-MESSAGE', decoding policy...
[2010/11/15-19:07:11 - 6393] [TRACKING] DEBUG: Decoded into: $VAR1 = {
          '[email protected]' => {
                                       '0' => [
                                                '1'
                                              ]
                                     }
        };
[2010/11/15-19:07:11 - 6393] [TRACKING] DEBUG: Request translated into
session data: $VAR1 = {
          'SASLUsername' => '[email protected]',
          'QueueID' => '988375FE4F8',
          'RecipientData' => '/<[email protected]>#0=1;',
          'EncryptionCipher' => '',
          'Instance' => '1910.4ce184de.93676.0',
          'Size' => '394',
          'EncryptionKeySize' => '0',
          'ParsedClientAddress' => {
                                     'Broadcast_Long' => 3232238911,
                                     'Network' => '192.168.13.63',
                                     'IP_Long' => 3232238911,
                                     'Broadcast' => '192.168.13.63',
                                     'IP' => '192.168.13.63',
                                     'Mask_Long' => 4294967295,
                                     'Network_Long' => 3232238911
                                   },
          'ProtocolTransport' => 'Postfix',
          'EncryptionProtocol' => '',
          'Helo' => '[192.168.13.63]',
          'ClientAddress' => '192.168.13.63',
          'ClientName' => 'cedar.domain.com',
          'Sender' => '[email protected]',
          'SASLSender' => '',
          'Timestamp' => 1289848031,
          'ProtocolState' => 'END-OF-MESSAGE',
          '_Recipient_To_Policy' => {
                                      '[email protected]' => {
                                                                   '0' => [

'1'
                                                                          ]
                                                                 }
                                    },
          'Protocol' => 'ESMTP',
          'ClientReverseName' => 'cedar.domain.com',
          'SASLMethod' => 'PLAIN'
        };
[2010/11/15-19:07:11 - 6393] [CBPOLICYD] DEBUG: Got request, running
modules...
[2010/11/15-19:07:11 - 6393] [CBPOLICYD] DEBUG: Running module: Quotas
Plugin
[2010/11/15-19:07:11 - 6393] [CBPOLICYD] DEBUG: Done with modules



Have I missed something? Any help would be appreciated.

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

Reply via email to