You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Kevin Marvin <km...@architel.com> on 2005/06/07 19:29:32 UTC

SA 3.0.2 - SQL User Preferences failing for all but required_score

HELP!  I cant get this figured out for the life of me.  Here is what I
have...

I have SA 3.0.2, using a Postgres database to store user preferences.  When
I run a test instance and pass a test message to it (using spamc and spamd)
and the blacklist_from entries never get read...

Here is my local.cf:
----------------------------------------------------------------------------
user_scores_dsn                 DBI:Pg:dbname=exim;host=localhost
user_scores_sql_username        spam
user_scores_sql_password        pass

user_scores_sql_custom_query    SELECT preference, value FROM userpref WHERE
username = _USERNAME_ OR username = '$GLOBAL' OR username = '%'||_DOMAIN_
ORDER BY username ASC

#      
........................................................................
# These values can be overridden by editing ~/.spamassassin/user_prefs.cf
# (see spamassassin(1) for details)

# These should be safe assumptions and allow for simple visual sifting
# without risking lost emails.

required_hits 5
report_safe 0
rewrite_header Subject [SPAM]


# Default template. Try to keep it under 78 columns (inside the the dots
below).
#      
........................................................................
clear_report_template
report Spam detection software, running on the system "_HOSTNAME_", has
report processed this incoming email If you have any questions, see
report _CONTACTADDRESS_ for details.
report 
report Content analysis details:   (_SCORE_ points)
report
report " pts rule name              description"
report  ---- ----------------------
--------------------------------------------------
report _SUMMARY_
#      
........................................................................
----------------------------------------------------------------------------

This file, along with a duplicate of the other files in my
/etc/mail/spamassassin folder are stored in /etc/mail/test.  I run the
following as the test server:
----------------------------------------------------------------------------
 spamd -x -q -D -C /etc/mail/test --siteconfigpath=/etc/mail/test  -p 9898
----------------------------------------------------------------------------
And this for the test client:
----------------------------------------------------------------------------
spamc -d localhost -p 9898 -u kevin@architel.com < mb2
----------------------------------------------------------------------------

Here are the contents of mb2
----------------------------------------------------------------------------
>From kevin.marvin@gmail.com  Wed Feb  2 10:10:15 2005
Return-Path: <ke...@gmail.com>
X-Originating-IP: [66.194.13.227]
X-Originating-Email: [kevin.marvin@gmail.com]
X-Sender: kevin.marvin@gmail.com
From: "Kevin Marvin" <ke...@gmail.com>
To: kevin@architel.com
Subject: Test Message from CLI
Date: Wed, 02 Feb 2005 16:09:21 +0000
Mime-Version: 1.0
Content-Type: text/plain; format=flowed
X-OriginalArrivalTime: 02 Feb 2005 16:10:02.0339 (UTC)
FILETIME=[A6A6A330:01C50941]



This is a test / demo message.  It should / should not get tagged based on
the SQL settings.  I used this message from another mailbox as a template
for the header content.

- Kevin

----------------------------------------------------------------------------

And here is the log from the server...

----------------------------------------------------------------------------
logmsg: connection from Safe02 [127.0.0.1] at port 35842
debug: Conf::SQL: executing SQL: SELECT preference, value FROM userpref
WHERE username = 'kevin@architel.com' OR username = '$GLOBAL' OR username =
'%'||'architel.com' ORDER BY username ASC
debug: retrieving prefs for kevin@architel.com from SQL server
debug: user has changed
debug: bayes: no dbs present, cannot tie DB R/O:
/usr/exim/.spamassassin/bayes_toks
debug: Score set 1 chosen.
logmsg: processing message (unknown) for kevin@architel.com:501.
debug: bayes: no dbs present, cannot tie DB R/O:
/usr/exim/.spamassassin/bayes_toks
debug: metadata: X-Spam-Relays-Trusted:
debug: metadata: X-Spam-Relays-Untrusted:
debug: ---- MIME PARSER START ----
debug: main message type: text/plain
debug: parsing normal part
debug: added part, type: text/plain
debug: ---- MIME PARSER END ----
debug: decoding: no encoding detected
debug: URIDNSBL: domains to query:
debug: Running tests for priority: 0
debug: running header regexp tests; score so far=0
debug: running body-text per-line regexp tests; score so far=0
debug: running uri tests; score so far=0
debug: running raw-body-text per-line regexp tests; score so far=0
debug: running full-text regexp tests; score so far=0
debug: Running tests for priority: 500
debug: running meta tests; score so far=0
debug: running header regexp tests; score so far=0
debug: running body-text per-line regexp tests; score so far=0
debug: running uri tests; score so far=0
debug: running raw-body-text per-line regexp tests; score so far=0
debug: running full-text regexp tests; score so far=0
debug: auto-learn: currently using scoreset 1.
debug: auto-learn: message score: 0, computed score for autolearn: 0
debug: auto-learn? ham=0.1, spam=12, body-points=0, head-points=0,
learned-points=0
debug: auto-learn? yes, ham (0 < 0.1)
debug: Learning Ham
debug: all '*From' addrs: kevin.marvin@gmail.com
debug: all '*To' addrs: kevin@architel.com
debug: lock: 2844 created
/usr/exim/.spamassassin/bayes.lock.Safe02.architel.com.2844
debug: lock: 2844 trying to get lock on /usr/exim/.spamassassin/bayes with 0
retries
debug: lock: 2844 link to /usr/exim/.spamassassin/bayes.lock: link ok
debug: bayes: 2844 tie-ing to DB file R/W /usr/exim/.spamassassin/bayes_toks
debug: bayes: 2844 tie-ing to DB file R/W /usr/exim/.spamassassin/bayes_seen
debug: bayes: found bayes db version 0
debug: bayes: new db, set db version 3 and 0 tokens
debug: tokenize: header tokens for *p = "U*kevin.marvin D*gmail.com D*com"
debug: tokenize: header tokens for X-Originating-IP = " [66.194.13.227]"
debug: tokenize: header tokens for X-Originating-Email = "
[kevin.marvin@gmail.com]"
debug: tokenize: header tokens for *F = "U*kevin.marvin D*gmail.com D*com"
debug: tokenize: header tokens for To = "U*kevin D*architel.com D*com"
debug: tokenize: header tokens for Mime-Version = " 1.0"
debug: tokenize: header tokens for *c = " /plain; format=flowed"
debug: tokenize: header tokens for *RT = " "
debug: tokenize: header tokens for *RU = " "
debug: bayes: Learned
'7240cb609c97f078e117afd1e6bddf136c41d696@sa_generated', atime: 1107320400
debug: bayes: 2844 untie-ing
debug: bayes: 2844 untie-ing db_toks
debug: bayes: 2844 untie-ing db_seen
debug: bayes: files locked, now unlocking lock
debug: unlock: 2844 unlink /usr/exim/.spamassassin/bayes.lock
debug: is spam? score=0 required=2
debug: tests=
debug: subtests=__RATWARE_0_TZ_DATE
logmsg: clean message (0.0/2.0) for kevin@architel.com:501 in 0.4 seconds,
670 bytes.
logmsg: result: .  0 -  scantime=0.4,size=670,mid=(unknown),autolearn=ham


----------------------------------------------------------------------------

As you can see, the message is not getting blacklisted.  Any light you can
shed is appreciated.

- Kevin


Re: SA 3.0.2 - SQL User Preferences failing for all but required_score

Posted by Michael Parker <pa...@pobox.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

JamesDR wrote:

> Kevin Marvin wrote:
>
>> HELP! I cant get this figured out for the life of me. Here is
>> what I have...
>>
>> I have SA 3.0.2, using a Postgres database to store user
>> preferences. When I run a test instance and pass a test message
>> to it (using spamc and spamd) and the blacklist_from entries
>> never get read...
>>
>> Here is my local.cf:
>>
----------------------------------------------------------------------------
>>
>>
>> user_scores_dsn DBI:Pg:dbname=exim;host=localhost
>> user_scores_sql_username spam user_scores_sql_password
>> pass
>>
>> user_scores_sql_custom_query SELECT preference, value FROM
>> userpref WHERE username = _USERNAME_ OR username = '$GLOBAL' OR
>> username = '%'||_DOMAIN_ ORDER BY username ASC
>
>
> <snip> Almost there :-D
>
> allow_user_rules 1
>
>
WHOA!!!

No.  Please do not spread this sort of advice around.  There are VERY
VERY FEW reasons to use allow_user_rules in SpamAssassin.  It is not
needed at all in this case.

For folks running with allow_user_rules turned on I encourage you to
evaluate why you are doing so.  It opens you up to all sort of
security risks and performance problems, and 99.9% of the time not
necessary.

Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFCpebwG4km+uS4gOIRAskOAKCYVDKCJUmyQSrR5nSDmOCBO7XZFgCeMiMg
29J7RVzuuJ5OCG2FzDe6tiE=
=dDUg
-----END PGP SIGNATURE-----


Re: SA 3.0.2 - SQL User Preferences failing for all but required_score

Posted by JamesDR <ja...@trusswood.net>.
JamesDR wrote:
> Kevin Marvin wrote:

Sorry list,
Michael set me straight on allow_user_rules :-D

-- 
Thanks,
James


Re: SA 3.0.2 - SQL User Preferences failing for all but required_score

Posted by JamesDR <ja...@trusswood.net>.
Kevin Marvin wrote:
> HELP!  I cant get this figured out for the life of me.  Here is what I
> have...
> 
> I have SA 3.0.2, using a Postgres database to store user preferences.  When
> I run a test instance and pass a test message to it (using spamc and spamd)
> and the blacklist_from entries never get read...
> 
> Here is my local.cf:
> ----------------------------------------------------------------------------
> user_scores_dsn                 DBI:Pg:dbname=exim;host=localhost
> user_scores_sql_username        spam
> user_scores_sql_password        pass
> 
> user_scores_sql_custom_query    SELECT preference, value FROM userpref WHERE
> username = _USERNAME_ OR username = '$GLOBAL' OR username = '%'||_DOMAIN_
> ORDER BY username ASC

<snip>
Almost there :-D

allow_user_rules            1


-- 
Thanks,
James


Re: SA 3.0.2 - SQL User Preferences failing for all but required_score

Posted by Kevin Marvin <km...@architel.com>.
You, sir, are a GENIUS!

That fixed it perfectly.  Thank you very much!  Name the brand of e-beer and
I will send it your way.


- Kevin

On 6/7/05 1:00 PM, "Michael Parker" <pa...@pobox.com> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Kevin Marvin wrote:
> 
>> spamd -x -q -C /etc/mail/test/ --siteconfigpath=/etc/mail/test -p
> 
> Are you sure you mean -C /etc/mail/test/? Normally that would be
> something like /usr/share/spamassassin, which is where all of the
> default .cf/rules files are installed.
> 
> Michael
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (Darwin)
> 
> iD8DBQFCpeCuG4km+uS4gOIRAuGxAJ0XcBwPgNbNcqgEwayQZG9B2BYUkACfZ8y3
> gQrAkc9U1RXDi72hN3FUXkM=
> =MVGs
> -----END PGP SIGNATURE-----
> 


Re: SA 3.0.2 - SQL User Preferences failing for all but required_score

Posted by Michael Parker <pa...@pobox.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kevin Marvin wrote:

> spamd -x -q -C /etc/mail/test/ --siteconfigpath=/etc/mail/test -p

Are you sure you mean -C /etc/mail/test/? Normally that would be
something like /usr/share/spamassassin, which is where all of the
default .cf/rules files are installed.

Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFCpeCuG4km+uS4gOIRAuGxAJ0XcBwPgNbNcqgEwayQZG9B2BYUkACfZ8y3
gQrAkc9U1RXDi72hN3FUXkM=
=MVGs
-----END PGP SIGNATURE-----


Re: SA 3.0.2 - SQL User Preferences failing for all but required_score

Posted by Kevin Marvin <km...@architel.com>.
Ok..

       preference        |         value
-------------------------+------------------------
 required_score          | 4.0
 blacklist_from          | kevin.marvin@gmail.com
 blacklist_from          | user@here.net
 score USER_IN_BLACKLIST | 100
 required_score          | 3.0
 report_safe             | 0
 use_razor2              | 1
 use_pyzor               | 1
 use_dcc                 | 1
 score USER_IN_WHITELIST | -10

Now the run produces...

(spamd)
spamd -x -q -C /etc/mail/test/ --siteconfigpath=/etc/mail/test -p
9898 -D
trying to connect to syslog/unix...
no error connecting to syslog/unix
logging enabled:
        facility: mail
        socket:   unix
        output:   syslog
creating INET socket:
        Listen: 128
        LocalAddr: 127.0.0.1
        LocalPort: 9898
        Proto: 6
        ReuseAddr: 1
        Type: 1
debug: SpamAssassin version 3.0.2
debug: Score set 0 chosen.
debug: Storable module v2.13 found
debug: Preloading modules with HOME=/tmp/spamd-31429-init
debug: ignore: test message to precompile patterns and load modules
debug: using "/etc/mail/test/init.pre" for site rules init.pre
debug: config: read file /etc/mail/test/init.pre
debug: using "/etc/mail/test" for default rules dir
debug: config: read file /etc/mail/test/local.cf
debug: using "/etc/mail/test" for site rules dir
debug: config: read file /etc/mail/test/local.cf
debug: plugin: loading Mail::SpamAssassin::Plugin::URIDNSBL from @INC
debug: plugin: registered
Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x91dcb14)
debug: plugin: loading Mail::SpamAssassin::Plugin::Hashcash from @INC
debug: plugin: registered
Mail::SpamAssassin::Plugin::Hashcash=HASH(0x91f8550)
debug: plugin: loading Mail::SpamAssassin::Plugin::SPF from @INC
debug: plugin: registered Mail::SpamAssassin::Plugin::SPF=HASH(0x920cce4)
debug: bayes: no dbs present, cannot tie DB R/O:
/tmp/spamd-31429-init/.spamassassi
n/bayes_toks
debug: Score set 1 chosen.
debug: ---- MIME PARSER START ----
debug: main message type: text/plain
debug: parsing normal part
debug: added part, type: text/plain
debug: ---- MIME PARSER END ----
debug: bayes: no dbs present, cannot tie DB R/O:
/tmp/spamd-31429-init/.spamassassi
n/bayes_toks
debug: metadata: X-Spam-Relays-Trusted:
debug: metadata: X-Spam-Relays-Untrusted:
debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x91dcb14)
implements 'par
sed_metadata'
debug: is Net::DNS::Resolver available? yes
debug: Net::DNS version: 0.48
debug: trying (3) linux.org...
debug: looking up NS for 'linux.org'
debug: NS lookup of linux.org succeeded => Dns available (set dns_available
to hard
code)
debug: is DNS available? 1
debug: decoding: no encoding detected
debug: URIDNSBL: domains to query:
debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x91dcb14)
implements 'che
ck_post_dnsbl'
debug: is spam? score=0 required=5
debug: tests=
debug: subtests=
server started on port 9898/tcp (running version 3.0.2)
logmsg: server started on port 9898/tcp (running version 3.0.2)
logmsg: server successfully spawned child process, pid 31431
logmsg: server successfully spawned child process, pid 31432
logmsg: server successfully spawned child process, pid 31433
logmsg: server successfully spawned child process, pid 31435
logmsg: server successfully spawned child process, pid 31436
server pid: 31429
logmsg: connection from Safe02 [127.0.0.1] at port 51427
debug: Conf::SQL: executing SQL: SELECT preference, value FROM userpref
WHERE usern
ame = 'kevin@architel.com' OR username = '$GLOBAL' OR username =
'%'||'architel.com
' ORDER BY username ASC, prefid ASC
debug: retrieving prefs for kevin@architel.com from SQL server
debug: user has changed
debug: bayes: 31431 tie-ing to DB file R/O
/usr/exim/.spamassassin/bayes_toks
debug: bayes: 31431 tie-ing to DB file R/O
/usr/exim/.spamassassin/bayes_seen
debug: bayes: found bayes db version 3
debug: bayes: Not available for scanning, only 0 spam(s) in Bayes DB < 200
debug: bayes: 31431 untie-ing
debug: bayes: 31431 untie-ing db_toks
debug: bayes: 31431 untie-ing db_seen
debug: Score set 1 chosen.
logmsg: processing message (unknown) for kevin@architel.com:501.
debug: bayes: 31431 tie-ing to DB file R/O
/usr/exim/.spamassassin/bayes_toks
debug: bayes: 31431 tie-ing to DB file R/O
/usr/exim/.spamassassin/bayes_seen
debug: bayes: found bayes db version 3
debug: bayes: Not available for scanning, only 0 spam(s) in Bayes DB < 200
debug: bayes: 31431 untie-ing
debug: bayes: 31431 untie-ing db_toks
debug: bayes: 31431 untie-ing db_seen
debug: metadata: X-Spam-Relays-Trusted:
debug: metadata: X-Spam-Relays-Untrusted:
debug: ---- MIME PARSER START ----
debug: main message type: text/plain
debug: parsing normal part
debug: added part, type: text/plain
debug: ---- MIME PARSER END ----
debug: decoding: no encoding detected
debug: URIDNSBL: domains to query:
debug: auto-learn: currently using scoreset 1.
debug: auto-learn: message score: 0, computed score for autolearn: 0
debug: auto-learn? ham=0.1, spam=12, body-points=0, head-points=0,
learned-points=0
debug: auto-learn? yes, ham (0 < 0.1)
debug: Learning Ham
debug: all '*From' addrs: kevin.marvin@gmail.com
debug: all '*To' addrs: kevin@architel.com
debug: lock: 31431 created
/usr/exim/.spamassassin/bayes.lock.Safe02.architel.com.3
1431
debug: lock: 31431 trying to get lock on /usr/exim/.spamassassin/bayes with
0 retri
es
debug: lock: 31431 link to /usr/exim/.spamassassin/bayes.lock: link ok
debug: bayes: 31431 tie-ing to DB file R/W
/usr/exim/.spamassassin/bayes_toks
debug: bayes: 31431 tie-ing to DB file R/W
/usr/exim/.spamassassin/bayes_seen
debug: bayes: found bayes db version 3
debug: 7240cb609c97f078e117afd1e6bddf136c41d696@sa_generated: already learnt
correc
tly, not learning twice
debug: bayes: 31431 untie-ing
debug: bayes: 31431 untie-ing db_toks
debug: bayes: 31431 untie-ing db_seen
debug: bayes: files locked, now unlocking lock
debug: unlock: 31431 unlink /usr/exim/.spamassassin/bayes.lock
debug: is spam? score=0 required=3
debug: tests=
debug: subtests=
logmsg: clean message (0.0/3.0) for kevin@architel.com:501 in 0.2 seconds,
670 byte
s.
logmsg: result: .  0 -
scantime=0.2,size=670,mid=(unknown),autolearn=unavailable


And spamc produces:

 spamc -u kevin@architel.com -p 9898 < mb2
>From kevin.marvin@gmail.com  Wed Feb  2 10:10:15 2005
Return-Path: <ke...@gmail.com>
X-Originating-IP: [66.194.13.227]
X-Originating-Email: [kevin.marvin@gmail.com]
X-Sender: kevin.marvin@gmail.com
From: "Kevin Marvin" <ke...@gmail.com>
To: kevin@architel.com
Subject: Test Message from CLI
Date: Wed, 02 Feb 2005 16:09:21 +0000
Mime-Version: 1.0
Content-Type: text/plain; format=flowed
X-OriginalArrivalTime: 02 Feb 2005 16:10:02.0339 (UTC)
FILETIME=[A6A6A330:01C50941]
X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on
Safe02.architel.com



This is a test / demo message.  It should / should not get tagged based on
the SQL settings.  I used this message from another mailbox as a template
for the header content.

- Kevin



On 6/7/05 12:50 PM, "Michael Parker" <pa...@pobox.com> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Kevin Marvin wrote:
> 
>> preference | value
>> -------------------------+------------------------ required_score
>> | 4.0 blacklist_from | kevin.marvin@gmail.com
>> blacklist_from | user@here.net score USER_IN_BLACKLIST |
>> 100 required_score | 3.0 report_safe | 0
>> use_razor2 | 1 use_pyzor | 1 use_dcc
>> | 1 score USER_IN_WHITELIST | -10 use_auto_whitelist | 0
>> 
> 
> I'm not sure if this is it, and I don't have time to test it and see,
> but it might be the fact that you've got the use_auto_whitelist there
> which is admin only, and only allowed in a .cf file.  Try removing
> that and see if it helps.
> 
> Michael
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (Darwin)
> 
> iD8DBQFCpd53G4km+uS4gOIRAgxhAJ4tC0i4IxAMWin38mOQ8h3mXy6xawCaA1Du
> VxMoh/jZTugWVNIexAurj24=
> =HcDs
> -----END PGP SIGNATURE-----
> 


Re: SA 3.0.2 - SQL User Preferences failing for all but required_score

Posted by Michael Parker <pa...@pobox.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kevin Marvin wrote:

> preference | value
> -------------------------+------------------------ required_score
> | 4.0 blacklist_from | kevin.marvin@gmail.com
> blacklist_from | user@here.net score USER_IN_BLACKLIST |
> 100 required_score | 3.0 report_safe | 0
> use_razor2 | 1 use_pyzor | 1 use_dcc
> | 1 score USER_IN_WHITELIST | -10 use_auto_whitelist | 0
>

I'm not sure if this is it, and I don't have time to test it and see,
but it might be the fact that you've got the use_auto_whitelist there
which is admin only, and only allowed in a .cf file.  Try removing
that and see if it helps.

Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFCpd53G4km+uS4gOIRAgxhAJ4tC0i4IxAMWin38mOQ8h3mXy6xawCaA1Du
VxMoh/jZTugWVNIexAurj24=
=HcDs
-----END PGP SIGNATURE-----


Re: SA 3.0.2 - SQL User Preferences failing for all but required_score

Posted by Kevin Marvin <ke...@architel.com>.
       preference        |         value
-------------------------+------------------------
 required_score          | 4.0
 blacklist_from          | kevin.marvin@gmail.com
 blacklist_from          | user@here.net
 score USER_IN_BLACKLIST | 100
 required_score          | 3.0
 report_safe             | 0
 use_razor2              | 1
 use_pyzor               | 1
 use_dcc                 | 1
 score USER_IN_WHITELIST | -10
 use_auto_whitelist      | 0



On 6/7/05 12:43 PM, "Michael Parker" <pa...@pobox.com> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Kevin Marvin wrote:
> 
>> debug: Conf::SQL: executing SQL: SELECT preference, value FROM
>> userpref WHERE username = 'kevin@architel.com' OR username =
>> '$GLOBAL' OR username = '%'||'architel.com' ORDER BY username ASC
> 
> If you run the query above in psql what does it give you?
> 
> Michael
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (Darwin)
> 
> iD8DBQFCpdzaG4km+uS4gOIRAga/AJ44VjU53w8kEuz7PQlOsnpol4n6ZgCcDUIT
> U461nxACyJjw0oblKxEeQeo=
> =6tGG
> -----END PGP SIGNATURE-----
> 




Re: SA 3.0.2 - SQL User Preferences failing for all but required_score

Posted by Michael Parker <pa...@pobox.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kevin Marvin wrote:

> debug: Conf::SQL: executing SQL: SELECT preference, value FROM
> userpref WHERE username = 'kevin@architel.com' OR username =
> '$GLOBAL' OR username = '%'||'architel.com' ORDER BY username ASC

If you run the query above in psql what does it give you?

Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFCpdzaG4km+uS4gOIRAga/AJ44VjU53w8kEuz7PQlOsnpol4n6ZgCcDUIT
U461nxACyJjw0oblKxEeQeo=
=6tGG
-----END PGP SIGNATURE-----