Hi there Stefano,

I'm able to reproduce your error. The problem seems to be with the referencing 
of groups in a policy.
If I insert an IP or an email address or a domain in the policy members, it 
works fine. If I use a group reference, such as %domains or %ips, it fails with 
the same error:

Can't call method "get" on an undefined value at 
/usr/local/lib/policyd-2.1/awitpt/cache.pm line 256.

For your reference, I'm using cluebringer-snapshot-2.1.x-201205100639 on CentOS 
5.8, perl 5.8.8, mysql 5.0.95, postfix 2.7, Cache::FastMmap v1.40.

Were you able to overcome this issue?

Best,
Ricardo.


> To: [email protected]
> Date: Thu, 12 Jul 2012 15:54:58 +0200
> From: [email protected]
> Subject: [policyd-users]  cluebringer2.1-2012.05 get error
> 
> 
> I have posted last month this error but without luck.
> 
> I have been configured clubringer in this way:
> 
> policy Default Outbound:
> 
> Policy Members
> Policy: Default Outbound
> Action
> 
>       Source  Destination     Disabled
>       $*      any             no 
> 
> With this configuration clubringer works perfectly.
> 
> But with:
> 
> Policy Members
> Policy: Default Outbound
> Action
> 
>       Source  Destination     Disabled
>       $*      !%domini        no 
> 
> Groups:
> 
> Policy Group: domini
> 
>       Member          Disabled
>       @ascomail.com   no
> 
> I got this:
> 
> [2012/06/20-09:18:33 - 4734] [POLICIES] INFO: [ID:2/Name:Default Outbound]:
> Source matching result: matched=1
> Can't call method "get" on an undefined value at
> /usr/local/lib/policyd-2.1/awitpt/cache.pm line 256, <_READ> line 31.
> 
> I use ubuntu 10.04 with  perl
> 
> perl -V
> Summary of my perl5 (revision 5 version 10 subversion 1) configuration:
> 
> Here is:
> 
> perl modules
> 
> Net::Server                0.97
> Net::CIDR                  0.13
> Config::IniFiles           2.52
> Cache::FastMmap            1.34
> Mail::SPF                v2.007
> 
> log_level=4
> log_detail=policies,modules,tracking
> 
> [2012/06/22-10:46:49 - 5018] [POLICIES] DEBUG: Found policy member with ID 
> '2' in
> policy 'Default Outbound'
> [2012/06/22-10:46:49 - 5018] [POLICIES] DEBUG: [ID:2/Name:Default Outbound]: 
> Main
> policy sources '$*'
> [2012/06/22-10:46:49 - 5018] [POLICIES] DEBUG: [ID:2/Name:Default Outbound]: -
> Resolved source '$*' to a SASL user specification, match = 1
> [2012/06/22-10:46:49 - 5018] [POLICIES] INFO: [ID:2/Name:Default Outbound]:
> Source matching result: matched=1
> [2012/06/22-10:46:49 - 5018] [POLICIES] DEBUG: [ID:2/Name:Default Outbound]: 
> Main
> policy destinations '!%domini'
> Can't call method "get" on an undefined value at
> /usr/local/lib/policyd-2.1/awitpt/cache.pm line 256.
> [2012/06/22-10:46:50 - 5213] [CORE] INFO: 2012/06/22-10:46:50 CONNECT TCP 
> Peer:
> "127.0.0.1:55084" Local: "127.0.0.1:10031"
> [2012/06/22-10:46:50 - 5008] [CORE] INFO: Starting "1" children
> [2012/06/22-10:46:50 - 5213] [TRACKING] DEBUG: Protocol state is 'RCPT',
> resolving policy...
> [2012/06/22-10:46:50 - 5213] [POLICIES] DEBUG: Going to resolve session data 
> into
> policy: $VAR1 = {
>           'Recipient' => 'simonetta.vettorazzo at castelmac.it',
>           'SASLUsername' => 'roberto.ghion.carpoint at borsoispa.it',
>           'QueueID' => '',
>           '_PeerAddress' => bless( {
>                                      'raw_ip' => '127.0.0.1',
>                                      'ip' => '127.0.0.1',
>                                      'ip_version' => 4,
>                                      'cidr' => 32
>                                    }, 'awitpt::netip' ),
>           'RecipientData' => undef,
>           'EncryptionCipher' => '',
>           'Instance' => '73ea.4fe430f8.ec8a6.0',
>           'Size' => '0',
>           'EncryptionKeySize' => '0',
>           'UnixTimestamp' => '1340354809',
>           'PeerAddress' => '127.0.0.1',
>           'EncryptionProtocol' => '',
>           'Helo' => 'robertoghion',
>           'ClientAddress' => '95.228.132.65',
>           'ClientName' => 
> 'host65-132-static.228-95-b.business.telecomitalia.it',
>           'Sender' => 'roberto.ghion.carpoint at borsoispa.it',
>           'SASLSender' => '',
>           '_ClientAddress' => bless( {
>                                        'raw_ip' => '95.228.132.65',
>                                        'ip' => '95.228.132.65',
>                                        'ip_version' => 4,
>                                        'cidr' => 32
>                                      }, 'awitpt::netip' ),
>           'Protocol' => 'ESMTP',
>           'ClientReverseName' =>
> 'host65-132-static.228-95-b.business.telecomitalia.it',
>           'SASLMethod' => 'LOGIN'
>         };
> [2012/06/22-10:46:50 - 5213] [POLICIES] DEBUG: Found policy member with ID 
> '2' in
> policy 'Default Outbound'
> [2012/06/22-10:46:50 - 5213] [POLICIES] DEBUG: [ID:2/Name:Default Outbound]: 
> Main
> policy sources '$*'
> [2012/06/22-10:46:50 - 5213] [POLICIES] DEBUG: [ID:2/Name:Default Outbound]: -
> Resolved source '$*' to a SASL user specification, match = 1
> [2012/06/22-10:46:50 - 5213] [POLICIES] INFO: [ID:2/Name:Default Outbound]:
> Source matching result: matched=1
> [2012/06/22-10:46:50 - 5213] [POLICIES] DEBUG: [ID:2/Name:Default Outbound]: 
> Main
> policy destinations '!%domini'
> Can't call method "get" on an undefined value at
> /usr/local/lib/policyd-2.1/awitpt/cache.pm line 256, <_READ> line 11.
> [2012/06/22-10:46:50 - 5300] [CORE] DEBUG: Child Preforked (5300)
> [2012/06/22-10:46:50 - 5300] [CBPOLICYD] DEBUG: Starting up caching engine
> 
> 
> Also into Accounting.pm (found in /usr/local/lib/policyd-2.1)
> the cleanup part is commented:
> 
> ## Cleanup function
> #sub cleanup
> #{
> #       my ($server) = @_;
> #
> #       # Get 30-days ago time
> #       my $lastMonth = time() - 2592000;
> #
> #       # Remove old tracking info from database
> #       my $sth = DBDo('
> #               DELETE FROM
> #                       @TP@accounting_tracking
> #               WHERE
> #                       LastUpdate < ?
> #               ',
> #               $lastMonth
> #       );
> #       if (!$sth) {
> #               $server->log(LOG_ERR,"[ACCOUNTING] Failed to remove old
> accounting tracking records: ".awitpt::db::dblayer::Error());
> #       }
> #       $server->log(LOG_INFO,"[ACCOUNTING] Removed ".( $sth ne "0E0" ? $sth :
> 0).." records from tracking table");
> #}
>  
> I don't know if it's correct.
> 
> Many Thanks in advance
> 
> Stefano
> 
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.policyd.org/mailman/listinfo/users
                                          
_______________________________________________
Users mailing list
[email protected]
http://lists.policyd.org/mailman/listinfo/users_lists.policyd.org

Reply via email to