The Perfect SpamSnake - Ubuntu 8.04 LTS - test SpamAssassin with correct database

Discussion in 'HOWTO-Related Questions' started by denbert, Dec 25, 2008.

  1. denbert

    denbert New Member

    Hi again,

    Setting up this very interesting SpamSnake.

    In 9.13 Move the Bayesian Databases and set-up permissions (skip this if you don't use bayes)

    The howto suggest to test the SpamAssasin here:

    If you want then you can test SpamAssassin to make sure that it is using the new databases correctly:

    Code:
    spamassassin -D -p /etc/MailScanner/spam.assassin.prefs.conf --lint
    My output is VERY long, but I'm wondering about these lines:

    [24758] dbg: plugin: Mail::SpamAssassin::plugin:: DNSEval=HASH(0x98a59c8) implements 'check_start', priority 0
    [24758] dbg: bayes: no dbs present, cannot tie DB R/O: /etc/MailScanner/bayes/bayes_toks
    [24758] dbg: plugin: Mail::SpamAssassin::plugin::Check=HASH(0x969e848) implements 'check_main', priority 0
    [24758] dbg: conf: trusted_networks are not configured; it is recommended that you configure trusted_networks manually

    I might have missed some steps, here - anyone please!
     
  2. denbert

    denbert New Member

    Hmm,

    Just after the post, i continued with the howto...

    And the creation of the database is created in the next step - kind a stupid to test a database, which aren't created yet.

    After the creation, everything works great:

    Code:
    spamassassin -x -D -p /etc/MailScanner/spam.assassin.prefs.conf --lint
    Gives this:

    [24974] dbg: bayes: database connection established
    [24974] dbg: bayes: found bayes db version 3
    [24974] dbg: bayes: Using userid: 1
    [24974] dbg: bayes: not available for scanning, only 0 spam(s) in bayes DB < 200
    [24974] dbg: config: score set 0 chosen.
     
  3. denbert

    denbert New Member

    Ups, not everything..

    After final reboot and then checking of the mailscanner I'm getting this:

    Code:
    tail -f /var/log/mail.log
    Dec 25 19:40:01 gandalf postfix/pickup[28553]: fatal: scan_dir_push: open direct ory maildrop: Permission denied
    Dec 25 19:40:02 gandalf postfix/master[3405]: warning: process /usr/lib/postfix/ pickup pid 28553 exit status 1
    Dec 25 19:40:02 gandalf postfix/master[3405]: warning: /usr/lib/postfix/pickup: bad command startup -- throttling
    Dec 25 19:42:01 gandalf postfix/pickup[28631]: fatal: scan_dir_push: open direct ory maildrop: Permission denied
    Dec 25 19:42:02 gandalf postfix/master[3405]: warning: process /usr/lib/postfix/ pickup pid 28631 exit status 1
    Dec 25 19:42:02 gandalf postfix/master[3405]: warning: /usr/lib/postfix/pickup: bad command startup -- throttling
    Dec 25 19:44:01 gandalf postfix/pickup[28716]: fatal: scan_dir_push: open direct ory maildrop: Permission denied
    Dec 25 19:44:02 gandalf postfix/master[3405]: warning: process /usr/lib/postfix/ pickup pid 28716 exit status 1
    Dec 25 19:44:02 gandalf postfix/master[3405]: warning: /usr/lib/postfix/pickup: bad command startup -- throttling
    Dec 25 19:45:05 gandalf postfix/master[3405]: terminating on signal 15

    And looking at mailscanner webpage http://hostname/mailscanner gives me this:


    Warning: mysql_pconnect() [function.mysql-pconnect]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /var/www/mailscanner/functions.php on line 509
    Could not connect to database: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

    Anyone got an idea ?
     
    Last edited: Dec 25, 2008
  4. denbert

    denbert New Member

    Hmm,

    I must have destroyed something, after the reboot: MySql won't run:

    Code:
    /etc/init.d/mysql start
    * Starting MySQL database server mysqld [fail]
     
  5. falko

    falko Super Moderator Howtoforge Staff

    Are there any MySQL errors in the syslog?
     
  6. denbert

    denbert New Member

    Hmm,

    For some really strange reason, syslog don't work, I've just rebooted the system, but latest syslog is from yesterday?

    Here is the last lines from /var/log/syslog

    Dec 25 19:45:05 gandalf postfix/master[3405]: terminating on signal 15
    Dec 25 19:45:06 gandalf mysqld[11141]: 081225 19:45:06 [Note] /usr/sbin/mysqld: Normal shutdown
    Dec 25 19:45:06 gandalf mysqld[11141]:
    Dec 25 19:45:06 gandalf mysqld[11141]: 081225 19:45:06 InnoDB: Starting shutdown...
    Dec 25 19:45:07 gandalf mysqld[11141]: 081225 19:45:07 InnoDB: Shutdown completed; log sequence number 0 43655
    Dec 25 19:45:07 gandalf mysqld[11141]: 081225 19:45:07 [Note] /usr/sbin/mysqld: Shutdown complete
    Dec 25 19:45:07 gandalf mysqld[11141]:
    Dec 25 19:45:07 gandalf mysqld_safe[29236]: ended
    Dec 25 19:45:09 gandalf kernel: [214057.741309] ip6_tables: (C) 2000-2006 Netfilter Core Team
    Dec 25 19:45:09 gandalf named[10654]: shutting down: flushing changes
    Dec 25 19:45:09 gandalf named[10654]: stopping command channel on 127.0.0.1#953
    Dec 25 19:45:09 gandalf named[10654]: stopping command channel on ::1#953
    Dec 25 19:45:09 gandalf named[10654]: no longer listening on ::#53
    Dec 25 19:45:09 gandalf named[10654]: no longer listening on 127.0.0.1#53
    Dec 25 19:45:09 gandalf named[10654]: no longer listening on 192.168.0.6#53
    Dec 25 19:45:10 gandalf named[10654]: exiting
    Dec 25 19:45:10 gandalf exiting on signal 15


    Anyone please guide me in right direction
     
  7. denbert

    denbert New Member

    Anyone got an idea for an alternative kind of "SpamSnake" to use in front of an Exchange 2003 Server?

    I'll prefer a Debian or Ubuntu based system, AND less complicated setup.

    I only need a SMTP with a spamfilter and virus scanner.
     
  8. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    ls -la /var/log
    ?
     
  9. denbert

    denbert New Member

    Hi Falko,

    As I'm not skilled enough to setup the Perfect SpamSnake, I've desided to re-install the Ubuntu 8.04 LTS base system.

    I have already done that, when you posted the reply :(

    I'll investegate the next days for the right solution for me in order to protect my Exchange 2003 server, which more and more of my mail recipients are ignoring due to the fact that my mail i delivered to ISP webhotel and after this brought to users by the MS POP Connector.

    This causes problems, as many (especially German mail administrators) are checking for MX DNS, and therefore they return mails from my Exchange server, when it sends mails directly - I've tried to use the webhotel SMTP server, but they only accept mails based on user level, which cause problems when xx@mydomain are sending mails through yy@mydomains account.

    The webhotel don't have a SMTP service for this setup :(

    For this i need some kind of SpamSnake - I'm looking at this right now:

    https://help.ubuntu.com/community/PostfixAmavisNew
     
  10. ptduran

    ptduran New Member

    I still have the same problem and exploring the web to find a solution, frustrated..can anyone pls help me out ?
     

Share This Page