Thanks Nigel,
> <snip />
> > :-)
:-)
> > 2009/02/22-16:11:47 - 16245] [PROTOCOLS/Postfix] DEBUG: Possible
> Postfix
> > protoc ol
> > [2009/02/22-16:11:47 - 16245] [PROTOCOLS/Postfix] INFO: Identified
> Postfix
> > protocol
> > [2009/02/22-16:11:47 - 16245] [TRACKING] DEBUG: No session tracking
> data
> > exists for request: $VAR1 = {
> > 'ccert_fingerprint' => '',
> > 'sasl_method' => '',
> > 'sasl_sender' => '',
> > 'size' => '0',
> > '_timestamp' => 1235315507,
> > 'helo_name' => 'sender',
> > 'reverse_client_name' => 'sender',
> > 'queue_id' => '',
> > 'encryption_cipher' => '',
> > 'encryption_protocol' => '',
> > 'etrn_domain' => '',
> > 'ccert_subject' => '',
> > 'request' => 'smtpd_access_policy',
> > 'protocol_state' => 'RCPT',
> > 'stress' => '',
> > '_protocol_peeraddr' => '127.0.0.1',
> > 'recipient' => 'roc...@rcpt',
> > 'sasl_username' => '',
> > 'instance' => '3d8e.49a16b33.5d4dc.0',
> > 'protocol_name' => 'ESMTP',
> > 'encryption_keysize' => '0',
> > 'recipient_count' => '0',
> > 'ccert_issuer' => '',
> > 'sender' => 'roc...@sndr',
> > 'client_name' => 'unknown',
> > 'client_address' => 'xxx.yyy.zzz.uuu',
> > '_protocol_transport' => 'Postfix'
> > };
> > [2009/02/22-16:11:47 - 16245] [TRACKING] DEBUG: Added session
> tracking
> > information for: $VAR1 = {
> > 'ccert_fingerprint' => '',
> > 'sasl_method' => '',
> > 'sasl_sender' => '',
> > 'size' => '0',
> > '_timestamp' => 1235315507,
> > 'helo_name' => 'sender',
> > 'reverse_client_name' => 'sender',
> > 'queue_id' => '',
> > 'encryption_cipher' => '',
> > 'encryption_protocol' => '',
> > 'etrn_domain' => '',
> > 'ccert_subject' => '',
> > 'request' => 'smtpd_access_policy',
> > 'protocol_state' => 'RCPT',
> > 'stress' => '',
> > '_protocol_peeraddr' => '127.0.0.1',
> > 'recipient' => 'roc...@rcpt',
> > 'sasl_username' => '',
> > 'instance' => '3d8e.49a16b33.5d4dc.0',
> > 'protocol_name' => 'ESMTP',
> > 'encryption_keysize' => '0',
> > 'recipient_count' => '0',
> > 'ccert_issuer' => '',
> > 'sender' => 'roc...@sndr',
> > 'client_name' => 'unknown',
> > 'client_address' => 'xxx.yyy.zzz.uuu',
> > '_protocol_transport' => 'Postfix'
> > };
> > [2009/02/22-16:11:47 - 16245] [TRACKING] DEBUG: Protocol state is
> 'RCPT',
> > resolving policy...
> > [2009/02/22-16:11:47 - 16245] [POLICIES] DEBUG: Going to resolve
> session
> > data into policy: $VAR1 = {
> > 'Recipient' => 'roc...@rcpt',
> > 'SASLUsername' => '',
> > 'QueueID' => '',
> > 'RecipientData' => '',
> > 'Instance' => '3d8e.49a16b33.5d4dc.0',
> > 'EncryptionCipher' => '',
> > 'Size' => '0',
> > 'EncryptionKeySize' => '0',
> > 'EncryptionProtocol' => '',
> > 'Helo' => 'sender',
> > 'ClientAddress' => 'xxx.yyy.zzz.uuu',
> > 'ClientName' => 'unknown',
> > 'Sender' => 'roc...@sndr',
> > 'SASLSender' => '',
> > 'Protocol' => 'ESMTP',
> > 'ClientReverseName' => 'sender',
> > 'SASLMethod' => ''
> > };
> > [2009/02/22-16:11:47 - 16245] [POLICIES] DEBUG: Found policy member
> with
> > ID '1' in policy 'Default'
> > [2009/02/22-16:11:47 - 16245] [POLICIES] DEBUG: [ID:1/Name:Default]:
> Main
> > policy sources '!@'
> > [2009/02/22-16:11:47 - 16245] [POLICIES] DEBUG: [ID:1/Name:Default]:
> -
> > Resolved source '@' to a email blank address specification, match =
0
> > [2009/02/22-16:11:47 - 16245] [POLICIES] INFO: [ID:1/Name:Default]:
> Source
> > matching result: matched=1
> > [2009/02/22-16:11:47 - 16245] [POLICIES] DEBUG: [ID:1/Name:Default]:
> > Destination not defined or 'any', explicit match: matched=1
> > [2009/02/22-16:11:47 - 16245] [POLICIES] INFO: [ID:1/Name:Default]:
> > Destination matching result: matched=1
> > [2009/02/22-16:11:47 - 16245] [POLICIES] DEBUG: END RESULT: prio=50
> =>
> > policy ids: 1
> > [2009/02/22-16:11:47 - 16245] [TRACKING] DEBUG: Policy resolved
into:
> > $VAR1 = {
> > '50' => [
> > '1'
> > ]
> > };
> > [2009/02/22-16:11:47 - 16245] [TRACKING] DEBUG: Request translated
> into
> > session data: $VAR1 = {
> > 'Recipient' => 'roc...@rcpt',
> > 'SASLUsername' => '',
> > 'QueueID' => '',
> > 'RecipientData' => '',
> > 'Instance' => '3d8e.49a16b33.5d4dc.0',
> > 'EncryptionCipher' => '',
> > 'Size' => '0',
> > 'EncryptionKeySize' => '0',
> > 'UnixTimestamp' => 1235315507,
> > 'ParsedClientAddress' => {
> > 'Broadcast_Long' => 1354690822,
> > 'Network' => 'xxx.yyy.zzz.uuu',
> > 'IP_Long' => 1354690822,
> > 'Broadcast' =>
> 'xxx.yyy.zzz.uuu',
> > 'IP' => 'xxx.yyy.zzz.uuu',
> > 'Mask_Long' => 4294967295,
> > 'Network_Long' => 1354690822
> > },
> > 'ProtocolTransport' => 'Postfix',
> > 'EncryptionProtocol' => '',
> > 'Helo' => 'sender',
> > 'ClientAddress' => 'xxx.yyy.zzz.uuu',
> > 'ClientName' => 'unknown',
> > 'Sender' => 'roc...@sndr',
> > 'SASLSender' => '',
> > 'ProtocolState' => 'RCPT',
> > 'Policy' => {
> > '50' => [
> > '1'
> > ]
> > },
> > 'Protocol' => 'ESMTP',
> > 'ClientReverseName' => 'sender',
> > 'SASLMethod' => ''
> > };
> > [2009/02/22-16:11:47 - 16245] [CBPOLICYD] DEBUG: Got request,
running
> > modules...
> > [2009/02/22-16:11:47 - 16245] [CBPOLICYD] DEBUG: Running module:
> Quotas
> > Plugin
> > Feb 22 16:11:47 av9 cbpolicyd[16245]: module=Quotas, action=defer,
> > host=xxx.yyy.zzz.uuu, helo=sender, from=roc...@sndr, to=roc...@rcpt,
> > reason=quota_match, policy=1, quota=3, limit=4,
> track=Sender:roc...@sndr,
> > counter=MessageCount, quota=7/2 (367.4%)
> > [2009/02/22-16:11:47 - 16245] [PROTOCOL/Postfix] ERROR: Response:
> DEFER,
> > Data: Superato il numero massimo di messaggi
> > [2009/02/22-16:11:47 - 16245] [CBPOLICYD] DEBUG: Done with modules
> >
> > Yes it seems that the message is deferred with the message set up in
> the
> > Web UI for that quota ("Superato il numero massimo di messaggi").
I'm
> not
> > sure because when I try with my client to overcome quota, every
> message is
> > not counted. I neverthless have a entry in policyd.quotas_tracking
> table..
> > :-(
> >
> >
> I can't really understand what you mean, how the quotas work is the
> first violation is allowed, which puts the quota over its allowed
> value,
> the next attempt is then matched.
That is, for the example above all works fine (And you can confirm
this.) But there are messages that are not taken in account by quota
module (or at least are not counted, neverthless is inserted a line in
"quotas_tracking" table for the sender of the message). As example I
have attacched in my previous email, the policyd logs of a such case.
> > Why? Because I connect directly to the MTA with the client? Or maybe
> > because my PC has a not a FQDN? Or what? Here the log of a such
> > transaction..
> >
> >
> Try send a message manually using SMTP and see if you get the correct
> behavior.
Here the log of e messages sent manually (telnet <MTA> 25) that is not
considered by quota module of policyd (while I would like that my quota
policy matches this message too). The notably fact (at least I think) is
that $VAR1 = undef.
[2009/02/24-09:47:04 - 5853] [CORE] INFO: 2009/02/24-09:47:04 CONNECT
TCP Peer: "127.0.0.1:35370" Local: "127.0.0.1:10031"
[2009/02/24-09:47:04 - 5853] [PROTOCOLS/Postfix] DEBUG: Possible Postfix
protocol
[2009/02/24-09:47:04 - 5853] [PROTOCOLS/Postfix] INFO: Identified
Postfix protocol
[2009/02/24-09:47:04 - 5853] [TRACKING] DEBUG: No session tracking data
exists for request: $VAR1 = {
'ccert_fingerprint' => '',
'sasl_method' => '',
'sasl_sender' => '',
'size' => '6',
'_timestamp' => 1235465224,
'helo_name' => 'sndr',
'reverse_client_name' => 'unknown',
'queue_id' => '9C47115B6FA',
'encryption_cipher' => '',
'encryption_protocol' => '',
'etrn_domain' => '',
'ccert_subject' => '',
'request' => 'smtpd_access_policy',
'protocol_state' => 'END-OF-MESSAGE',
'stress' => '',
'_protocol_peeraddr' => '127.0.0.1',
'recipient' => 'roc...@rcpt',
'sasl_username' => '',
'instance' => '7f9.49a3b408.9b0be.0',
'protocol_name' => 'SMTP',
'encryption_keysize' => '0',
'recipient_count' => '1',
'ccert_issuer' => '',
'sender' => 'roc...@sndr',
'client_name' => 'unknown',
'client_address' => 'xxx.yyy.zzz.uuu',
'_protocol_transport' => 'Postfix'
};
[2009/02/24-09:47:04 - 5853] [TRACKING] DEBUG: Protocol state is
'END-OF-MESSAGE', decoding policy...
[2009/02/24-09:47:04 - 5853] [TRACKING] DEBUG: Decoded into: $VAR1 =
undef;
[2009/02/24-09:47:04 - 5853] [TRACKING] DEBUG: Request translated into
session data: $VAR1 = {
'SASLUsername' => '',
'QueueID' => '9C47115B6FA',
'RecipientData' => '',
'Instance' => '7f9.49a3b408.9b0be.0',
'EncryptionCipher' => '',
'Size' => '6',
'EncryptionKeySize' => '0',
'UnixTimestamp' => 1235465224,
'ParsedClientAddress' => {
'Broadcast_Long' => 3641487370,
'Network' => 'xxx.yyy.zzz.uuu',
'IP_Long' => 3641487370,
'Broadcast' => 'xxx.yyy.zzz.uuu',
'IP' => 'xxx.yyy.zzz.uuu',
'Mask_Long' => 4294967295,
'Network_Long' => 3641487370
},
'ProtocolTransport' => 'Postfix',
'EncryptionProtocol' => '',
'Helo' => 'sndr',
'ClientAddress' => 'xxx.yyy.zzz.uuu',
'ClientName' => 'unknown',
'Sender' => 'roc...@sndr',
'SASLSender' => '',
'ProtocolState' => 'END-OF-MESSAGE',
'Protocol' => 'SMTP',
'ClientReverseName' => 'unknown',
'SASLMethod' => ''
};
[2009/02/24-09:47:04 - 5853] [CBPOLICYD] DEBUG: Got request, running
modules...
[2009/02/24-09:47:04 - 5853] [CBPOLICYD] DEBUG: Running module: Quotas
Plugin
[2009/02/24-09:47:04 - 5853] [CBPOLICYD] DEBUG: Done with modules
Still Thanks,
rocsca
_______________________________________________
Users mailing list
[email protected]
http://lists.policyd.org/mailman/listinfo/users