The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Enabling Spamassassin for New Accounts By Default

Discussion in 'General Discussion' started by PuReWebDev, Nov 28, 2005.

  1. PuReWebDev

    PuReWebDev Well-Known Member

    Joined:
    May 18, 2004
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Orlando, FL.
    Hello everyone. After a thorough search of our forum and Google, I've found no answer to the question of how do I enable spamassassin for every new account by default.

    I'm sure the answer to this would help more then just myself. The option of having a centralized spamassassin installation is not currently an option for my client, so thanks anyway if you were about to suggest that.

    I'll be happy to write a php script to modify accounts if necessary, I'm just not well versed enough with spamassassin to know exactly what to change.


    Thanks a bunch for helpful replies. Hope everyone had an awesome Thanksgiving.


    PuReWebDev :cool:
     
  2. ivankovalenko

    ivankovalenko Active Member

    Joined:
    Jul 19, 2005
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    6
    You can place file .spamassassinenable into the skeleton directory. I found this neccesary. Also its useful to provide already tuned filter for spam - throwing it away. You should modify /script/postwwwacct to include there similar code

    Code:
    #!/usr/bin/perl
    
    
    $domain = $ARGV[0];
    $user = $ARGV[1];
    
    open(VALIAS,">/etc/vfilters/$domain");
    print VALIAS <<EOM;
    # Exim filter
    
    if error_message then finish endif
    
    if
     $h_X-Spam-Status: contains "Yes,"
    then
     save "/dev/null" 660
    endif
    
    EOM
    close(VALIAS);
    
    And place inside skeleton-dir/.filter
    Code:
    $h_X-Spam-Status: contains "Yes,"+++++++/dev/null
    
    Also you can setup default mail for domain to throw away such messages (i presume, its better practice, than generating bounces). Its done via whm's section named Tweak configuration.
     
  3. PuReWebDev

    PuReWebDev Well-Known Member

    Joined:
    May 18, 2004
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Orlando, FL.
    Thank you for your post. I'll have to try this one out.


    Much apprietiated!
    PuReWebDev
     
  4. gemby

    gemby Well-Known Member
    PartnerNOC

    Joined:
    Feb 16, 2002
    Messages:
    182
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Pula, Croatia
    cPanel Access Level:
    DataCenter Provider
    Yes it is working, Thank you man!

    I only edited filter to shows Yes without comma:

    Code:
    $h_X-Spam-Status: contains "Yes"+++++++/dev/null
    
     
Loading...

Share This Page