Virtual Users And Domains With Postfix, Courier And MySQL

Discussion in 'HOWTO-Related Questions' started by lord0815, May 16, 2008.

  1. lord0815

    lord0815 New Member

    First - Thank you for the How-To.

    But there is something i dont understand.
    Spamassassin is installed an configured but i cant find any configuration that tells spamassassin to check a mail?
    Shouldnt there be a line in master.cf / main.cf or maybe in amavisd.conf??

    I think we spamassassin need at least a spamd or spamc command?

    Maybe i dont understand some parts of the how to...

    Thanks for some info...

    bye
     
  2. thecaoticone

    thecaoticone New Member

    If you are using amavis, basically postfix will receive the mail and pass it to amavis. Amavis will then invoke clam and spamassassin to do a spam and virus check and then take the appropiate action set in its config files. (bounce, reject , pass)

    Amavis will do all this behind the scenes using its config files.
     
  3. lord0815

    lord0815 New Member

    Thats what i think too, but there is no pointing to the spamassassin binarys and no single word about spamassassin in the amavis config only clamav is defined in the HowTo.

    Spam is defined as PASS like its used in the HowTo config.
    Is there a way to active oder deactivate spamassassin??
    Its not really transparent how spamassassin works for amavis maybe it would be a better way to solve spam checks with the mta settings f.e. in master.cf?

    Thanks - bye
     
  4. thecaoticone

    thecaoticone New Member

    I think this might be what you are looking for. This is from the Debian / Ubuntu guides:


    Code:
    vi /etc/amavis/conf.d/15-content_filter_mode
    Code:
    use strict;
    
    # You can modify this file to re-enable SPAM checking through spamassassin
    # and to re-enable antivirus checking.
    
    #
    # Default antivirus checking mode
    # Uncomment the two lines below to enable it back
    #
    
    @bypass_virus_checks_maps = (
       \%bypass_virus_checks, \@bypass_virus_checks_acl, \$bypass_virus_checks_re);
    
    
    #
    # Default SPAM checking mode
    # Uncomment the two lines below to enable it back
    #
    
    @bypass_spam_checks_maps = (
       \%bypass_spam_checks, \@bypass_spam_checks_acl, \$bypass_spam_checks_re);
    
    1;  # insure a defined return
     
  5. lord0815

    lord0815 New Member

    Okay thats a part of the things i need to know.

    Maybe i start from the wrong point of view...

    I need to know these things because of storing userprefs in a DB.
    The problem is the parameter _USERNAME_ .
    If i use Spamassasin without amavis i can add some lines in master.cf
    to give the spamc command the username.

    Code:
    spamassassin unix -     n       n       -       -       pipe
              user=vmail argv=/usr/bin/spamc -u ${recipient} -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}
    If i use amavis i dont know where to give the ${recipient} or ${sender} parameter to spamassassin.

    Currently the user is always the user started the spamc process...

    Any hints to solve this problem without disable spamassassin in amavis??

    Thanks again!
     
  6. thecaoticone

    thecaoticone New Member

    According to what I have read, Amavis does not support this. You would have to disable SA from Amavis and use the spamc command like you were talking about.

    However, I found a post that might have a work-around. It looks as if they are using customized DBs and sql-query's to achieve a per user basis.

    I believe the changes they are making are in the /etc/amavis/conf.d/50-user file.

    Let me just say I personally have not tried this, and would recommend being cautious about implimenting this method until I had tested first.

    Here is the link if you would like to investigate it.

    http://husaren.dk/index.php/2008/04/28/per-recipient-userpreferences-in-amavisd-new-based-on-sql-lookups/

    Hope this helped.
     
  7. lord0815

    lord0815 New Member

    Thanks for your detailed reply, for me its now time to think about
    how usefull amavis is for me and generally how much time i can save or how much time i have to spent to keep the system up and running...

    Some facts i´ve collected


    - if something changed in SA or the virusscanner i maybe have to upgrade amavis or the amavis conf too

    - no detailed Spam statistics possible while integrated with amavis (all spamchecks are done with the systemuser)

    - no per userprefs for SA possible as i can do it with a standalone SA installation

    At first i just seen pros while using amavis running just one service that do all checks for me but now i see just cons while combining two systems in one because i just use clamav as virus scanner...

    Is amavis still state of the art??
    I found the following link

    http://jameslick.com/clamassassin/
     
  8. falko

    falko Super Moderator Howtoforge Staff

    ISPConfig is using clamassassin, but we use it with procmail which requires system users. But maybe it works with maildrop as well...
     

Share This Page