[Kolab-devel] [issue2425] Undefined variable: reject_forged_from_header reported in fatal.log

Richard Bos kolab-issues at intevation.de
Mon Jan 28 10:08:33 CET 2008


New submission from Richard Bos <ml at radoeka.nl>:

The following messages are reported in the log file /var/log/kolab/fatal.log
(suse install):
[27-Jan-2008 06:30:14] PHP Notice:  Undefined variable:
reject_forged_from_header in /usr/share/php5/PEAR/Kolab/Filter/Content.php on
line 481
[27-Jan-2008 06:30:14] PHP Notice:  Undefined property:  stdClass::$personal in
/usr/share/php5/PEAR/Kolab/Filter/Content.php on line 490
[27-Jan-2008 06:30:14] PHP Notice:  Undefined variable: to in
/usr/share/php5/PEAR/Kolab/Filter/Content.php on line 102

At 06:30 a cronjob starts that executes sa_learn --spam.
But when this script is run manually the errors are not reported.
But when it is run from the cron, it reports the errors again.  It seems it has
something todo with the environment settings.

Verify (only) the first one:
The variable reject_forged_from_header is defined in:
 [/var/log/kolab] # grep reject_forged_from_header
/var/lib/kolab/kolab-filter/config.php
$conf['filter']['reject_forged_from_header'] = false;

 [/var/log/kolab] # grep require /usr/share/php5/PEAR/Kolab/Filter/Content.php
require_once 'Kolab/Filter/Filter.php';
                require_once('Kolab/Filter/Outlook.php');
               
[/var/log/kolab] # grep require /usr/share/php5/PEAR/Kolab/Filter/Filter.php
require_once 'PEAR.php';
require_once 'Horde.php';
require_once 'Kolab/Filter/Transport.php';

[/var/log/kolab] # grep require /usr/share/php5/PEAR/Kolab/Filter/Transport.php
        require_once 'Net/LMTP.php';
        require_once 'Net/SMTP.php';

When this is not a local problem (because of the differences between the shell
and cronjob behavior);
It looks like that the file /var/lib/kolab/kolab-filter/config.php should be
required by /usr/share/php5/PEAR/Kolab/Filter/Content.php

When I run spamassassin via a cronjob with the kolab/kolab-filter/config.php
required, no errors (at all) are reported.

Proposes patch:
--- Kolab/Filter/Content.php.org        2008-01-28 10:07:36.000000000 +0100
+++ Kolab/Filter/Content.php    2008-01-28 09:57:33.000000000 +0100
@@ -33,6 +33,7 @@
  */
 
 /* Load the basic filter definition */
+require_once 'kolab/kolab-filter/config.php'
 require_once 'Kolab/Filter/Filter.php';
 
 define('RM_STATE_READING_HEADER', 1 );

----------
messages: 13476
nosy: rbos
priority: bug
status: unread
title: Undefined variable: reject_forged_from_header reported in fatal.log
________________________________________________
Kolab issue tracker <kolab-issues at intevation.de>
<https://intevation.de/roundup/kolab/issue2425>
________________________________________________




More information about the devel mailing list