Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: User whitelists and blacklists

  1. #1
    Join Date
    Dec 2007
    Location
    Missouri
    Posts
    30
    Rep Power
    8

    Default User whitelists and blacklists

    I've been trying to use SpamAssassin's ability to store user preferences in a SQL database. My goal is to allow users to create and modify a whitelist and blacklist from a external web interface until Zimbra supports this feature natively. I know it's on the todo list (bug #6953) but I'm not sure how long it will be until this feature is added.

    I've done this before on a Ensim server it works great. You just have to create the necessary database and table and then add the following code to the site-wide local.cf or individual user_prefs file:

    Code:
    user_scores_dsn	       DBI:mysql:[database]:[host]
    user_scores_sql_username	dbusername
    user_scores_sql_password	dbpassword
    This doesn't seem to work with Zimbra, though. I added this code (with the right values) to /opt/zimbra/conf/salocal.cf.in and /opt/zimbra/conf/spamassassin/local.cf but I never saw Zimbra connecting to my database box.

    Perhaps this feature only works with spamd/spamc? If so, does anyone have any thoughts on how I can accomplish this in another way?

    Thanks,
    Ron

  2. #2
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    Welcome to the forums.

    Use this article in the wiki.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  3. #3
    Join Date
    Dec 2007
    Location
    Missouri
    Posts
    30
    Rep Power
    8

    Default

    That's a great wiki page and I've implemented several items mentioned on it, but it doesn't address user-specific whitelists and blacklists.

    I want individual users to be able to alter their own lists without asking me to edit a config file and restart amavis. Even if I were to do this, it would be a site-wide entry. On my current hosting box, users can go to a web interface to modify their preferences in the database. This way, each user can adjust SpamAssassin to their individual needs.

    I realize that Zimbra is working on something along these lines, but that bug hasn't been updated in a while so I thought I'd find a workaround in the meantime.

    Ron

  4. #4
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    Sorry, I missed the 'user' part of your post. That RFE is targeted for a later release of Zimbra and it will be available in the not too distant future.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  5. #5
    Join Date
    Dec 2007
    Location
    Missouri
    Posts
    30
    Rep Power
    8

    Default

    Awesome, thanks. I won't put too much time into doing it on my own then, especially since it seems I've hit a brick wall since Zimbra doesn't use spamd/spamc. This will be a very welcome new feature!

    Ron

  6. #6
    Join Date
    Dec 2007
    Location
    Missouri
    Posts
    30
    Rep Power
    8

    Default

    I figured out another way to accomplish this. AMaViS has built-in support for storing policies and users in SQL, and it seems to work fine with Zimbra. I haven't spent a lot of time with it yet, but I managed to add whitelist and blacklist entries for a sample user and it worked great.

    The key entry in /opt/zimbra/conf/amavisd.conf.in is already there but it's commented out by default. I changed mine to read something like this and restarted amavisd:

    Code:
    @lookup_sql_dsn =
      ( ['DBI:mysql:database=amavis;host=server.tld;port=3306', 'username', 'password'] );
    Then I created the necessary user in MySQL and created the tables specified in http://www.ijs.si/software/amavisd/README.sql.txt.

    After adding some users and whitelist/blacklist entries to the tables it was up and running.

    If anyone is interested in more details, I will write up more detailed instructions.

    Ron

  7. #7
    Join Date
    Aug 2009
    Location
    Denver Colorado
    Posts
    82
    Rep Power
    6

    Default I would like info on the Blacklist whitelist setup

    Please post a doc if you have it.
    Microsoft MCP, MCSE+I, Novell CNA, CNE, Compaq ASE
    Untangle your Network, I did.! http://www.untangle.com/

  8. #8
    Join Date
    Feb 2007
    Location
    Portland, OR
    Posts
    1,147
    Rep Power
    10

    Default

    In the 2 years since the last post of the thread before yours many things have changed, among them is the fact that in 6.0.x Zimbra implemented per user white and black lists... any particular reason you want to use this method and not the one already built into your server?

  9. #9
    Join Date
    Sep 2007
    Location
    Switzerland
    Posts
    44
    Rep Power
    8

    Default

    where can I find user black- and whitelist in zimbra 6?

    Update: I've found it - it's in webmail in mail general settings (scroll down) :-)
    Last edited by FloHoCH; 12-02-2009 at 02:39 AM.

  10. #10
    Join Date
    Sep 2007
    Location
    Switzerland
    Posts
    44
    Rep Power
    8

    Default

    Quote Originally Posted by liza20005 View Post
    this is embarrassing but i cant find it
    You have Zimbra 6? Type in search bar "$set:get version"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •