HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   The Perfect SpamSnake 10.10 (http://www.howtoforge.com/forums/showthread.php?t=52363)

luigi 19th April 2011 11:03

The Perfect SpamSnake 10.10
 
Hi everyone
I need your help for some problems with baruwa
I do not know where it comes from
I put some screen, and I hope you understand the problem

First I have No records returned in the section messages or lists
http://img813.imageshack.us/i/baruwa...he50mostr.jpg/

And when I click on System status I have this. The status is in red and i haven't MTA processe
http://img853.imageshack.us/i/prtscrcapturen.jpg/

I put a other screen, this is my mail.log
http://img850.imageshack.us/img850/7374/logmail.jpg

Uploaded with ImageShack.us

If you want a example of another file said me

An other question in the tutorial :
vi /usr/share/pyshared/baruwa/settings.py
Change the Quarantine hosturl to your liking:
QUARANTINE_REPORT_HOSTURL = 'http://baruwa-alpha.local'

I need to change http://baruwa-alpha.local by what? My server @ip ?

Thx for your help :)
Best Regards !

Rocky 19th April 2011 15:33

Hey,

Make sure your .pm files in /opt/MailScanner/lib/MailScanner/CustomFunctions has the proper user/password/database information.

Make sure you have the following set in /opt/MailScanner/etc/MailScanner.conf

HTML Code:

MTA = postfix
Always Looked Up Last = &BaruwaSQL
Is Definitely Not Spam = &BaruwaWhitelist
Is Definitely Spam = &BaruwaBlacklist
Required SpamAssassin Score = &BaruwaLowScore
High SpamAssassin Score = &BaruwaHighScore

The URL should be the dns name of your spamsnake.

luigi 19th April 2011 16:08

Hi Rocky !
Thank you for reply so quickly.

in /opt/MailScanner/etc/MailScanner.conf
some example of my configuration of MailScanner.conf
HTML Code:

# **** RULE: It must not contain any spaces! ****
%org-name% =castellanus-com

%org-long-name% = filter.castellanu.com
%web-site% = www.castellanus.com

Run As User = postfix
Run As Group =  www-data

MTA = postfix

Incoming Work User =
Incoming Work Group = clamav

Quarantine User = root
Quarantine Group = www-data

Always Looked Up Last = &BaruwaSQL
Is Definitely Not Spam = &BaruwaWhitelist
Is Definitely Spam = &BaruwaBlacklist
Required SpamAssassin Score = &BaruwaLowScore.
High SpamAssassin Score = &BaruwaHighScore

In my .pm files in /opt/MailScanner/lib/MailScanner/CustomFunctions I have this :
HTML Code:

my ($db_name) = 'baruwa';
my ($db_host) = 'localhost';
my ($db_user) = 'baruwa';
my ($db_pass) = 'password';

And when I trying to connect with the user baruwa on the mysql , all it's ok

So the URL should be http://filter.castellanus.com ?
Because for the baruwa's graphique interface, I have a acess only with @ip (http://192.168.131.251) not by http://filter.castellanus.com

Thxs ;)

Rocky 19th April 2011 16:23

Hey,

Looks good so far.

Just one prob:
%org-name% =castellanus-com <--incorrect
%org-name% = castellanus <--correct and can be castellanus if you like.

You can use the ip for the url.

luigi 19th April 2011 18:49

Hey,

I made the changes but it didn't work
I restart MaiScanner, even reboot my server but I still have the status red

If you have an idea where the problem might be?

Why baruwa don't find the MTA ?

in the file /etc/postfix/main.cf I have this :
HTML Code:

myhostname = filter.castellanus.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = castellanus.com
mydestination =
relayhost =
mynetworks = 127.0.0.0/8, 192.168.131.0/24


Rocky 19th April 2011 19:26

I'm not sure why it's not giving a status. Are you using an FQDN for the setup?

Is MailScanner delivering mails?

luigi 20th April 2011 11:02

Yes I using an FQDN for the setup

/etc/nginx/sites-available/baruwa.conf
HTML Code:

server {
      listen 80;
      server_name filter.castellanus.com;
      [...]

when i rying to send a email i have this
HTML Code:

Apr 20 09:28:03 filter postfix/smtpd[8961]: connect from filter.castellanus.com[192.168.131.251]
Apr 20 09:28:53 filter postfix/smtpd[8961]: 737FA1680EBD: client=filter.castellanus.com[192.168.131.251]
Apr 20 09:29:04 filter postfix/cleanup[8964]: 737FA1680EBD: hold: header Received: from filter (filter.castellanus.com [192.168.131.251])??by filter.castellanus.com (Postfix) with ESMTP id 737FA1680EBD??for <louis@interhyve.com>; Wed, 20 Apr 2011 09:28:33 +0200 (CEST) from filter.castellanus.com[192.168.131.251]; from=<louis@interhyve.com> to=<louis@interhyve.com> proto=ESMTP helo=<filter>
Apr 20 09:29:04 filter postfix/cleanup[8964]: 737FA1680EBD: message-id=<20110420072853.737FA1680EBD@filter.castellanus.com>
Apr 20 09:29:09 filter MailScanner[5585]: New Batch: Scanning 1 messages, 1049 bytes
Apr 20 09:29:09 filter MailScanner[5585]: Virus and Content Scanning: Starting
Apr 20 09:29:09 filter MailScanner[8968]: MailScanner E-Mail Virus Scanner version 4.81.4 starting...
Apr 20 09:29:09 filter MailScanner[8968]: Reading configuration file /opt/MailScanner/etc/MailScanner.conf
Apr 20 09:29:09 filter MailScanner[8968]: Reading configuration file /opt/MailScanner/etc/conf.d/README
Apr 20 09:29:09 filter MailScanner[8968]: Read 867 hostnames from the phishing whitelist
Apr 20 09:29:09 filter MailScanner[8968]: Read 5605 hostnames from the phishing blacklists
Apr 20 09:29:09 filter MailScanner[8968]: Config: calling custom init function BaruwaLowScore
Apr 20 09:29:09 filter MailScanner[8968]: Config: calling custom init function BaruwaBlacklist
Apr 20 09:29:09 filter MailScanner[8968]: Config: calling custom init function BaruwaSQL
Apr 20 09:29:09 filter MailScanner[8968]: Config: calling custom init function BaruwaHighScore
Apr 20 09:29:09 filter MailScanner[8968]: Config: calling custom init function BaruwaWhitelist
Apr 20 09:29:09 filter MailScanner[8968]: Using SpamAssassin results cache
Apr 20 09:29:09 filter MailScanner[8968]: Connected to SpamAssassin cache database
Apr 20 09:29:09 filter MailScanner[8968]: Enabling SpamAssassin auto-whitelist functionality...
Apr 20 09:29:12 filter postfix/smtpd[8961]: disconnect from filter.castellanus.com[192.168.131.251]
Apr 20 09:29:16 filter MailScanner[8968]: Connected to Processing Attempts Database
Apr 20 09:29:16 filter MailScanner[8968]: Found 1 messages in the Processing Attempts Database
Apr 20 09:29:16 filter MailScanner[8968]: Using locktype = flock
Apr 20 09:31:21 filter MailScanner[5503]: Making attempt 2 at processing message 737FA1680EBD.A363A
Apr 20 09:31:21 filter MailScanner[5503]: New Batch: Scanning 1 messages, 1049 bytes
Apr 20 09:31:21 filter MailScanner[5503]: Virus and Content Scanning: Starting
Apr 20 09:31:21 filter MailScanner[8978]: MailScanner E-Mail Virus Scanner version 4.81.4 starting...
Apr 20 09:31:21 filter MailScanner[8978]: Reading configuration file /opt/MailScanner/etc/MailScanner.conf
Apr 20 09:31:21 filter MailScanner[8978]: Reading configuration file /opt/MailScanner/etc/conf.d/README
Apr 20 09:31:21 filter MailScanner[8978]: Read 867 hostnames from the phishing whitelist
Apr 20 09:31:21 filter MailScanner[8978]: Read 5605 hostnames from the phishing blacklists
Apr 20 09:31:21 filter MailScanner[8978]: Config: calling custom init function BaruwaLowScore
Apr 20 09:31:21 filter MailScanner[8978]: Config: calling custom init function BaruwaBlacklist
Apr 20 09:31:21 filter MailScanner[8978]: Config: calling custom init function BaruwaSQL
Apr 20 09:31:21 filter MailScanner[8978]: Config: calling custom init function BaruwaHighScore
Apr 20 09:31:21 filter MailScanner[8978]: Config: calling custom init function BaruwaWhitelist
Apr 20 09:31:21 filter MailScanner[8978]: Using SpamAssassin results cache
Apr 20 09:31:21 filter MailScanner[8978]: Connected to SpamAssassin cache database
Apr 20 09:31:21 filter MailScanner[8978]: Enabling SpamAssassin auto-whitelist functionality...
Apr 20 09:31:25 filter MailScanner[8978]: Connected to Processing Attempts Database
Apr 20 09:31:25 filter MailScanner[8978]: Found 1 messages in the Processing Attempts Database
Apr 20 09:31:25 filter MailScanner[8978]: Using locktype = flock

I trying to send a email like that :
HTML Code:

root@filter:/home/wako# telnet 192.168.131.251 25
Trying 192.168.131.251...
Connected to 192.168.131.251.
Escape character is '^]'.
220 ESMTP SpamSnake
ehlo filter
250-filter.castellanus.com
250-PIPELINING
250-SIZE 10485760
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from: louis@interhyve.com
250 2.1.0 Ok
rcpt to: louis@interhyve.com
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
test
.
250 2.0.0 Ok: queued as 582361680F19

I have another question, in the tutorial page 2 section 6 when you say " Note: For this step, make sure to replace anything@example.com, example.com and @example.com with real values that matches your setup. "
which file are you talking about ?

Rocky 20th April 2011 15:36

Hey,

Have you logged into Baruwa as admin and setup the proper relay/transport for your domain?

Also, the file in question is the postfix.sh file. This inputs the values into main.cf.

luigi 20th April 2011 15:55

Yes I logged in baruwa as admin
in which file I can setup the relay / transport ?

Rocky 20th April 2011 16:52

Please look at page3, under section 9. There's a section called Setup Instructions for Baruwa. Follow that and you should be ok.


All times are GMT +2. The time now is 19:57.

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