Hello, i have a problem with accounting service. I want use a policyd for block email relay after some message relayed by ip address. I done a open relay (only for my networks ) and i want block relay for ip address after some message sended.
I see that the policy matchs but the accounting not block relay after some
message.
The settings of accounting on webui is the following:
Name
Accounting_WIMORE
Link to policy
WiMORE-RELAY_OK
Track
SenderIP:/32
Period
Daily
Message Count Limit
1
Message Cumulative Size Limit
-none-
Verdict
REJECT
Data
Account limit exceeded
Stop processing here
no
Comment
Disabled
yes
but after one message it doesn't block my ip.
The accounting table on database is empty.
This is a log file content:
[2011/08/23-16:06:52 - 10125] [CORE] INFO: 2011/08/23-16:06:52 CONNECT TCP
Peer: "127.0.0.1:55652" Local: "127.0.0.1:10031"
[2011/08/23-16:06:52 - 8185] [CORE] INFO: Starting "1" children
[2011/08/23-16:06:52 - 10125] [TRACKING] DEBUG: No session tracking data exists
for request: $VAR1 = {
'ccert_fingerprint' => '',
'sasl_method' => '',
'sasl_sender' => '',
'size' => '0',
'_timestamp' => 1314108412,
'helo_name' => 'MatteoPC',
'reverse_client_name' => '178-20-75-2.ip.wimore.it',
'queue_id' => '',
'encryption_cipher' => '',
'encryption_protocol' => '',
'etrn_domain' => '',
'ccert_subject' => '',
'request' => 'smtpd_access_policy',
'protocol_state' => 'RCPT',
'stress' => '',
'_peer_address' => '127.0.0.1',
'recipient' => '[email protected]',
'sasl_username' => '',
'instance' => '2812.4e53b3fc.2f87f.0',
'protocol_name' => 'ESMTP',
'encryption_keysize' => '0',
'recipient_count' => '0',
'ccert_issuer' => '',
'sender' => '[email protected]',
'client_name' => 'unknown',
'client_address' => '178.20.75.2',
'_protocol_transport' => 'Postfix'
};
[2011/08/23-16:06:52 - 10125] [TRACKING] DEBUG: Added session tracking
information for: $VAR1 = {
'ccert_fingerprint' => '',
'sasl_method' => '',
'sasl_sender' => '',
'size' => '0',
'_timestamp' => 1314108412,
'helo_name' => 'MatteoPC',
'reverse_client_name' => '178-20-75-2.ip.wimore.it',
'queue_id' => '',
'encryption_cipher' => '',
'encryption_protocol' => '',
'etrn_domain' => '',
'ccert_subject' => '',
'request' => 'smtpd_access_policy',
'protocol_state' => 'RCPT',
'stress' => '',
'_peer_address' => '127.0.0.1',
'recipient' => '[email protected]',
'sasl_username' => '',
'instance' => '2812.4e53b3fc.2f87f.0',
'protocol_name' => 'ESMTP',
'encryption_keysize' => '0',
'recipient_count' => '0',
'ccert_issuer' => '',
'sender' => '[email protected]',
'client_name' => 'unknown',
'client_address' => '178.20.75.2',
'_protocol_transport' => 'Postfix'
};
[2011/08/23-16:06:52 - 10262] [CORE] DEBUG: Child Preforked (10262)
[2011/08/23-16:06:52 - 10262] [CBPOLICYD] DEBUG: Starting up caching engine
[2011/08/23-16:06:52 - 10125] [TRACKING] DEBUG: Protocol state is 'RCPT',
resolving policy...
[2011/08/23-16:06:52 - 10125] [POLICIES] DEBUG: Going to resolve session data
into policy: $VAR1 = {
'Recipient' => '[email protected]',
'SASLUsername' => '',
'QueueID' => '',
'_PeerAddress' => bless( {
'raw_ip' => '127.0.0.1',
'ip' => '127.0.0.1',
'ip_version' => 4,
'cidr' => 32
}, 'awitpt::netip' ),
'RecipientData' => '',
'Instance' => '2812.4e53b3fc.2f87f.0',
'EncryptionCipher' => '',
'Size' => '0',
'EncryptionKeySize' => '0',
'PeerAddress' => '127.0.0.1',
'EncryptionProtocol' => '',
'Helo' => 'MatteoPC',
'ClientAddress' => '178.20.75.2',
'ClientName' => 'unknown',
'Sender' => '[email protected]',
'SASLSender' => '',
'_ClientAddress' => bless( {
'raw_ip' => '178.20.75.2',
'ip' => '178.20.75.2',
'ip_version' => 4,
'cidr' => 32
}, 'awitpt::netip' ),
'Protocol' => 'ESMTP',
'ClientReverseName' => '178-20-75-2.ip.wimore.it',
'SASLMethod' => ''
};
[2011/08/23-16:06:52 - 10125] [POLICIES] DEBUG: Found policy member with ID '6'
in policy 'WiMORE-RELAY_OK'
[2011/08/23-16:06:52 - 10125] [POLICIES] DEBUG: [ID:6/Name:WiMORE-RELAY_OK]:
Main policy sources '178.20.75.0/24'
[2011/08/23-16:06:52 - 10125] [POLICIES] DEBUG: [ID:6/Name:WiMORE-RELAY_OK]: -
Resolved source '178.20.75.0/24' to a IP/CIDR specification, match = 1
[2011/08/23-16:06:52 - 10125] [POLICIES] INFO: [ID:6/Name:WiMORE-RELAY_OK]:
Source matching result: matched=1
[2011/08/23-16:06:52 - 10125] [POLICIES] DEBUG: [ID:6/Name:WiMORE-RELAY_OK]:
Main policy destinations ''
[2011/08/23-16:06:52 - 10125] [POLICIES] INFO: [ID:6/Name:WiMORE-RELAY_OK]:
Destination matching result: matched=0
[2011/08/23-16:06:52 - 10125] [TRACKING] DEBUG: Policy resolved into: $VAR1 =
{};
[2011/08/23-16:06:52 - 10125] [TRACKING] DEBUG: Request translated into session
data: $VAR1 = {
'Recipient' => '[email protected]',
'SASLUsername' => '',
'QueueID' => '',
'_PeerAddress' => bless( {
'raw_ip' => '127.0.0.1',
'ip' => '127.0.0.1',
'ip_version' => 4,
'cidr' => 32
}, 'awitpt::netip' ),
'RecipientData' => '',
'Instance' => '2812.4e53b3fc.2f87f.0',
'EncryptionCipher' => '',
'Size' => '0',
'EncryptionKeySize' => '0',
'UnixTimestamp' => 1314108412,
'ProtocolTransport' => 'Postfix',
'PeerAddress' => '127.0.0.1',
'EncryptionProtocol' => '',
'Helo' => 'MatteoPC',
'ClientAddress' => '178.20.75.2',
'ClientName' => 'unknown',
'Sender' => '[email protected]',
'SASLSender' => '',
'_ClientAddress' => bless( {
'raw_ip' => '178.20.75.2',
'ip' => '178.20.75.2',
'ip_version' => 4,
'ip_bin' =>
'10110010000101000100101100000010',
'cidr' => 32
}, 'awitpt::netip' ),
'ProtocolState' => 'RCPT',
'Policy' => {},
'Protocol' => 'ESMTP',
'ClientReverseName' => '178-20-75-2.ip.wimore.it',
'SASLMethod' => ''
};
[2011/08/23-16:06:52 - 10125] [CBPOLICYD] DEBUG: Got request, running modules...
[2011/08/23-16:06:52 - 10125] [CBPOLICYD] DEBUG: Running module: Access Control
Plugin
[2011/08/23-16:06:52 - 10125] [CBPOLICYD] DEBUG: Running module: HELO/EHLO
Check Plugin
[2011/08/23-16:06:52 - 10125] [CBPOLICYD] DEBUG: Running module: Greylisting
Plugin
[2011/08/23-16:06:52 - 10125] [CBPOLICYD] DEBUG: Running module: Quotas Plugin
[2011/08/23-16:06:52 - 10125] [CBPOLICYD] DEBUG: Running module: Accounting
Plugin
[2011/08/23-16:06:52 - 10125] [CBPOLICYD] DEBUG: Done with modules
[2011/08/23-16:07:22 - 8185] [CORE] INFO: Killing "1" children
[2011/08/23-16:07:22 - 10262] [CBPOLICYD] DEBUG: Shutting down caching engine
(10262)
Thank you
Regards
_______________________________________________ Users mailing list [email protected] http://lists.policyd.org/mailman/listinfo/users
