Hello,

I've running spamassassin for a long time now but I changed my mail system
to a virtual email / userid mapping system. All mail for email adresses are
stored on disk by a single userid (vhost). Virtual mail delivery is done by
sendmail and procmail. Inside procmail the $LOGNAME matches the email adress
of the final recipient but real userid of the procmail process is always
vhost.

I now have the problem that spamassassin and razor simply look for their
config files in the homedir of the userid vhost but not for
/home/vhost/$LOGNAME/user_prefs (I run spamd -D and see
/home/vhost/.spamassassin/user_prefs and also
/home/vhost/.spamassassin/bayes_toks) I also didn't manage to get userprefs
from db.

I have spamassassin 2.55 installed from cpan. All required modules are
installed. Simple classifying is working.

Any hints how I can manage to tell spamassassin that files for bayes should
be used like /home/vhost/bayes/$LOGNAME/<files> or better like
/var/spool/mail/vhost/.bayes/$LOGNAME/<files> and to read required_hits,
whitelist and blacklist from db with $LOGNAME and not vhost?

My /etc/mail/spamassassin/local.cf:

user_scores_dsn                 DBI:mysql:spamdb:localhost:3306
user_scores_sql_username        spamuserid
user_scores_sql_password        spampasswd
user_scores_sql_table           spam

My spamdb:

mysql> describe spamdb;
+------------+--------------+------+-----+---------+-------+
| Field      | Type         | Null | Key | Default | Extra |
+------------+--------------+------+-----+---------+-------+
| username   | varchar(250) | YES  |     | NULL    |       |
| preference | varchar(250) | YES  |     | NULL    |       |
| value      | varchar(250) | YES  |     | NULL    |       |
+------------+--------------+------+-----+---------+-------+
mysql> select * from spam;
+---------------------+---------------+-------+
| username            | preference    | value |
+---------------------+---------------+-------+
| [EMAIL PROTECTED] | required_hits | 4     |
+---------------------+---------------+-------+
1 row in set (0.00 sec)


My /etc/procmailrc:

DROPPRIVS=yes
:0fw
* < 256000
| /usr/bin/spamc -f
:0
* ^^rom[ ]
{
  LOG="*** Dropped F off From_ header! Fixing up. "

  :0 fhw
  | sed -e '1s/^/F/'
}

All other spamassassin files are unchanged.

Here is my report of spamd -D:

debug: Score set 0 chosen.
debug: running in taint mode? no
debug: ignore: test message to precompile patterns and load modules
debug: using "/usr/share/spamassassin" for default rules dir
debug: using "/etc/mail/spamassassin" for site rules dir
debug: bayes: no dbs present, cannot scan:
/tmp/spamassassin-3135/.spamassassin/bayes_toks
debug: Score set 1 chosen.
debug: Initialising learner
debug: debug: Only 0 spam(s) in Bayes DB < 200
debug: bayes: 3135 untie-ing
debug: bayes: 3135 untie-ing db_toks
debug: is Net::DNS::Resolver available? yes
debug: trying (3) kernel.org...
debug: looking up MX for 'kernel.org'
debug: MX for 'kernel.org' exists? 1
debug: MX lookup of kernel.org succeeded => Dns available (set dns_available
to hardcode)
debug: is DNS available? 1
debug: running header regexp tests; score so far=0
debug: running body-text per-line regexp tests; score so far=1.9
debug: running raw-body-text per-line regexp tests; score so far=1.9
debug: running uri tests; score so far=1.9
debug: uri tests: Done uriRE
debug: running full-text regexp tests; score so far=1.9
debug: Current PATH is:
/usr/local/qt/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/X11R6/b
in
debug: DCC is not available: dccproc not found
debug: Razor2 is available
debug: Razor2 is available
debug: entering helper-app run mode
 Razor-Log: Computed razorhome from env: /root/.razor
 Razor-Log: Found razorhome: /root/.razor
 Razor-Log: No /root/.razor/razor-agent.conf found, skipping.
 Razor-Log: No razor-agent.conf found, using defaults.
Aug 31 00:42:02.099430 check[3135]: [ 1] [bootup] Logging initiated
LogDebugLevel=9 to stdout
Aug 31 00:42:02.100333 check[3135]: [ 5] computed razorhome=/root/.razor,
conf=, ident=/root/.razor/identity
Aug 31 00:42:02.100749 check[3135]: [ 8] Client supported_engines: 1 2 3 4
Aug 31 00:42:02.101458 check[3135]: [ 8]  prep_mail done: mail 1
headers=101, mime0=1376
Aug 31 00:42:02.102220 check[3135]: [ 5] read_file: 1 items read from
/root/.razor/servers.discovery.lst
Aug 31 00:42:02.102847 check[3135]: [ 5] read_file: 2 items read from
/root/.razor/servers.nomination.lst
Aug 31 00:42:02.103224 check[3135]: [ 5] read_file: 2 items read from
/root/.razor/servers.catalogue.lst
Aug 31 00:42:02.103752 check[3135]: [ 9] Assigning defaults to
folly.cloudmark.com
Aug 31 00:42:02.104258 check[3135]: [ 9] Assigning defaults to
joy.cloudmark.com
Aug 31 00:42:02.104506 check[3135]: [ 9] Assigning defaults to
truth.cloudmark.com
Aug 31 00:42:02.104716 check[3135]: [ 9] Assigning defaults to
stress.cloudmark.com
Aug 31 00:42:02.105527 check[3135]: [ 5] read_file: 11 items read from
/root/.razor/server.stress.cloudmark.com.conf
Aug 31 00:42:02.106248 check[3135]: [ 5] read_file: 12 items read from
/root/.razor/server.truth.cloudmark.com.conf
Aug 31 00:42:02.106661 check[3135]: [ 5] 169357 seconds before closest
server discovery
Aug 31 00:42:02.107035 check[3135]: [ 6] truth.cloudmark.com is a Catalogue
Server srl 68; computed min_cf=6, Server se: 58
Aug 31 00:42:02.107468 check[3135]: [ 8] Computed supported_engines: 4
Aug 31 00:42:02.107712 check[3135]: [ 8] Using next closest server
truth.cloudmark.com:2703, cached info srl 68
Aug 31 00:42:02.107912 check[3135]: [ 8] mail 1 has no subject
Aug 31 00:42:02.109930 check[3135]: [ 6] preproc: mail 1.0 went from 1376
bytes to 1339
Aug 31 00:42:02.110394 check[3135]: [ 6] computing sigs for mail 1.0, len
1339
Aug 31 00:42:02.112784 check[3135]: [ 6] skipping whitelist file (empty?):
/root/.razor/razor-whitelist
Aug 31 00:42:02.113135 check[3135]: [ 5] Connecting to truth.cloudmark.com
...
Aug 31 00:42:02.452074 check[3135]: [ 8] Connection established
Aug 31 00:42:02.452509 check[3135]: [ 4] truth.cloudmark.com >> 29 server
greeting: sn=C&srl=68&ep4=7542-10&a=l
Aug 31 00:42:02.453040 check[3135]: [ 6] truth.cloudmark.com is a Catalogue
Server srl 68; computed min_cf=6, Server se: 58
Aug 31 00:42:02.453325 check[3135]: [ 8] Computed supported_engines: 4
Aug 31 00:42:02.453537 check[3135]: [ 8] mail 1.0 e4 sig:
xFaZIZUVHk90OQfARnenjx5BZTMA
Aug 31 00:42:02.453763 check[3135]: [ 8] preparing 1 queries
Aug 31 00:42:02.454043 check[3135]: [ 8] sending 1 batches
Aug 31 00:42:02.454313 check[3135]: [ 4] truth.cloudmark.com << 52
Aug 31 00:42:02.454387 check[3135]: [ 6]
a=c&e=4&ep4=7542-10&s=xFaZIZUVHk90OQfARnenjx5BZTMA
Aug 31 00:42:02.643838 check[3135]: [ 4] truth.cloudmark.com >> 5
Aug 31 00:42:02.643965 check[3135]: [ 6] response to sent.1
p=0
Aug 31 00:42:02.644526 check[3135]: [ 6] mail 1.0 e=4
sig=xFaZIZUVHk90OQfARnenjx5BZTMA: sig not found.
Aug 31 00:42:02.644680 check[3135]: [ 7] method 4: mail 1.0: no-contention
part, spam=0
Aug 31 00:42:02.644754 check[3135]: [ 7] method 4: mail 1: all
non-contention parts not spam, mail not spam
Aug 31 00:42:02.644823 check[3135]: [ 3] mail 1 is not known spam.
Aug 31 00:42:02.644919 check[3135]: [ 5] disconnecting from server
truth.cloudmark.com
Aug 31 00:42:02.645143 check[3135]: [ 4] truth.cloudmark.com << 5
Aug 31 00:42:02.645208 check[3135]: [ 6] a=q
debug: Using results from Razor v2.36
debug: Found Razor2 part: part=0 engine=4 ct=0 cf=0
debug: leaving helper-app run mode
debug: Razor2 results: spam? 0  highest cf score: 0
debug: Pyzor is not available: pyzor not found
debug: all '*From' addrs: [EMAIL PROTECTED]
debug: all '*To' addrs:
debug: running meta tests; score so far=2.4
debug: is spam? score=2.4 required=5
tests=DATE_MISSING,MISSING_HEADERS,NO_REAL_NAME
debug: bayes: 3135 untie-ing
server started on port 783 (running version 2.55)
server pid: 3135
logmsg: server started on port 783 (running version 2.55)


Thanks for reading this long message and for any help!

Alexander Newald



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to