Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 17th August 2006, 12:30
ColdDoT ColdDoT is offline
Senior Member
 
Join Date: Jan 2006
Location: Netherland
Posts: 178
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ColdDoT
Default SpamAssassin config ?

@SOLVED
after trying retrying i have it working per domain based filtering
~maildrop

and this site some config files
http://gentoo-wiki.com/HOWTO_Email_V...d_Spam_Assasin

@@Original
After some sleepless evening i have spamassassin to work.

but i got a problem it marks almost every mail as spam

this a e-mail that was marked as spam
Code:
Return-Path: <webmaster@colddot.nl>
X-Original-To: webmaster@colddot.nl
Delivered-To: webmaster@colddot.nl
Received: from localhost (localhost.localdomain [127.0.0.1])
        by colddot.nl (Postfix) with ESMTP id C46D96A8C05
        for <webmaster@colddot.nl>; Thu, 17 Aug 2006 12:23:39 +0200 (CEST)
X-Quarantine-ID: <sDQCM-75747Z>
X-Virus-Scanned: by amavisd-new-2.4.2 (20060627) (Debian) at colddot.nl
X-Spam-Flag: YES
X-Spam-Score: 5.585
X-Spam-Level: *****
X-Spam-Status: Yes, score=5.585 tagged_above=3 required=4 tests=[AWL=1.602,
        HELO_EQ_NO_DOT=0.843, HOST_EQ_DSL=0.49, HOST_EQ_NL=1.545,
        MSGID_FROM_MTA_ID=0.927, NO_REAL_NAME=0.178]
Received: from colddot.nl ([127.0.0.1])
        by localhost (colddot.nl [127.0.0.1]) (amavisd-new, port 10024)
        with ESMTP id sDQCM-75747Z for <webmaster@colddot.nl>;
        Thu, 17 Aug 2006 12:23:34 +0200 (CEST)
Received: from OWNER (nm-dkbg-131a0.adsl.wanadoo.nl [81.69.79.160])
        by colddot.nl (Postfix) with ESMTP id 6D58F6A8C04
        for <webmaster@colddot.nl>; Thu, 17 Aug 2006 12:23:34 +0200 (CEST)
From: webmaster@colddot.nl
To: webmaster@colddot.nl
Subject: ***SPAM*** webmaster@colddot.nl
Date: Thu, 17 Aug 2006 12:23:40 +0200
X-Mailer: POP Peeper (2.4.3.0)
Message-Id: <20060817102334.6D58F6A8C04@colddot.nl>


webmaster@colddot.nl
and this is my config file (/etc/spamassassin/local.cf)
Code:
#SpamAssassin
required_score          10.0
required_hits           10.0
rewrite_header subject  *****SPAM*****
report_safe             1

#bayes
use_bayes               1
use_bayes_rules         1
bayes_auto_learn        1

#RBL
skip_rbl_checks         0

#Razor2
use_razor2              1
razor_config            /etc/razor/razor-agent.conf

#DCC
use_dcc                 1
dcc_path                /usr/bin/dccproc

#Pyzor
use_pyzor               1
pyzor_path              /usr/bin/pyzor

#languages
ok_languages            all
ok_locales              all
i noticed that i can't change the
score=5.585 tagged_above=3 required=4

even if i set
required_score 10.0
required_hits 10.0

so whats the problem you guys think?

i'm running
~debian sarge
~postfix
~amavisd-new
~SpamAssassin

btw if i run
spamassassin --lint
it is error free

Greets ColdDoT
__________________
2B or not 2B (a pro)

Last edited by ColdDoT; 20th August 2006 at 19:45.
Reply With Quote
Sponsored Links
  #2  
Old 17th August 2006, 13:55
ColdDoT ColdDoT is offline
Senior Member
 
Join Date: Jan 2006
Location: Netherland
Posts: 178
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ColdDoT
Default

i have my virtual mail map to /home/vmail/domain
can i set a file in to /home/vmail/domain that will be readed so i can specefik there my rule for that domain.

else is there a file that readed in /home/vmail/
in php i will do something like this
Code:
$dom = explode("@",$to);
$dom = end($dom);
switch ($dom) {
   case "colddot.nl":
       rules: /etc/spamassassin/filters/colddot.nl
       break;
   case "entertainmentsupport.nl":
       rules: /etc/spamassassin/filters/entertainmentsupport.nl
       break;
   case "zoomatyou.nl":
       rules: /etc/spamassassin/filters/zoomatyou.nl
       break;
}
and in colddot.nl file is something like this
Code:
body COLDDOT_RULE1        /fuck colddot/
score COLDDOT_RULE1       999.0
is this possible with spamassassin (or in my current config)
~debian~
~amavid
~postfix
~spamassassin
~dcc
~razer
~pyzor

thx in advanced
__________________
2B or not 2B (a pro)

Last edited by ColdDoT; 17th August 2006 at 15:18.
Reply With Quote
  #3  
Old 17th August 2006, 15:35
nuanda nuanda is offline
Junior Member
 
Join Date: Aug 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you use amavisd-new you need to edit them in /etc/amavisd.conf:

$sa_tag_level_deflt = -100;
$sa_tag2_level_deflt = 6.31;
$sa_kill_level_deflt = $sa_tag2_level_deflt;
$sa_dsn_cutoff_level = 9;

Nuanda
Reply With Quote
  #4  
Old 17th August 2006, 15:38
ColdDoT ColdDoT is offline
Senior Member
 
Join Date: Jan 2006
Location: Netherland
Posts: 178
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ColdDoT
Default

Just before you posted i found that out
but is there a way to filter e-mails on domain
like
colddot.nl -> regexp:/var/filters/colddot.nl (colddot.nl conains like /owned/ REJECT)
zoomatyou -> pre:/var/filters/zoomatyou.nl (zoomayou.nl conains lol REJECT)

thx for respons
__________________
2B or not 2B (a pro)
Reply With Quote
  #5  
Old 18th August 2006, 14:23
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,744 Times in 2,577 Posts
Default

Quote:
Originally Posted by ColdDoT
but is there a way to filter e-mails on domain
like
colddot.nl -> regexp:/var/filters/colddot.nl (colddot.nl conains like /owned/ REJECT)
zoomatyou -> pre:/var/filters/zoomatyou.nl (zoomayou.nl conains lol REJECT)

thx for respons
Maybe this is possible with amavisd, but you can also do it with Postfix header_checks: http://www.postfix.org/header_checks.5.html
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #6  
Old 18th August 2006, 23:49
ColdDoT ColdDoT is offline
Senior Member
 
Join Date: Jan 2006
Location: Netherland
Posts: 178
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ColdDoT
Default

Dam after googling and reading sites i can't figure out howto do this.
my route now of my mail (or what i think it is doing)
Code:
                              ClamAV
postfix -> amavisd =                                    -> postfix
               Pyzor  <-  Spamassassin -> dcc
                                      \/
                                    Razor2
what i wanna do is to just set on a point a script that does like this
Code:
if mail_domain = blablabla.nl then
 regexp_body = /var/reg_b1
 regexp_subject = /var/reg_s1
else if mail_domain = ash.com then
 regexp_body = /var/reg_b2
 regexp_subject = /var/reg_s2
....etc...
after that the mail must put back into to delevery stream i wanna do this for customers to add there own rules

is there any way.
#falko
that content_filter is used by amavisd already and the examples that i found, aro not what i want srry/
__________________
2B or not 2B (a pro)
Reply With Quote
  #7  
Old 19th August 2006, 11:04
ColdDoT ColdDoT is offline
Senior Member
 
Join Date: Jan 2006
Location: Netherland
Posts: 178
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ColdDoT
Default

Can i do it with mysql i meen like this

header_checks = mysql:/etc/postfix/mysql-filter_header.cf
body_checks = mysql:/etc/postfix/mysql-filter_body.cf

so database will look like this
Code:
~~~~~~header db~~~~~~
----------------------------
    domain       |          file
---------------------------
colddot.nl        |regexp:/etc/postfix/filters/h_colddot.nl
---------------------------
zoomatyou.nl   |regexp:/etc/postfix/filters/h_colddot.nl
---------------------------
Code:
~~~~~~~body db~~~~~~
----------------------------
    domain       |          file
---------------------------
colddot.nl        |regexp:/etc/postfix/filters/b_colddot.nl
---------------------------
zoomatyou.nl   |regexp:/etc/postfix/filters/b_colddot.nl
---------------------------
but i don't know how the mysql-filter_*.cf will look like. so is this possible.
if so then does some 1 know how the mysql files look like.
__________________
2B or not 2B (a pro)

Last edited by ColdDoT; 19th August 2006 at 11:08.
Reply With Quote
  #8  
Old 19th August 2006, 14:41
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,744 Times in 2,577 Posts
Default

Quote:
Originally Posted by ColdDoT
Can i do it with mysql i meen like this

header_checks = mysql:/etc/postfix/mysql-filter_header.cf
body_checks = mysql:/etc/postfix/mysql-filter_body.cf
You can also do this with plain text files. Did you have a look here? http://www.postfix.org/header_checks.5.html
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 20th August 2006, 00:03
ColdDoT ColdDoT is offline
Senior Member
 
Join Date: Jan 2006
Location: Netherland
Posts: 178
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ColdDoT
Default

After googling trying i don't get it ok what i did

main.cf
Code:
header_checks = regexp:/etc/postfix/filter.cf
filter.cf
Code:
if /To:(.*?)@colddot.nl(.*?)/
/From:(.*?)/ REJECT Damn you $1
endif
and a lot of other trys but why isn't this working
http://64.233.183.104/search?q=cache...ient=firefox-a
scroll down, and you see like the same

what am i doing wrong?
__________________
2B or not 2B (a pro)
Reply With Quote
  #10  
Old 20th August 2006, 17:43
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,744 Times in 2,577 Posts
 
Default

Quote:
Originally Posted by ColdDoT
and a lot of other trys but why isn't this working
http://64.233.183.104/search?q=cache...ient=firefox-a
scroll down, and you see like the same
That link isn't working. What's the exact problem?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
config spamassassin hotchilli Server Operation 1 8th July 2006 12:03
Postfix + Amavis + SpamAssassin + ClamAV michele HOWTO-Related Questions 4 1st July 2006 14:36
How to config spamassassin and clamAV in ISPconfig? tom Installation/Configuration 16 25th May 2006 05:24
Problem with the apache (I can't start ist) M.Behrens Installation/Configuration 11 31st March 2006 10:48
Config file templates till Developers' Forum 0 30th July 2005 23:10


All times are GMT +2. The time now is 22:54.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.