The Perfect SpamSnake - Ubuntu Jeos 10.10 Maverick Meerkat - Page 2

Discussion in 'HOWTO-Related Questions' started by padonker, Apr 19, 2011.

  1. padonker

    padonker New Member

    I am following the document and am confused by the following:

    In the section

    "SpamAssassin SQL Bayes", "Update header string:"

    is said

    "YOURDOMAIN-COM" should be replaced with whatever you used for "%org-name%" in the MailScanner.conf file. Leave the "X-" in place. This is the same orgname used in the MailScanner.conf above."

    Would this be the local hostname or the domains which should be accepted? And if the latter is true, should these rules be created for all mail domains?
    Finally, the orgname should be the same as used in MailScanner.conf above....but there is no MailScanner.conf above, or did I miss it?

    Thanks
    Patrick
     
  2. Rocky

    Rocky Member

    Hey,

    Sorry to confuse you, but since we were editing the spamassassin file, I just wanted to do all the edits before moving on.

    If you look in the next section, MailScanner Configuration, you'll see where the orgname gets defined. The orgname could be, in my case, MCRI. So my longorgname would be Meeting and Conference Rentals Intl.

    I hope this clears it up a bit.

    Rocky
     
  3. padonker

    padonker New Member

    Thanks, that helped ;)

    Next issue I ran into was that in step 9. Nginx with Uwsgi, there is a dependency missing:

    To cp /usr/share/doc/uwsgi-extra/nginx/uwsgi_params /etc/nginx/uwsgi_params one needs to install uwsgi-extra as well. Maybe it is in the howto, but I didnt see it.

    After setting up the Cron jobs mailscanner needs to be started and browsing to http://hostname_used should show a login screen.
    I see, on the other hand:

    uWSGI Error
    wsgi application not found


    What went wrong?
     
  4. Rocky

    Rocky Member

    Hey,

    Did you setup the baruwa.conf and baruwa.ini files properly?

    It's strange that you had to install extra as well. What version of uwsgi and nginx are you running?
     
  5. padonker

    padonker New Member

    Probably not ;)
    I've decided to restart the installation. Will let you know how that works out...
     
  6. Rocky

    Rocky Member

    Ok great. Please make sure to read carefully as you could miss things easily.

    Also, you are correct about extras, you'll have to install that as well.
     
  7. padonker

    padonker New Member

    Page 2, step 7

    wget http://http.us.debian.org/debian/pool/main/libt/libtool/libltdl3_1.5.26-4+lenny1__$(uname -m | sed -e 's/x86_64/amd64/' -e 's/i686/i386/').deb

    should be:

    wget http://http.us.debian.org/debian/pool/main/libt/libtool/libltdl3_1.5.26-4+lenny1_$(uname -m | sed -e 's/x86_64/amd64/' -e 's/i686/i386/').deb
     
    Last edited: Apr 20, 2011
  8. padonker

    padonker New Member

    Step MailScanner Startup Script:

    After starting the system, these errors are found in mail.log
    I have reread the howto a couple of times, but found nothing regarding these locations or access rights:

    Apr 20 16:22:22 spamsnake MailScanner[14747]: MailScanner E-Mail Virus Scanner version 4.81.4 starting...
    Apr 20 16:22:22 spamsnake MailScanner[14747]: Reading configuration file /opt/MailScanner/etc/MailScanner.conf
    Apr 20 16:22:22 spamsnake MailScanner[14747]: Reading configuration file /opt/MailScanner/etc/conf.d/README
    Apr 20 16:22:22 spamsnake MailScanner[14747]: Read 865 hostnames from the phishing whitelist
    Apr 20 16:22:22 spamsnake MailScanner[14747]: Read 5278 hostnames from the phishing blacklists
    Apr 20 16:22:22 spamsnake MailScanner[14747]: User's home directory /var/spool/postfix is not writable
    Apr 20 16:22:22 spamsnake MailScanner[14747]: You need to set the "SpamAssassin User State Dir" to a directory that the "Run As User" can write to
    Apr 20 16:22:22 spamsnake MailScanner[14747]: Using SpamAssassin results cache
    Apr 20 16:22:22 spamsnake MailScanner[14747]: Connected to SpamAssassin cache database
    Apr 20 16:22:22 spamsnake MailScanner[14747]: Enabling SpamAssassin auto-whitelist functionality...
    Apr 20 16:22:24 spamsnake MailScanner[14747]: Cannot read queue directory /var/spool/mqueue.in


    =================

    I've rebooted the sever, just in case, and emptied the mail.log to avoid confusion.
    These are the logged messages from a fresh boot:

    Apr 20 16:28:01 spamsnake dccifd[1237]: fopen(/var/run/dcc/dccifd.pid): No such file or directory
    Apr 20 16:28:01 spamsnake dccifd[1237]: 1.3.130 listening to /var/lib/dcc/dccifd for ASCII protocol
    Apr 20 16:28:04 spamsnake MailScanner[1275]: MailScanner E-Mail Virus Scanner version 4.81.4 starting...
    Apr 20 16:28:04 spamsnake MailScanner[1275]: Reading configuration file /opt/MailScanner/etc/MailScanner.conf
    Apr 20 16:28:04 spamsnake MailScanner[1275]: Reading configuration file /opt/MailScanner/etc/conf.d/README
    Apr 20 16:28:04 spamsnake MailScanner[1275]: Read 865 hostnames from the phishing whitelist
    Apr 20 16:28:05 spamsnake MailScanner[1275]: Read 5278 hostnames from the phishing blacklists
    Apr 20 16:28:05 spamsnake MailScanner[1275]: User's home directory /var/spool/postfix is not writable
    Apr 20 16:28:05 spamsnake MailScanner[1275]: You need to set the "SpamAssassin User State Dir" to a directory that the "Run As User" can write to
    Apr 20 16:28:05 spamsnake postfix/master[1359]: daemon started -- version 2.7.1, configuration /etc/postfix
    Apr 20 16:28:05 spamsnake MailScanner[1275]: Using SpamAssassin results cache
    Apr 20 16:28:05 spamsnake MailScanner[1275]: Connected to SpamAssassin cache database
    Apr 20 16:28:05 spamsnake MailScanner[1275]: Enabling SpamAssassin auto-whitelist functionality...
    Apr 20 16:28:08 spamsnake MailScanner[1275]: Cannot read queue directory /var/spool/mqueue.in
    Apr 20 16:28:09 spamsnake MailScanner[1401]: MailScanner E-Mail Virus Scanner version 4.81.4 starting...
    Apr 20 16:28:09 spamsnake MailScanner[1401]: Reading configuration file /opt/MailScanner/etc/MailScanner.conf
    Apr 20 16:28:09 spamsnake MailScanner[1401]: Reading configuration file /opt/MailScanner/etc/conf.d/README
    Apr 20 16:28:09 spamsnake MailScanner[1401]: Read 865 hostnames from the phishing whitelist
    Apr 20 16:28:09 spamsnake MailScanner[1401]: Read 5278 hostnames from the phishing blacklists
    Apr 20 16:28:09 spamsnake MailScanner[1401]: User's home directory /var/spool/postfix is not writable
    Apr 20 16:28:09 spamsnake MailScanner[1401]: You need to set the "SpamAssassin User State Dir" to a directory that the "Run As User" can write to
    Apr 20 16:28:10 spamsnake MailScanner[1401]: Using SpamAssassin results cache
    Apr 20 16:28:10 spamsnake MailScanner[1401]: Connected to SpamAssassin cache database
    Apr 20 16:28:10 spamsnake MailScanner[1401]: Enabling SpamAssassin auto-whitelist functionality...
    Apr 20 16:28:11 spamsnake MailScanner[1401]: Cannot read queue directory /var/spool/mqueue.in
    Apr 20 16:28:14 spamsnake MailScanner[1405]: MailScanner E-Mail Virus Scanner version 4.81.4 starting...
    Apr 20 16:28:14 spamsnake MailScanner[1405]: Reading configuration file /opt/MailScanner/etc/MailScanner.conf
    Apr 20 16:28:14 spamsnake MailScanner[1405]: Reading configuration file /opt/MailScanner/etc/conf.d/README
    Apr 20 16:28:14 spamsnake MailScanner[1405]: Read 865 hostnames from the phishing whitelist
    Apr 20 16:28:14 spamsnake MailScanner[1405]: Read 5278 hostnames from the phishing blacklists
    Apr 20 16:28:14 spamsnake MailScanner[1405]: User's home directory /var/spool/postfix is not writable
    Apr 20 16:28:14 spamsnake MailScanner[1405]: You need to set the "SpamAssassin User State Dir" to a directory that the "Run As User" can write to
    Apr 20 16:28:15 spamsnake MailScanner[1405]: Using SpamAssassin results cache
    Apr 20 16:28:15 spamsnake MailScanner[1405]: Connected to SpamAssassin cache database
    Apr 20 16:28:15 spamsnake MailScanner[1405]: Enabling SpamAssassin auto-whitelist functionality...
    Apr 20 16:28:17 spamsnake MailScanner[1405]: Cannot read queue directory /var/spool/mqueue.in
    Apr 20 16:28:19 spamsnake MailScanner[1413]: MailScanner E-Mail Virus Scanner version 4.81.4 starting...
    Apr 20 16:28:19 spamsnake MailScanner[1413]: Reading configuration file /opt/MailScanner/etc/MailScanner.conf
    Apr 20 16:28:19 spamsnake MailScanner[1413]: Reading configuration file /opt/MailScanner/etc/conf.d/README
    Apr 20 16:28:20 spamsnake MailScanner[1413]: Read 865 hostnames from the phishing whitelist
    Apr 20 16:28:20 spamsnake MailScanner[1413]: Read 5278 hostnames from the phishing blacklists
    Apr 20 16:28:20 spamsnake MailScanner[1413]: User's home directory /var/spool/postfix is not writable
    Apr 20 16:28:20 spamsnake MailScanner[1413]: You need to set the "SpamAssassin User State Dir" to a directory that the "Run As User" can write to
    Apr 20 16:28:20 spamsnake MailScanner[1413]: Using SpamAssassin results cache
    Apr 20 16:28:20 spamsnake MailScanner[1413]: Connected to SpamAssassin cache database
    Apr 20 16:28:20 spamsnake MailScanner[1413]: Enabling SpamAssassin auto-whitelist functionality...
    Apr 20 16:28:22 spamsnake MailScanner[1413]: Cannot read queue directory /var/spool/mqueue.in
    Apr 20 16:28:24 spamsnake MailScanner[1447]: MailScanner E-Mail Virus Scanner version 4.81.4 starting...
    Apr 20 16:28:24 spamsnake MailScanner[1447]: Reading configuration file /opt/MailScanner/etc/MailScanner.conf
    Apr 20 16:28:24 spamsnake MailScanner[1447]: Reading configuration file /opt/MailScanner/etc/conf.d/README
    Apr 20 16:28:24 spamsnake MailScanner[1447]: Read 865 hostnames from the phishing whitelist
    Apr 20 16:28:24 spamsnake MailScanner[1447]: Read 5278 hostnames from the phishing blacklists
    Apr 20 16:28:24 spamsnake MailScanner[1447]: User's home directory /var/spool/postfix is not writable
    Apr 20 16:28:24 spamsnake MailScanner[1447]: You need to set the "SpamAssassin User State Dir" to a directory that the "Run As User" can write to
    Apr 20 16:28:25 spamsnake MailScanner[1447]: Using SpamAssassin results cache
    Apr 20 16:28:25 spamsnake MailScanner[1447]: Connected to SpamAssassin cache database
    Apr 20 16:28:25 spamsnake MailScanner[1447]: Enabling SpamAssassin auto-whitelist functionality...
    Apr 20 16:28:26 spamsnake MailScanner[1447]: Cannot read queue directory /var/spool/mqueue.in
     
    Last edited: Apr 20, 2011
  9. Rocky

    Rocky Member

    Did you use the mailscanner.sh file in section 7 to setup the MailScanner.conf file?
     
  10. padonker

    padonker New Member

    Of course, I am way too stupid to figure this out on my own :D
     
  11. Rocky

    Rocky Member

    Hmm, it seems as though some of the values were not correctly changed in MailScanner.conf.

    You can manually open the conf file and verify all the settings as per the script mailscanner.sh:
    vi /opt/MailScanner/etc/MailScanner.conf
     
  12. padonker

    padonker New Member

    Like I said...stupid. Made the mailscanner.sh but never ran it ;)
    However, after running the script and starting mailscanner I got these errors:

    /etc/init.d/mailscanner start
    Can't call method "close" on an undefined value at /opt/MailScanner/bin/mailscanner_create_locks line 47.
    Error: Attempt to create locks in /var/spool/MailScanner/incoming/Locks failed!
    Can't call method "close" on an undefined value at /opt/MailScanner/bin/mailscanner_create_locks line 47.
    Error: Attempt to create locks in /var/spool/MailScanner/incoming/Locks failed!


    ============

    After starting and stopping mailscanner a few times the errors disappeared. Weird!
     
    Last edited: Apr 20, 2011
  13. padonker

    padonker New Member

    On page 3, Baruwa;
    gdebi is used to install, however, as of Ubuntu 10.10 gdebi is no longer part of a default install. Hence, it needs to be installed prior to this line.
     
  14. padonker

    padonker New Member

  15. Rocky

    Rocky Member

    Ok, before you move any further, you have to get mailscanner working properly.

    Please double check the mailscanner section and read through everything to make sure you haven't missed anything. I got a feeling you missed the permission section. Also, make sure you have the startup file properly setup. Are you using windows to setup your box or ssh?

    About gdebi, I forgot to put it in the dependencies section, but I updated it. You should install gdebi-core. We have to use gdebi because it installs the dependencies for Baruwa.
     
  16. padonker

    padonker New Member

    Last edited: Apr 21, 2011
  17. Rocky

    Rocky Member

    Ok cool, I updated the guide with it. That must be required with the new version of uwsgi because I didn't have to use it with my setup. However, it's there now and shouldn't cause any issues.
     
  18. padonker

    padonker New Member

    Next issue:

    Setup Instructions for Baruwa


    I've added an admin user, but in contrary to what the manual says, I dont get two new tabs. I can edit the user and have the option to change Profile where I can set SA scores, but thats all. No option to add domains
     
  19. Rocky

    Rocky Member

    Hey,

    You have to make the user a Domain Admin before those options becomes available.
     
  20. padonker

    padonker New Member

    There must be something wrong because if I set the admin user as Domain Admin the Account Type remains Administrator. Also, the additional tabs do not appear.
     

    Attached Files:

Share This Page