Hey Robert,

Thanks a ton. That worked :):):). Now module quota is getting enabled, but
quota_tracking is not working. My aim is to limit outgoing mails per sender.

What I did is:

1. Created policies [check attachment  ]
2. Created quota and linked to policy [check attachment ].

The outgoing mail limit is set as 3 for [email protected] [Sender:user@domain],
but still its possible to send as many mails as possible from
[email protected].

I am not sure if I missed anything. Also the db seems to be correct [Infact
I added the policies/rules via webui].

The extra postfix rules added is :

---------
smtpd_recipient_restrictions =
        check_policy_service inet:127.0.0.1:10032
        permit_mynetworks
        reject_unauth_destination
---------

Note: Port used is 10032

I am not sure where I am wrong.

Log file: log.txt [attached]

Also the server in which policyd is set is a relay server [postfix runnig].
So all the mails from other servers will be going via this postfix+policyd
server. So is there any mechanism used by policyd that adds the sender
address automatically and track? What is the best method used in such
scenarios. As its hectic to add all the from address in the db manually.

Regards,
Soumi
[2012/08/20-14:37:23 - 30757] [CBPOLICYD] DEBUG: Got request, running modules...
[2012/08/20-14:37:23 - 30757] [CBPOLICYD] DEBUG: Running module: Quotas Plugin
[2012/08/20-14:37:23 - 30757] [CBPOLICYD] DEBUG: Done with modules
[2012/08/20-14:37:23 - 30759] [CORE] INFO: 2012/08/20-14:37:23 CONNECT TCP 
Peer: "127.0.0.1:47736" Local: "127.0.0.1:10032"
[2012/08/20-14:37:23 - 30759] [PROTOCOLS/Postfix] DEBUG: Possible Postfix 
protocol
[2012/08/20-14:37:23 - 30759] [PROTOCOLS/Postfix] INFO: Identified Postfix 
protocol
[2012/08/20-14:37:23 - 30759] [TRACKING] DEBUG: No session tracking data exists 
for request: $VAR1 = {
          'ccert_fingerprint' => '',
          'sasl_method' => '',
          'sasl_sender' => '',
          'size' => '1936',
          '_timestamp' => 1345473443,
          'helo_name' => 'abc.com',
          'reverse_client_name' => 'abc.com',
          'queue_id' => '',
          'encryption_cipher' => '',
          'encryption_protocol' => '',
          'etrn_domain' => '',
          'ccert_subject' => '',
          'request' => 'smtpd_access_policy',
          'protocol_state' => 'RCPT',
          'stress' => '',
          'recipient' => '[email protected]',
          'sasl_username' => '',
          'instance' => '799b.50324ba3.8cff0.0',
          'protocol_name' => 'ESMTP',
          'encryption_keysize' => '0',
          'recipient_count' => '0',
          'ccert_issuer' => '',
          'sender' => '[email protected]',
          'client_name' => 'abc.com',
          'client_address' => '192.168.63.101',
          '_protocol_transport' => 'Postfix'
        };
[2012/08/20-14:37:23 - 30759] [TRACKING] DEBUG: Added session tracking 
information for: $VAR1 = {
          'ccert_fingerprint' => '',
          'sasl_method' => '',
          'sasl_sender' => '',
          'size' => '1936',
          '_timestamp' => 1345473443,
          'helo_name' => 'abc.com',
          'reverse_client_name' => 'abc.com',
          'queue_id' => '',
          'encryption_cipher' => '',
          'encryption_protocol' => '',
          'etrn_domain' => '',
          'ccert_subject' => '',
          'request' => 'smtpd_access_policy',
          'protocol_state' => 'RCPT',
          'stress' => '',
          'recipient' => '[email protected]',
          'sasl_username' => '',
          'instance' => '799b.50324ba3.8cff0.0',
          'protocol_name' => 'ESMTP',
          'encryption_keysize' => '0',
          'recipient_count' => '0',
          'ccert_issuer' => '',
          'sender' => '[email protected]',
          'client_name' => 'abc.com',
          'client_address' => '192.168.63.101',
          '_protocol_transport' => 'Postfix'
        };
[2012/08/20-14:37:23 - 30759] [TRACKING] DEBUG: Protocol state is 'RCPT', 
resolving policy...
[2012/08/20-14:37:23 - 30759] [POLICIES] DEBUG: Going to resolve session data 
into policy: $VAR1 = {
          'Recipient' => '[email protected]',
          'SASLUsername' => '',
          'QueueID' => '',
          'RecipientData' => '',
          'Instance' => '799b.50324ba3.8cff0.0',
          'EncryptionCipher' => '',
          'Size' => '1936',
          'EncryptionKeySize' => '0',
          'EncryptionProtocol' => '',
          'Helo' => 'abc.com',
          'ClientAddress' => '192.168.63.101',
          'ClientName' => 'abc.com',
          'Sender' => '[email protected]',
          'SASLSender' => '',
          'Protocol' => 'ESMTP',
          'ClientReverseName' => 'abc.com',
          'SASLMethod' => ''
        };
[2012/08/20-14:37:23 - 30759] [TRACKING] DEBUG: Policy resolved into: $VAR1 = 
{};
[2012/08/20-14:37:23 - 30759] [TRACKING] DEBUG: Request translated into session 
data: $VAR1 = {
          'Recipient' => '[email protected]',
          'SASLUsername' => '',
          'QueueID' => '',
          'RecipientData' => '',
          'Instance' => '799b.50324ba3.8cff0.0',
          'EncryptionCipher' => '',
          'Size' => '1936',
          'EncryptionKeySize' => '0',
          'ParsedClientAddress' => {
                                     'Broadcast_Long' => 3495675446,
                                     'Network' => '192.168.63.101',
                                     'IP_Long' => 3495675446,
                                     'Broadcast' => '192.168.63.101',
                                     'IP' => '192.168.63.101',
                                     'Mask_Long' => 4294967295,
                                     'Network_Long' => 3495675446
                                   },
          'ProtocolTransport' => 'Postfix',
          'EncryptionProtocol' => '',
          'Helo' => 'abc.com',
          'ClientAddress' => '192.168.63.101',
          'ClientName' => 'abc.com',
          'Sender' => '[email protected]',
          'SASLSender' => '',
          'Timestamp' => 1345473443,
          'ProtocolState' => 'RCPT',
          'Policy' => {},
          'Protocol' => 'ESMTP',
          'ClientReverseName' => 'abc.com',
          'SASLMethod' => ''
        };


[2012/08/20-14:37:37 - 31712] [CBPOLICYD] DEBUG: Got request, running modules...
[2012/08/20-14:37:37 - 31712] [CBPOLICYD] DEBUG: Running module: Quotas Plugin
[2012/08/20-14:37:37 - 31712] [CBPOLICYD] DEBUG: Done with modules
[2012/08/20-14:37:37 - 30758] [CORE] INFO: 2012/08/20-14:37:37 CONNECT TCP 
Peer: "127.0.0.1:47763" Local: "127.0.0.1:10032"
[2012/08/20-14:37:37 - 30758] [PROTOCOLS/Postfix] DEBUG: Possible Postfix 
protocol
[2012/08/20-14:37:37 - 30758] [PROTOCOLS/Postfix] INFO: Identified Postfix 
protocol
[2012/08/20-14:37:37 - 30758] [TRACKING] DEBUG: No session tracking data exists 
for request: $VAR1 = {
          'ccert_fingerprint' => '',
          'sasl_method' => '',
          'sasl_sender' => '',
          'size' => '1937',
          '_timestamp' => 1345473457,
          'helo_name' => 'abc.com',
          'reverse_client_name' => 'abc.com',
          'queue_id' => '',
          'encryption_cipher' => '',
          'encryption_protocol' => '',
          'etrn_domain' => '',
          'ccert_subject' => '',
          'request' => 'smtpd_access_policy',
          'protocol_state' => 'RCPT',
          'stress' => '',
          'recipient' => '[email protected]',
          'sasl_username' => '',
          'instance' => '7a24.50324bb1.64a6d.0',
          'protocol_name' => 'ESMTP',
          'encryption_keysize' => '0',
          'recipient_count' => '0',
          'ccert_issuer' => '',
          'sender' => '[email protected]',
          'client_name' => 'abc.com',
          'client_address' => '192.168.63.101',
          '_protocol_transport' => 'Postfix'
        };
[2012/08/20-14:37:37 - 30758] [TRACKING] DEBUG: Added session tracking 
information for: $VAR1 = {
          'ccert_fingerprint' => '',
          'sasl_method' => '',
          'sasl_sender' => '',
          'size' => '1937',
          '_timestamp' => 1345473457,
          'helo_name' => 'abc.com',
          'reverse_client_name' => 'abc.com',
          'queue_id' => '',
          'encryption_cipher' => '',
          'encryption_protocol' => '',
          'etrn_domain' => '',
          'ccert_subject' => '',
          'request' => 'smtpd_access_policy',
          'protocol_state' => 'RCPT',
          'stress' => '',
          'recipient' => '[email protected]',
          'sasl_username' => '',
          'instance' => '7a24.50324bb1.64a6d.0',
          'protocol_name' => 'ESMTP',
          'encryption_keysize' => '0',
          'recipient_count' => '0',
          'ccert_issuer' => '',
          'sender' => '[email protected]',
          'client_name' => 'abc.com',
          'client_address' => '192.168.63.101',
          '_protocol_transport' => 'Postfix'
        };
[2012/08/20-14:37:37 - 30758] [TRACKING] DEBUG: Protocol state is 'RCPT', 
resolving policy...
[2012/08/20-14:37:37 - 30758] [POLICIES] DEBUG: Going to resolve session data 
into policy: $VAR1 = {
          'Recipient' => '[email protected]',
          'SASLUsername' => '',
          'QueueID' => '',
          'RecipientData' => '',
          'Instance' => '7a24.50324bb1.64a6d.0',
          'EncryptionCipher' => '',
          'Size' => '1937',
          'EncryptionKeySize' => '0',
          'EncryptionProtocol' => '',
          'Helo' => 'abc.com',
          'ClientAddress' => '192.168.63.101',
          'ClientName' => 'abc.com',
          'Sender' => '[email protected]',
          'SASLSender' => '',
          'Protocol' => 'ESMTP',
          'ClientReverseName' => 'abc.com',
          'SASLMethod' => ''
        };
[2012/08/20-14:37:37 - 30758] [TRACKING] DEBUG: Policy resolved into: $VAR1 = 
{};
[2012/08/20-14:37:37 - 30758] [TRACKING] DEBUG: Request translated into session 
data: $VAR1 = {
          'Recipient' => '[email protected]',
          'SASLUsername' => '',
          'QueueID' => '',
          'RecipientData' => '',
          'Instance' => '7a24.50324bb1.64a6d.0',
          'EncryptionCipher' => '',
          'Size' => '1937',
          'EncryptionKeySize' => '0',
          'ParsedClientAddress' => {
                                     'Broadcast_Long' => 3495675446,
                                     'Network' => '192.168.63.101',
                                     'IP_Long' => 3495675446,
                                     'Broadcast' => '192.168.63.101',
                                     'IP' => '192.168.63.101',
                                     'Mask_Long' => 4294967295,
                                     'Network_Long' => 3495675446
                                   },
          'ProtocolTransport' => 'Postfix',
          'EncryptionProtocol' => '',
          'Helo' => 'abc.com',
          'ClientAddress' => '192.168.63.101',
          'ClientName' => 'abc.com',
          'Sender' => '[email protected]',
          'SASLSender' => '',
          'Timestamp' => 1345473457,
          'ProtocolState' => 'RCPT',
          'Policy' => {},
          'Protocol' => 'ESMTP',
          'ClientReverseName' => 'abc.com',
          'SASLMethod' => ''
        };

Attachment: dbpolicyd
Description: Binary data

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

Reply via email to