Hello Nigel,

> >>> Try add this after line 158 in policies.pm ...
> >>>                 $server->log(LOG_ERR,"[PROTOCOL/Postfix] Response:
> >>> $response, Data: $response_data");
> >>>
> >>>
> >>  Global symbol "$response" requires explicit package name at
> >> /usr/local/lib/policyd-2.0/cbp/policies.pm line 158.
> >> Global symbol "$response_data" requires explicit package name at
> >> /usr/local/lib/policyd-2.0/cbp/policies.pm line 158.
> >> Compilation failed in require at
> >> /usr/local/lib/policyd-2.0/cbp/tracking.pm line 37.
> >> BEGIN failed--compilation aborted at
> >> /usr/local/lib/policyd-2.0/cbp/tracking.pm line 37.
> >> Compilation failed in require at /usr/local/bin/cbpolicyd line 39.
> >> BEGIN failed--compilation aborted at /usr/local/bin/cbpolicyd line
> 39.
> >>
> >> :-(
> >>
> > Sorry, in Postfix.pm   :)
> >
> :-)
> 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..
> :-(
> 
> 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..
> 
> [2009/02/22-16:32:20 - 16245] [CORE] INFO: 2009/02/22-16:32:20 CONNECT
> TCP
> Peer: "127.0.0.1:49769" Local: "127.0.0.1:10031"
> [2009/02/22-16:32:20 - 16245] [PROTOCOLS/Postfix] DEBUG: Possible
> Postfix
> protocol
> [2009/02/22-16:32:20 - 16245] [PROTOCOLS/Postfix] INFO: Identified
> Postfix
> protocol
> [2009/02/22-16:32:20 - 16245] [TRACKING] DEBUG: No session tracking
> data
> exists for request: $VAR1 = {
>           'ccert_fingerprint' => '',
>           'sasl_method' => '',
>           'sasl_sender' => '',
>           'size' => '485',
>           '_timestamp' => 1235316740,
>           'helo_name' => 'XP001STT',
>           'reverse_client_name' => 'unknown',
>           'queue_id' => '6A00C15B6B8',
>           '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' => '5379.49a17004.654f9.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/22-16:32:20 - 16245] [TRACKING] DEBUG: Protocol state is
> 'END-OF-MESSAGE', decoding policy...
> [2009/02/22-16:32:20 - 16245] [TRACKING] DEBUG: Decoded into: $VAR1 =
> undef;
> [2009/02/22-16:32:20 - 16245] [TRACKING] DEBUG: Request translated
into
> session data: $VAR1 = {
>           'SASLUsername' => '',
>           'QueueID' => '6A00C15B6B8',
>           'RecipientData' => '',
>           'Instance' => '5379.49a17004.654f9.0',
>           'EncryptionCipher' => '',
>           'Size' => '485',
>           'EncryptionKeySize' => '0',
>           'UnixTimestamp' => 1235316740,
>           'ParsedClientAddress' => {
>                                      'Broadcast_Long' => 172555364,
>                                      'Network' => 'xxx.yyy.zzz.uuu',
>                                      'IP_Long' => 172555364,
>                                      'Broadcast' => 'xxx.yyy.zzz.uuu',
>                                      'IP' => 'xxx.yyy.zzz.uuu',
>                                      'Mask_Long' => 4294967295,
>                                      'Network_Long' => 172555364
>                                    },
>           'ProtocolTransport' => 'Postfix',
>           'EncryptionProtocol' => '',
>           'Helo' => 'XP001STT',
>           'ClientAddress' => 'xxx.yyy.zzz.uuu',
>           'ClientName' => 'unknown',
>           'Sender' => 'roc...@sndr',
>           'SASLSender' => '',
>           'ProtocolState' => 'END-OF-MESSAGE',
>           'Protocol' => 'SMTP',
>           'ClientReverseName' => 'unknown',
>           'SASLMethod' => ''
>         };
> [2009/02/22-16:32:20 - 16245] [CBPOLICYD] DEBUG: Got request, running
> modules...
> [2009/02/22-16:32:20 - 16245] [CBPOLICYD] DEBUG: Running module:
Quotas
> Plugin
> [2009/02/22-16:32:20 - 16245] [CBPOLICYD] DEBUG: Done with modules

I still can't get the senders deferred with the customized message:

Mar 18 11:55:23 av10 postfix/smtpd[7904]: NOQUEUE: reject: RCPT from
ns1.sama.jo[81.28.112.1]: 450 4.3.2 <[email protected]>: Recipient
address rejected: Try again later; from=<[email protected]>
to=<[email protected]> proto=SMTP helo=<sama.jo>

:-(

Even if I added the line:

$server->log(LOG_ERR,"[PROTOCOL/Postfix] Response:
        $response, Data: $response_data");

after line 158 of Postfix.pm

rocsca

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

Reply via email to