Re: unable to retrive preferences from sql

Alex <[email protected]> Tue, 24 Sep 2002 15:44:31 +0800 (CST)
Newsgroups gmane.comp.horde.sam
Message-ID <[email protected]>
I try to use hooks function but ....

sam/config/conf.php
$conf['hooks']['username'] = true;

horde/config/hooks.php looks like

if (!function_exists('_sam_hook_username')) {
    function _sam_hook_username($horde_uid)
    {
        if (strstr($horde_uid, '@')) {
            $parts = explode('@', $horde_uid);
            return $parts[0];
        } else {
            return $horde_uid;
        }
    }
}

But username value still not change.


 --- 撘菔舀 <[email protected]> 閮荔> Hi all:
> I have installed SAM with MYSQL as storage,when i
> start spamd daemon with debug 
> mode(spamd -C /etc/mail/spamassassin -D -q -x -a -u
> spamd),and i saw messages  
> shown at console .......
>  
> logmsg: connection from webmail [ 127.0.0.1 ] at port
> 36388
> debug: retrieving prefs for txg16 from SQL server
> 
> And here are the entries store in mysql :
> prefid horde_id username preference value 
>  1   [email protected]   [email protected]  
> required_hits   3  
>  2   [email protected]   [email protected]  
> subject_tag   ISSPAM  
>  3   [email protected]   [email protected]  
> rewrite_subject   1   
>  4   [email protected]   [email protected]  
> spam_level_stars   0   
>  5   [email protected]   [email protected]  
> report_header   0   
>  6   [email protected]   [email protected]  
> use_terse_report   0   
>  7   [email protected]   [email protected]  
> defang_mime   0  
> 
> I think ,that because username:[email protected] was
> different from "txg16" so 
> spamassassin could not get the correctly preference.So
> i modified username  
> from [email protected] to txg16 ,and that's work !!
> 
> Is that SAM's bug or something i missed while config
> spamassassin ?
> 
> Thanks !!
> Alex
> 
> 


-----------------------------------------------------------------
< 瘥憭拚 Yahoo!憟 >  www.yahoo.com.tw

-- 
sam mailing list
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [email protected]