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

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

  1. Rocky

    Rocky New Member

    Hey,

    Did you use my .deb package?

    You cannot set the admin user as a domain admin, you have to create an additional user as the domain admin. There must be 1 admin who manages the global configs, but you can have multiple domain admins.
     
  2. padonker

    padonker New Member

    Yes, everything according your howto, and this is the 3rd admin account.
    If I edit the user its account type is Doman Admin, yet the main page says Administrator.
     
  3. Rocky

    Rocky New Member

    Hmm, that is really strange. I haven't seen this behavior myself.

    Do this, run:
    manage.py syncdb

    Log back in and change a user to domain admin to see if it takes.

    Can you possibly allow me ssh access? Maybe I can take a look to see if anything jumps out at me.
     
  4. padonker

    padonker New Member

    manage.py syncdb gives No fixtures found.
    Relogin and changing account type changes nothing. To make it even better; no matter what kind account type I select, main page always says Administrator :confused:
     
  5. Rocky

    Rocky New Member

    Can you try using a different browser, or possibly turning off javascript. It might be a javascript related issue.
     
  6. padonker

    padonker New Member

    No change, IE gives same results
     
  7. Rocky

    Rocky New Member

    I would suggest you try purging baruwa and reinstalling it.

    apt-get remove --purge baruwa* apache2 (just in case it installed apache2)

    Make sure to say yes to purge the database, this will completely remove baruwa.

    You have to recreate the symlink /opt/MailScanner, since the purging process removes it.

    ln -s /opt/MailScanner-version /opt/MailScanner

    Download a new copy of my .deb package, linked in the guide.

    gdebi baruwa*.deb

    You'll have to setup mysql once more.
     
  8. padonker

    padonker New Member

    Your suggestions helped; I can now add Domains :)
    Thanks again!
     
  9. padonker

    padonker New Member

    On to the next problem :(
    I have added a domain and try to test the connection. The system says that the smtp server I added doesnt accept mail for the said domain. I've tried to telnet to port 25 of the server and it does accept a connection from the spamsnake. The server to which I connect has been running without problems for years, so no issues on that side.
    Another thing is, that when I try to edit the smtp delivery setting (pencil icon), I get Page Unavailable (http://spamsnake/settings/hosts/5/edit/).
    If I try to delete a domain from the Domains page, I get a Server Error; I cannot delete domains that I have added.
    To be honest, this is getting on my nerves a little....its working from one problem to another. I'm not criticising the effort you have put in the How-to, its just frustrating that your document doesnt work for me as it has been for you/others.

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

    The fact that the smtp server didnt accept mail was due to faulty dns config; after updating /etc/hosts connection can be made and the test ends succesfully.
     
    Last edited: Apr 26, 2011
  10. Rocky

    Rocky New Member

    Out of curiosity, what version of django are you running?

    Also, for the delivery smtp server editing problem, you'll have to apply this fix:
    https://github.com/akissa/baruwa/commit/9312de6c48063447c3b84ec6ed3be9a4945f76cd
    Make a backup of the file first.

    The issues you're having is with the frontend Baruwa. Other's have built the Snake using this guide and have had great success straight out of the box. I'm not sure what's happening on your end, but we'll get to the bottom of it.
     
    Last edited: Apr 26, 2011
  11. padonker

    padonker New Member

    I appear to be running Django 1.2.3-1ubu.
    I'll apply the fix mentioned.

    Thanks
     
  12. padonker

    padonker New Member

    I try to mark a message as spam using SA learn.
    If I check the Spam option and submit I get Error connecting to server. check network!
    Which log shows me what is going wrong?
     
  13. Rocky

    Rocky New Member

    Open /usr/share/pyshared/baruwa/settings.py and set Debug = True.

    Restart nginx/uwsgi/mailscanner services, clear out web browser cache and try it again. It should throw a traceback result. Paste it here if it does.

    I suspect it's probably a javascript error.

    You can try to disable javascript in IE, clear out cache, reconnect to baruwa and see what happens when you try to train. If it works, then it's a javascript error.
     
    Last edited: Apr 26, 2011
  14. padonker

    padonker New Member

    Set Debug=True, but no trace :confused:
    Disable JS does not change behaviour
     
    Last edited: Apr 26, 2011
  15. Rocky

    Rocky New Member

    Please redo:

    chown -R postfix:www-data /var/spool/postfix/hold
    chmod -R ug+rwx /var/spool/postfix/hold

    Double check these values in /opt/MailScanner/etc/MailScanner.conf:
    Run As User = postfix
    Run As Group = www-data
    Incoming Work Group = clamav
    Incoming Work Permissions = 0640
    Incoming Queue Dir = /var/spool/postfix/hold
    Outgoing Queue Dir = /var/spool/postfix/incoming
    MTA = postfix
    Quarantine User = root
    Quarantine Group = www-data
    Quarantine Permissions = 0660
    Quarantine Whole Message = yes
    Spam Actions = deliver store
    High Scoring Spam Actions = store delete
    Non Spam Actions = deliver store
    SpamAssassin User State Dir = /var/spool/MailScanner/spamassassin

    After that, restart all your services and try it again.
     
  16. padonker

    padonker New Member

    All settings checked, rebooted, same result
     
  17. Rocky

    Rocky New Member

    Last edited: Apr 27, 2011
  18. Rocky

    Rocky New Member

    Hey,

    Can you check to see if this file found in /usr/share/pyshared/baruwa/static/js?

    ajax-csrf-tokenize.js

    I believe your setup might be missing it and thus the javascript issues.

    Let me know.

    Thanks,

    Rocky
     
  19. Chluz

    Chluz New Member

    "Table 'baruwa.south_migrationhistory' doesn't exist"

    Hi guys,
    thanks for the guide. I'm trying to figure this out but I'm only starting out on linux mail systems (this is to be used for a gateway to an exchange system).

    I'm currently stuck at

    # baruwa-admin syncdb --noinput
    # for name in $(echo "accounts messages lists reports status fixups config"); do
    baruwa-admin migrate $name;
    done

    Whenever I try and populate the table, I get a tracback message ending in
    django.db.utils.DatabaseError: (1146, "Table 'baruwa.south_migrationhistory' doesn't exist")

    .Any idea what causes this ? all other previous checks run as expected.

    Thanks

    EDIT : Dammit, posted this in the wrong forum, must have been very tired last night .... In a charitable mod want to move this to the 12.04 perfect spam snake forum I would be grateful. And Again, I'm very sorry.
    In any case, I solved my problem. I was being an idiot and didn't know i had to initialise the db (by doing baruwa-admin syncdb --noinput , ie without the comment)
    Thanks
     
    Last edited: Jun 25, 2013

Share This Page