LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-19-2005, 09:44 AM   #1
jrafalek
LQ Newbie
 
Registered: Dec 2004
Posts: 20

Rep: Reputation: 0
problem with mailscanner & spamassassin


Hi.
I use FreeBSD 5.1 with postfix (virtual users), mailscanner and clamav.
Now I want to install and configure spamassassin with it but it doesn't work correctly
because when I type tail -f /var/log/maillog I see something like this:

Mar 19 16:09:11 78-tor-7 MailScanner[32353]: Enabling SpamAssassin auto-whitelist functionality...
Mar 19 16:09:20 78-tor-7 MailScanner[32353]: Using locktype = flock
Mar 19 16:09:20 78-tor-7 MailScanner[32353]: New Batch: Scanning 1 messages, 485 bytes
Mar 19 16:09:20 78-tor-7 MailScanner[32353]: Spam Checks: Starting
Mar 19 16:09:22 78-tor-7 MailScanner[32355]: MailScanner E-Mail Virus Scanner version 4.29.7 starting...
Mar 19 16:09:22 78-tor-7 MailScanner[32355]: Using Custom Function file /usr/local/lib/MailScanner/MailScanner/CustomFunctions/MyExample.pm
Mar 19 16:09:27 78-tor-7 MailScanner[32355]: Enabling SpamAssassin auto-whitelist functionality...
Mar 19 16:09:37 78-tor-7 MailScanner[32355]: Using locktype = flock
Mar 19 16:09:37 78-tor-7 MailScanner[32355]: New Batch: Scanning 1 messages, 485 bytes
Mar 19 16:09:37 78-tor-7 MailScanner[32355]: Spam Checks: Starting
Mar 19 16:09:38 78-tor-7 MailScanner[32357]: MailScanner E-Mail Virus Scanner version 4.29.7 starting...
Mar 19 16:09:39 78-tor-7 MailScanner[32357]: Using Custom Function file /usr/local/lib/MailScanner/MailScanner/CustomFunctions/MyExample.pm
Mar 19 16:09:44 78-tor-7 MailScanner[32357]: Enabling SpamAssassin auto-whitelist functionality...
Mar 19 16:09:53 78-tor-7 MailScanner[32357]: Using locktype = flock
Mar 19 16:09:53 78-tor-7 MailScanner[32357]: New Batch: Scanning 1 messages, 485 bytes
Mar 19 16:09:53 78-tor-7 MailScanner[32357]: Spam Checks: Starting
Mar 19 16:09:55 78-tor-7 MailScanner[32359]: MailScanner E-Mail Virus Scanner version 4.29.7 starting...
Mar 19 16:09:55 78-tor-7 MailScanner[32359]: Using Custom Function file /usr/local/lib/MailScanner/MailScanner/CustomFunctions/MyExample.pm
Mar 19 16:10:00 78-tor-7 MailScanner[32359]: Enabling SpamAssassin auto-whitelist functionality...
Mar 19 16:10:11 78-tor-7 MailScanner[32359]: Using locktype = flock
Mar 19 16:10:11 78-tor-7 MailScanner[32359]: New Batch: Scanning 1 messages, 485 bytes
Mar 19 16:10:11 78-tor-7 MailScanner[32359]: Spam Checks: Starting
Mar 19 16:10:12 78-tor-7 MailScanner[32365]: MailScanner E-Mail Virus Scanner version 4.29.7 starting...
Mar 19 16:10:12 78-tor-7 MailScanner[32365]: Using Custom Function file /usr/local/lib/MailScanner/MailScanner/CustomFunctions/MyExample.pm

and my mails isn't delivery. That is my spam.assassin.prefs.conf :

rewrite_subject 1
report_safe 0
use_terse_report 0
use_bayes 1
auto_learn 1
skip_rbl_checks 0
use_razor2 0
use_DCC 1
use_pyzor 1
dcc_add_header 1
dns_available yes

user_scores_dsn DBI:mysql:spamassassin:localhost
user_scores_sql_username user
user_scores_sql_password pass****
user_scores_sql_table userpref

When I type 'spamassassin -D --lint' debug show my something like this:

debug: SpamAssassin version 3.0.2
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 '/sbin', keeping.
debug: PATH included '/bin', keeping.
debug: PATH included '/usr/sbin', keeping.
debug: PATH included '/usr/bin', keeping.
debug: PATH included '/usr/games', keeping.
debug: PATH included '/usr/local/sbin', keeping.
debug: PATH included '/usr/local/bin', keeping.
debug: PATH included '/usr/X11R6/bin', keeping.
debug: PATH included '/root/bin', which doesn't exist, dropping.
debug: Final PATH set to: /sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin
debug: diag: module installed: DBI, version 1.42
debug: diag: module installed: DB_File, version 1.75
debug: diag: module installed: Digest::SHA1, version 2.10
debug: diag: module installed: IO::Socket::UNIX, version 1.20
debug: diag: module installed: MIME::Base64, version 3.01
debug: diag: module installed: Net:NS, version 0.48
debug: diag: module not installed: Net::LDAP ('require' failed)
debug: diag: module not installed: Razor2::Client::Agent ('require' failed)
debug: diag: module installed: Storable, version 2.09
debug: diag: module installed: URI, version 1.30
debug: ignore: using a test message to lint rules
debug: using "/usr/local/etc/mail/spamassassin/init.pre" for site rules init.pre
debug: config: read file /usr/local/etc/mail/spamassassin/init.pre
debug: using "/usr/local/share/spamassassin" for default rules dir
debug: config: read file /usr/local/share/spamassassin/10_misc.cf
debug: config: read file /usr/local/share/spamassassin/20_anti_ratware.cf
debug: config: read file /usr/local/share/spamassassin/20_body_tests.cf
debug: config: read file /usr/local/share/spamassassin/20_compensate.cf
debug: config: read file /usr/local/share/spamassassin/20_dnsbl_tests.cf
debug: config: read file /usr/local/share/spamassassin/20_drugs.cf
debug: config: read file /usr/local/share/spamassassin/20_fake_helo_tests.cf
debug: config: read file /usr/local/share/spamassassin/20_head_tests.cf
debug: config: read file /usr/local/share/spamassassin/20_html_tests.cf
debug: config: read file /usr/local/share/spamassassin/20_meta_tests.cf
debug: config: read file /usr/local/share/spamassassin/20_phrases.cf
debug: config: read file /usr/local/share/spamassassin/20_porn.cf
debug: config: read file /usr/local/share/spamassassin/20_ratware.cf
debug: config: read file /usr/local/share/spamassassin/20_uri_tests.cf
debug: config: read file /usr/local/share/spamassassin/23_bayes.cf
debug: config: read file /usr/local/share/spamassassin/25_body_tests_es.cf
debug: config: read file /usr/local/share/spamassassin/25_hashcash.cf
debug: config: read file /usr/local/share/spamassassin/25_spf.cf
debug: config: read file /usr/local/share/spamassassin/25_uribl.cf
debug: config: read file /usr/local/share/spamassassin/30_text_de.cf
debug: config: read file /usr/local/share/spamassassin/30_text_fr.cf
debug: config: read file /usr/local/share/spamassassin/30_text_nl.cf
debug: config: read file /usr/local/share/spamassassin/30_text_pl.cf
debug: config: read file /usr/local/share/spamassassin/50_scores.cf
debug: config: read file /usr/local/share/spamassassin/60_whitelist.cf
debug: using "/usr/local/etc/mail/spamassassin" for site rules dir
debug: config: read file /usr/local/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::RelayCountry from @INC
debug: plugin: registered Mail::SpamAssassin::Plugin::RelayCountry=HASH(0x8a719c8)
debug: plugin: loading Mail::SpamAssassin::Plugin::URIDNSBL from @INC
debug: plugin: registered Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x847cfb4)
debug: plugin: loading Mail::SpamAssassin::Plugin::Hashcash from @INC
debug: plugin: registered Mail::SpamAssassin::Plugin::Hashcash=HASH(0x8aae198)
debug: plugin: loading Mail::SpamAssassin::Plugin::SPF from @INC
debug: plugin: registered Mail::SpamAssassin::Plugin::SPF=HASH(0x8a84464)
debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x847cfb4) implements 'parse_config'
debug: plugin: Mail::SpamAssassin::Plugin::Hashcash=HASH(0x8aae198) implements 'parse_config'
config: SpamAssassin failed to parse line, skipping: rewrite_subject 1
config: SpamAssassin failed to parse line, skipping: use_terse_report 0
config: SpamAssassin failed to parse line, skipping: auto_learn 1
config: SpamAssassin failed to parse line, skipping: dcc_add_header 1
config: SpamAssassin failed to parse line, skipping: user_scores_sql_table userpref
debug: using "/root/.spamassassin" for user state dir
debug: bayes: no dbs present, cannot tie DB R/O: /root/.spamassassin/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: /root/.spamassassin/bayes_toks
debug: metadata: X-Spam-Relays-Trusted:
debug: metadata: X-Spam-Relays-Untrusted:
debug: plugin: Mail::SpamAssassin::Plugin::RelayCountry=HASH(0x8a719c8) implements 'extract_metadata'
debug: failed to load 'IP::Country::Fast', skipping
debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x847cfb4) implements 'parsed_metadata'
debug: dns_available set to yes in config file, skipping test
debug: decoding: no encoding detected
debug: URIDNSBL: domains to query:
debug: is Net:NS::Resolver available? yes
debug: Net:NS version: 0.48
debug: all '*From' addrs: ignore@compiling.spamassassin.taint.org
debug: Running tests for priority: 0
debug: running header regexp tests; score so far=0
debug: registering glue method for check_for_spf_pass (Mail::SpamAssassin::Plugin::SPF=HASH(0x8a84464))
debug: SPF: message was delivered entirely via trusted relays, not required
debug: all '*To' addrs:
debug: registering glue method for check_hashcash_value (Mail::SpamAssassin::Plugin::Hashcash=HASH(0x8aae198))
debug: registering glue method for check_for_spf_helo_fail (Mail::SpamAssassin::Plugin::SPF=HASH(0x8a84464))
debug: SPF: message was delivered entirely via trusted relays, not required
debug: registering glue method for check_for_spf_helo_pass (Mail::SpamAssassin::Plugin::SPF=HASH(0x8a84464))
debug: registering glue method for check_hashcash_double_spend (Mail::SpamAssassin::Plugin::Hashcash=HASH(0x8aae198))
debug: registering glue method for check_for_spf_softfail (Mail::SpamAssassin::Plugin::SPF=HASH(0x8a84464))
debug: registering glue method for check_for_spf_helo_softfail (Mail::SpamAssassin::Plugin::SPF=HASH(0x8a84464))
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(0x847cfb4))
debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x847cfb4) 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: DCCifd is not available: no r/w dccifd socket found.
debug: Current PATH is: /sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin
debug: executable for dccproc was found at /usr/local/bin/dccproc
debug: DCC is available: /usr/local/bin/dccproc
debug: entering helper-app run mode
debug: setuid: helper proc 32483: ruid=0 euid=0
debug: DCC: got response: X-DCC-NIET-Metrics: myhostname.pl 1080; Body=12177 Fuz1=908179 Fuz2=908173
debug: leaving helper-app run mode
debug: executable for pyzor was found at /usr/local/bin/pyzor
debug: Pyzor is available: /usr/local/bin/pyzor
debug: entering helper-app run mode
debug: setuid: helper proc 32484: ruid=0 euid=0
debug: Pyzor: got response: 66.250.40.33:24441 (200, 'OK') 0 0
debug: leaving helper-app run mode
debug: Running tests for priority: 500
debug: RBL: success for 1 of 1 queries
debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x847cfb4) implements 'check_post_dnsbl'
debug: running meta tests; score so far=-2.623
debug: running header regexp tests; score so far=-1.053
debug: running body-text per-line regexp tests; score so far=-1.053
debug: running uri tests; score so far=-1.053
debug: running raw-body-text per-line regexp tests; score so far=-1.053
debug: running full-text regexp tests; score so far=-1.053
debug: Running tests for priority: 1000
debug: running meta tests; score so far=-1.053
debug: running header regexp tests; score so far=-1.053
debug: using "/root/.spamassassin" for user state dir
debug: lock: 32482 created /root/.spamassassin/auto-whitelist.lock.myhostname.pl.32482
debug: lock: 32482 trying to get lock on /root/.spamassassin/auto-whitelist with 0 retries
debug: lock: 32482 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: -1.053, autolearn score: -1.053, mean: undef, IP: undef
debug: DB addr list: untie-ing and unlocking.
debug: DB addr list: file locked, breaking lock.
debug: unlock: 32482 unlink /root/.spamassassin/auto-whitelist.lock
debug: Post AWL score: -1.053
debug: running body-text per-line regexp tests; score so far=-1.053
debug: running uri tests; score so far=-1.053
debug: running raw-body-text per-line regexp tests; score so far=-1.053
debug: running full-text regexp tests; score so far=-1.053
debug: is spam? score=-1.053 required=5
debug: tests=ALL_TRUSTED,MISSING_DATE,MISSING_SUBJECT,NO_REAL_NAME
debug: subtests=__HAS_MSGID,__MSGID_OK_DIGITS,__MSGID_OK_HOST,__SANE_MSGID,__UNUSABLE_MSGID
lint: 5 issues detected. please rerun with debug enabled for more information.

Could somebody help me run spamassassin?
 
Old 03-27-2005, 03:51 AM   #2
jrafalek
LQ Newbie
 
Registered: Dec 2004
Posts: 20

Original Poster
Rep: Reputation: 0
Unhappy

So if nobody know how it run - even I :-( so maybe somebody helps me build my own spam filter.
I want to check header and body (per user ) but expressions must in mysql.

When I set header_check mysql:/path/to/file/mysql_check_header.cf in main.cf
and mysql_check_header.cf :
hostname=xxxxxx
username=xxxxx
password=xxxxxx
table=header
select_field=wyraz
where_field=username
additional_conditions = and active='1'
-------------------------
mysql> select * from wyraz;

+----+---------------------------------------------+----------------------+-----------+
| id | wyraz | username | active |
| 1 | /^From:.*edu.pl.*/ REJECT 550:Spam | xxxxxxx@xxxx.pl | 1 |
| 2 | /^Received:/ HOLD | * | 1 |
+-----+---------------------------------------------+----------------------+-----------+


when I send mail postfix ignore it - mail is not hold but is delivered to mailbox.
What to do ??
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mailscanner & mysql jrafalek Linux - Security 1 02-08-2005 10:47 PM
i need a mailscanner or spamassassin conf files gigi Linux - Software 1 02-01-2005 08:01 AM
Fedora & Postfix & SpamAssassin bigdogg Linux - Software 20 09-16-2004 03:08 PM
Mailscanner & sendmail in RH9.0 teanine Linux - Software 0 06-03-2004 02:10 AM
MailScanner and Spamassassin Question? gsmonk Linux - Software 4 01-06-2004 01:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration