Intial Config

Forum for getting help with Project Gamera, Spamassassin, Clamav, qmail-scanner and other anti-spam tools.
wacko
Forum User
Forum User
Posts: 21
Joined: Tue May 24, 2005 10:24 am

Intial Config

Unread post by wacko »

Hey People,

Thanks for providing the scripts for the installation a big help!! I have a few questions I was wondering if somone could answer, I previously had spamassassin on another vanilla box which I would like to imitate on my plesk server.

It used procmail and sent all spam to a separate email address on the server which I could check, I have the necessary procmail scripts but was wondering how I could configure this on a server wide basis?

Also secondly the initial install had the following info in the local.cf

user_scores_sql_table
along with some other info to login, is there any documentation or howtos on this? I would love to know more, At the moment the spam is being marked with stars and subject changes of medium high etc, where can I edit this information and just delete it above a certain score.

I am pasting my config and lint info below hopefully it can help! any extras I could use in the config would also be helpful!


user_scores_dsn DBI:mysql:horde:localhost
user_scores_sql_username horde
user_scores_sql_table userpref
user_scores_sql_password passwdhere

#------------------------------------------
# configuration parameters set
#-------------------------------------------

skip_rbl_checks 1
required_hits 4.5
report_safe 0

# Enable the Bayes system
use_bayes 1
bayes_auto_learn 1

# Enable or disable network checks
use_razor2 1
use_dcc 1
use_pyzor 1

# Score for the various tests
score RAZOR2_CHECK 5
dcc_path /usr/bin/dccproc
pyzor_path /usr/bin/pyzor

Here is the lint info

debug: SpamAssassin version 3.0.3
debug: Score set 0 chosen.
debug: running in taint mode? yes
debug: Running in taint mode, removing unsafe env vars, and resetting PATH
debug: PATH included '/usr/kerberos/sbin', keeping.
debug: PATH included '/usr/kerberos/bin', keeping.
debug: PATH included '/usr/lib/courier-imap/sbin', keeping.
debug: PATH included '/usr/lib/courier-imap/bin', keeping.
debug: PATH included '/bin', keeping.
debug: PATH included '/sbin', keeping.
debug: PATH included '/usr/bin', keeping.
debug: PATH included '/usr/sbin', keeping.
debug: PATH included '/usr/local/bin', keeping.
debug: PATH included '/usr/local/sbin', keeping.
debug: PATH included '/usr/bin/X11', keeping.
debug: PATH included '/usr/X11R6/bin', keeping.
debug: PATH included '/root/bin', keeping.
debug: Final PATH set to: /usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib/courier-imap/sbin:/usr/lib/courier-imap/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin:/root/bin
debug: diag: module installed: DBI, version 1.32
debug: diag: module installed: DB_File, version 1.806
debug: diag: module installed: Digest::SHA1, version 2.01
debug: diag: module installed: IO::Socket::UNIX, version 1.2
debug: diag: module installed: MIME::Base64, version 2.12
debug: diag: module installed: Net::DNS, version 0.31
debug: diag: module not installed: Net::LDAP ('require' failed)
debug: diag: module installed: Razor2::Client::Agent, version 2.61
debug: diag: module installed: Storable, version 2.06
debug: diag: module installed: URI, version 1.21
debug: ignore: using a test message to lint rules
debug: using "/etc/mail/spamassassin/init.pre" for site rules init.pre
debug: config: read file /etc/mail/spamassassin/init.pre
debug: using "/usr/share/spamassassin" for default rules dir
debug: config: read file /usr/share/spamassassin/10_misc.cf
debug: config: read file /usr/share/spamassassin/20_anti_ratware.cf
debug: config: read file /usr/share/spamassassin/20_body_tests.cf
debug: config: read file /usr/share/spamassassin/20_compensate.cf
debug: config: read file /usr/share/spamassassin/20_dnsbl_tests.cf
debug: config: read file /usr/share/spamassassin/20_drugs.cf
debug: config: read file /usr/share/spamassassin/20_fake_helo_tests.cf
debug: config: read file /usr/share/spamassassin/20_head_tests.cf
debug: config: read file /usr/share/spamassassin/20_html_tests.cf
debug: config: read file /usr/share/spamassassin/20_meta_tests.cf
debug: config: read file /usr/share/spamassassin/20_phrases.cf
debug: config: read file /usr/share/spamassassin/20_porn.cf
debug: config: read file /usr/share/spamassassin/20_ratware.cf
debug: config: read file /usr/share/spamassassin/20_uri_tests.cf
debug: config: read file /usr/share/spamassassin/23_bayes.cf
debug: config: read file /usr/share/spamassassin/25_body_tests_es.cf
debug: config: read file /usr/share/spamassassin/25_hashcash.cf
debug: config: read file /usr/share/spamassassin/25_spf.cf

debug: config: read file /usr/share/spamassassin/25_uribl.cf
debug: config: read file /usr/share/spamassassin/30_text_de.cf
debug: config: read file /usr/share/spamassassin/30_text_fr.cf
debug: config: read file /usr/share/spamassassin/30_text_nl.cf
debug: config: read file /usr/share/spamassassin/30_text_pl.cf
debug: config: read file /usr/share/spamassassin/50_scores.cf
debug: config: read file /usr/share/spamassassin/60_whitelist.cf
debug: using "/etc/mail/spamassassin" for site rules dir
debug: config: read file /etc/mail/spamassassin/local.cf
debug: using "/root/.spamassassin" for user state dir
debug: using "/root/.spamassassin/user_prefs" for user prefs file
debug: config: read file /root/.spamassassin/user_prefs
debug: plugin: loading Mail::SpamAssassin::Plugin::URIDNSBL from @INC
debug: plugin: registered Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x9a4b934)
debug: plugin: loading Mail::SpamAssassin::Plugin::Hashcash from @INC
debug: plugin: registered Mail::SpamAssassin::Plugin::Hashcash=HASH(0xa42a548)
debug: plugin: loading Mail::SpamAssassin::Plugin::SPF from @INC
debug: plugin: registered Mail::SpamAssassin::Plugin::SPF=HASH(0xa408e84)
debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x9a4b934) implements 'parse_config'
debug: plugin: Mail::SpamAssassin::Plugin::Hashcash=HASH(0xa42a548) implements 'parse_config'
config: SpamAssassin failed to parse line, skipping: user_scores_sql_table userpref
debug: using "/root/.spamassassin" for user state dir
debug: bayes: 23769 tie-ing to DB file R/O /root/.spamassassin/bayes_toks
debug: bayes: 23769 tie-ing to DB file R/O /root/.spamassassin/bayes_seen
debug: bayes: found bayes db version 3
debug: using "/root/.spamassassin" for user state dir
debug: bayes: Not available for scanning, only 0 spam(s) in Bayes DB < 200
debug: bayes: 23769 untie-ing
debug: bayes: 23769 untie-ing db_toks
debug: bayes: 23769 untie-ing db_seen
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: 23769 tie-ing to DB file R/O /root/.spamassassin/bayes_toks
debug: bayes: 23769 tie-ing to DB file R/O /root/.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: 23769 untie-ing
debug: bayes: 23769 untie-ing db_toks
debug: bayes: 23769 untie-ing db_seen
debug: metadata: X-Spam-Relays-Trusted:
debug: metadata: X-Spam-Relays-Untrusted:
debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x9a4b934) implements 'parsed_metadata'
Net::DNS version is 0.31, but need 0.34dnsavailable-1 at /usr/lib/perl5/vendor_perl/5.8.0/Mail/SpamAssassin/Dns.pm line 1230.
debug: decoding: no encoding detected
debug: Running tests for priority: 0
debug: running header regexp tests; score so far=0
debug: registering glue method for check_hashcash_double_spend (Mail::SpamAssassin::Plugin::Hashcash=HASH(0xa42a548))
debug: registering glue method for check_for_spf_helo_pass (Mail::SpamAssassin::Plugin::SPF=HASH(0xa408e84))
debug: all '*From' addrs: ignore@compiling.spamassassin.taint.org
debug: registering glue method for check_hashcash_value (Mail::SpamAssassin::Plugin::Hashcash=HASH(0xa42a548))
debug: all '*To' addrs:
debug: registering glue method for check_for_spf_softfail (Mail::SpamAssassin::Plugin::SPF=HASH(0xa408e84))
debug: registering glue method for check_for_spf_pass (Mail::SpamAssassin::Plugin::SPF=HASH(0xa408e84))
debug: registering glue method for check_for_spf_helo_softfail (Mail::SpamAssassin::Plugin::SPF=HASH(0xa408e84))
debug: registering glue method for check_for_spf_fail (Mail::SpamAssassin::Plugin::SPF=HASH(0xa408e84))
debug: registering glue method for check_for_spf_helo_fail (Mail::SpamAssassin::Plugin::SPF=HASH(0xa408e84))
debug: running body-text per-line regexp tests; score so far=-2.623
debug: running uri tests; score so far=-2.623
debug: registering glue method for check_uridnsbl (Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x9a4b934))
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: read_file: 16 items read from /etc/razor/razor-agent.conf
May 24 14:08:52.178826 check[23769]: [ 2] [bootup] Logging initiated LogDebugLevel=9 to stdout

May 24 14:08:52.179464 check[23769]: [ 5] computed razorhome=/root/.razor, conf=/etc/razor/razor-agent.conf, ident=/root/.razor/identity
May 24 14:08:52.180112 check[23769]: [ 8] Client supported_engines: 4 8
May 24 14:08:52.180822 check[23769]: [ 8] prep_mail done: mail 1 headers=93, mime0=1376
May 24 14:08:52.181490 check[23769]: [ 5] read_file: 1 items read from /root/.razor/servers.discovery.lst
May 24 14:08:52.181957 check[23769]: [ 5] read_file: 2 items read from /root/.razor/servers.nomination.lst
May 24 14:08:52.182317 check[23769]: [ 5] read_file: 1 items read from /root/.razor/servers.catalogue.lst
May 24 14:08:52.182866 check[23769]: [ 9] Assigning defaults to joy.cloudmark.com
May 24 14:08:52.183158 check[23769]: [ 9] Assigning defaults to folly.cloudmark.com
May 24 14:08:52.183370 check[23769]: [ 9] Assigning defaults to shock.cloudmark.com
May 24 14:08:52.184241 check[23769]: [ 5] read_file: 15 items read from /root/.razor/server.shock.cloudmark.com.conf
May 24 14:08:52.184919 check[23769]: [ 5] read_file: 15 items read from /root/.razor/server.shock.cloudmark.com.conf
May 24 14:08:52.185250 check[23769]: [ 5] 76628 seconds before closest server discovery
May 24 14:08:52.185520 check[23769]: [ 6] shock.cloudmark.com is a Catalogue Server srl 5081; computed min_cf=6, Server se: C8
May 24 14:08:52.185801 check[23769]: [ 8] Computed supported_engines: 4 8
May 24 14:08:52.186042 check[23769]: [ 8] Using next closest server shock.cloudmark.com:2703, cached info srl 5081
May 24 14:08:52.186294 check[23769]: [ 8] mail 1 has no subject
May 24 14:08:52.186785 check[23769]: [ 6] preproc: mail 1.0 went from 1376 bytes to 1339
May 24 14:08:52.187042 check[23769]: [ 6] computing sigs for mail 1.0, len 1339
May 24 14:08:52.188930 check[23769]: [ 6] Engine (8) didn't produce a signature for mail 1.0
May 24 14:08:52.189377 check[23769]: [ 6] skipping whitelist file (empty?): /root/.razor/razor-whitelist
May 24 14:08:52.189592 check[23769]: [ 5] Connecting to shock.cloudmark.com ...
May 24 14:08:52.495999 check[23769]: [ 8] Connection established
May 24 14:08:52.496358 check[23769]: [ 4] shock.cloudmark.com >> 36 server greeting: sn=C&srl=5081&a=l&a=cg&ep4=7542-10
May 24 14:08:52.496827 check[23769]: [ 4] shock.cloudmark.com << 25
May 24 14:08:52.496994 check[23769]: [ 6] cn=razor-agents&cv=2.61
May 24 14:08:52.497291 check[23769]: [ 6] shock.cloudmark.com is a Catalogue Server srl 5081; computed min_cf=6, Server se: C8
May 24 14:08:52.497676 check[23769]: [ 8] Computed supported_engines: 4 8
May 24 14:08:52.497938 check[23769]: [ 8] mail 1.0 e4 sig: xFaZIZUVHk90OQfARnenjx5BZTMA
May 24 14:08:52.498274 check[23769]: [ 5] mail 1.0 e8 got no sig
May 24 14:08:52.498510 check[23769]: [ 8] preparing 1 queries
May 24 14:08:52.498779 check[23769]: [ 8] sending 1 batches
May 24 14:08:52.498967 check[23769]: [ 4] shock.cloudmark.com << 52
May 24 14:08:52.499064 check[23769]: [ 6] a=c&e=4&ep4=7542-10&s=xFaZIZUVHk90OQfARnenjx5BZTMA
May 24 14:08:52.893031 check[23769]: [ 4] shock.cloudmark.com >> 5
May 24 14:08:52.893312 check[23769]: [ 6] response to sent.2
p=0
May 24 14:08:52.893825 check[23769]: [ 6] mail 1.0 e=4 sig=xFaZIZUVHk90OQfARnenjx5BZTMA: sig not found.
May 24 14:08:52.894018 check[23769]: [ 7] method 4: mail 1.0: no-contention part, spam=0
May 24 14:08:52.894116 check[23769]: [ 7] method 4: mail 1: all non-contention parts not spam, mail not spam
May 24 14:08:52.894211 check[23769]: [ 3] mail 1 is not known spam.
May 24 14:08:52.894448 check[23769]: [ 5] disconnecting from server shock.cloudmark.com
May 24 14:08:52.894686 check[23769]: [ 4] shock.cloudmark.com << 5
May 24 14:08:52.894784 check[23769]: [ 6] a=q
debug: Using results from Razor v2.61
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: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x9a4b934) implements 'check_tick'
debug: running raw-body-text per-line regexp tests; score so far=-2.623
debug: running full-text regexp tests; score so far=-2.623
debug: Razor2 is available
debug: Pyzor is available: /usr/bin/pyzor
debug: entering helper-app run mode
debug: setuid: helper proc 23770: ruid=0 euid=0
debug: Pyzor: got response: 66.250.40.33:24441 (200, 'OK') 0 0
debug: leaving helper-app run mode
debug: DCCifd is not available: no r/w dccifd socket found.
debug: DCC is available: /usr/bin/dccproc
debug: entering helper-app run mode
debug: setuid: helper proc 23771: ruid=0 euid=0
debug: DCC: got response: X-DCC-MC-Metrics: artemis.domain.com 1128; Body=15728 Fuz1=1793830 Fuz2=1792547
debug: leaving helper-app run mode
debug: DCC: Listed! BODY: 15728 of 999999 FUZ1: 1793830 of 999999 FUZ2: 1792547 of 999999
debug: Running tests for priority: 500
debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x9a4b934) implements 'check_post_dnsbl'
debug: running meta tests; score so far=-1.25
debug: running header regexp tests; score so far=0.32
debug: running body-text per-line regexp tests; score so far=0.32
debug: running uri tests; score so far=0.32
debug: running raw-body-text per-line regexp tests; score so far=0.32
debug: running full-text regexp tests; score so far=0.32
debug: Running tests for priority: 1000
debug: running meta tests; score so far=0.32
debug: running header regexp tests; score so far=0.32
debug: using "/root/.spamassassin" for user state dir
debug: lock: 23769 created /root/.spamassassin/auto-whitelist.lock.artemis.domain.com.23769
debug: lock: 23769 trying to get lock on /root/.spamassassin/auto-whitelist with 0 retries
debug: lock: 23769 link to /root/.spamassassin/auto-whitelist.lock: link ok
debug: Tie-ing to DB file R/W in /root/.spamassassin/auto-whitelist
debug: auto-whitelist (db-based): ignore@compiling.spamassassin.taint.org|ip=none scores 0/0
debug: AWL active, pre-score: 0.32, autolearn score: 0.32, mean: undef, IP: undef
debug: DB addr list: untie-ing and unlocking.
debug: DB addr list: file locked, breaking lock.
debug: unlock: 23769 unlink /root/.spamassassin/auto-whitelist.lock
debug: Post AWL score: 0.32
debug: running body-text per-line regexp tests; score so far=0.32
debug: running uri tests; score so far=0.32
debug: running raw-body-text per-line regexp tests; score so far=0.32
debug: running full-text regexp tests; score so far=0.32
debug: is spam? score=0.32 required=3.5
debug: tests=ALL_TRUSTED,DCC_CHECK,MISSING_DATE,MISSING_SUBJECT,NO_REAL_NAME
debug: subtests=__HAS_MSGID,__MSGID_OK_DIGITS,__MSGID_OK_HOST,__SANE_MSGID,__UNUSABLE_MSGID
lint: 1 issues detected. please rerun with debug enabled for more information.


Why can it not parse the above line in red? Below is a copy of one of the spam messages I got, now previously i could see what scores are being listed, unfortunately this is not showing this info, how would I enable this?

Received: from 218.79.124.135 (envelope-from <jan@tiggy.com>, uid 2020) with qmail-scanner-1.25st
(clamdscan: 0.84/890. spamassassin: 3.0.3. perlscan: 1.25st.
Clear:RC:0(218.79.124.135):SA:1(8.8/4.5):.
Processed in 3.65382 secs); 24 May 2005 13:20:57 -0000
X-Spam-Status: Yes, hits=8.8 required=4.5
X-Spam-Level: ++++++++
Received: from unknown (HELO tiggy.com) (218.79.124.135)
with SMTP; 24 May 2005 14:20:53 +0100
Message-ID: <33730D6E.4FE7F22@tiggy.com>
Date: Wed, 25 May 2005 00:21:06 -1100
Reply-To: "adelina allen" <jan@tiggy.com>
From: "adelina allen" <jan@tiggy.com>v
I know this is fairly long! but thanks to anyone for some help!
pepe
Forum User
Forum User
Posts: 16
Joined: Fri Sep 30, 2005 1:13 am

Any solutions?

Unread post by pepe »

Does anyone know how to solve the spamassassin's lint warning?

config: SpamAssassin failed to parse line, skipping: user_scores_sql_table userpref

The mySQL database: horde does exist and so does the table userpref
so why the error?
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

Is this on a PSA box? Id make sure that you can log into the horde database with the username and password defined in the local.cf first. It sounds to me like either the horde db doesnt exist (which could be bad, that means webmail probably isnt working) or that the username/password is wrong.
pepe
Forum User
Forum User
Posts: 16
Joined: Fri Sep 30, 2005 1:13 am

Unread post by pepe »

Yes, PSA 7.5.3 on RHEL3

Can login to the horde database fine with username/pass from the local.cf file

The original psa horde webmail is working, but also have your squirrelmail working with a few users using the "Spam Filter Configuration" as I see there are several rows of data in the userpref table.

SquirrelMail seems to be using the database fine, just can't figure out why spamassassin won't?
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

make sure that the sql username and password set in local.cf are the same as the one defined for squirrelmail. I'll bet theres a typo or something silly like that
pepe
Forum User
Forum User
Posts: 16
Joined: Fri Sep 30, 2005 1:13 am

Unread post by pepe »

Where can I find the username/pass used by squirrelmail?

I looked in /etc/squirrelmail/config.php and config_local.php files...
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

/etc/psa/.webmail.shadow or whatever its called.
pepe
Forum User
Forum User
Posts: 16
Joined: Fri Sep 30, 2005 1:13 am

Unread post by pepe »

Thanks for that location...

Found the file and the passwords are the same?

Now what?

When I look through the maillogs everything seems fine.
Whitelists are working.

When I run spamassassin -D --lint
I still get the error:
config: SpamAssassin failed to parse line, skipping: user_scores_sql_table userpref

Here's my local.cf
-----(start)-----
required_hits 7
user_scores_dsn DBI:mysql:horde:localhost
user_scores_sql_username horde
user_scores_sql_password thepassword
user_scores_sql_table userpref
report_safe 0
-----(end)-----
Can 'thepassword' be read from the /etc/psa/.webmail.shadow file
or some environmental variable?
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

I wonder if maybe they changed the SQL structure or the token name in 3.1.0.
Post Reply