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.

Custom Rulesets for Exim

Discussion in 'General Discussion' started by brianc, Jan 29, 2005.

  1. brianc

    brianc Well-Known Member

    Joined:
    May 16, 2003
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    16
    Hi All:

    I have a client who wishes to use custom rulesets to fight against spam. He is creating a local.cf file and is placing it in his /home/username/.spamassassin directory. Exim is restarted but his rules are not picked up. Is this where the local.cf file goes? Is there another method in which a user can use his own rules?

    Appreciate any insights. Thanks.
    Brian
     
  2. Jemshi

    Jemshi Well-Known Member

    Joined:
    Sep 11, 2003
    Messages:
    210
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    ~user/.spamassassin/user_prefs should do. This is *not* exim's ruleset. Its spamassassin's. No need to restart exim after you modify this.
     
  3. brianc

    brianc Well-Known Member

    Joined:
    May 16, 2003
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    16
    Thanks Jemshi for the reply.

    That is what I thought but my client added his ruleset to this file but then said they were not being used. I just added some more to it to test it out.

    Are you saying that there is no need to restart SA when adding to this file? I mentioned restarting Exim because SA is restarted along with it.

    Brian

    Update:

    The ruleset did not take. Here is what was added to the user_prefs file:

    Code:
    header CCTO_FLOWGOMAIL From =~ /flowgomail\.com/i
    score  CCTO_FLOWGOMAIL 8
    header CCTO_FLOWGOMAIL2 From =~ /flowgomail2\.com/i
    score  CCTO_FLOWGOMAIL2 1000
    header CCTO_SAVVE_HUNDREDS Subject =~ /savve hundreds/i
    score  CCTO_SAVVE_HUNDREDS 3
    header CCTO_WAMU01 Subject =~ /Your Washington Mutual/i
    score  CCTO_WAMU01 8
    
    body  CCTO_DONATEING /Donateing/i
    score CCTO_DONATEING 3
    body  CCTO_EBAY_KAREN /You are subscribed as karen\@ccto\.org, registered on eBay/i
    score CCTO_EBAY_KAREN 8
    body  CCTO_MONEY_LAUNDER01 /collecting this consignment on my behalf/i
    score CCTO_MONEY_LAUNDER01 8
    body  CCTO_MONEY_LAUNDER02 /payments through you as our payment officer/i
    score CCTO_MONEY_LAUNDER02 8
    body  CCTO_MONEY_LAUNDER03 /funds have been transferred/i
    score CCTO_MONEY_LAUNDER03 8
    body  CCTO_MONEY_LAUNDER04 /I will change beneficiary/
    score CCTO_MONEY_LAUNDER04 8
    
    uri   CCTO_URI_WANDRA /wandra\.com/i
    score CCTO_URI_WANDRA 8
    uri   CCTO_URI_WATCHESBAZAAR /watchesbazaar\.com/i
    score CCTO_URI_WATCHESBAZAAR 8
    
    # IMPLEMENTED SINCE LAST RESTART OF EXIM
    body  CCTO_MONEY_LAUNDER05 /we will pay for your services as my representative/i
    score CCTO_MONEY_LAUNDER05 8
    Is there something I am missing here?

    Brian
     
    #3 brianc, Jan 29, 2005
    Last edited: Jan 29, 2005
  4. rvskin

    rvskin Well-Known Member
    PartnerNOC

    Joined:
    Feb 19, 2003
    Messages:
    400
    Likes Received:
    1
    Trophy Points:
    18
    You need to go to this user cPanel and enable SpamAssassin before you can add custom ruleset. You can use the GUI(edit spamassassin configuration) in cPanel to create the custom ruleset to make sure you have a correct file format. And then SSH to the server and add your own rules.
     
  5. brianc

    brianc Well-Known Member

    Joined:
    May 16, 2003
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    16
    This was already done. I believe the correct format is being used. In fact I know it is because if I add his rulesets to /etc/mail/spamassassin they are picked up. However this does not help the user who wishes to add his own ruleset without the host intervention.

    Is there anyway to do this or has someone on this forum been able to add custom rulesets to their /home/username/.spamassassin/user_prefs file and have spamassassin pick up the rules?

    Brian
     
  6. Jemshi

    Jemshi Well-Known Member

    Joined:
    Sep 11, 2003
    Messages:
    210
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    yes - they do work. I have tested a few rules like setting the required hits and score for html messages and like.
     
  7. brianc

    brianc Well-Known Member

    Joined:
    May 16, 2003
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    16
    Did you add your rules via the cPanel interface or via a text editor? Could I see an example of your rules?

    All I can say is the client stated he added them and they did not work. When I added his rules to /etc/mail/spamassassin/ they worked.

    Brian
     
  8. Jemshi

    Jemshi Well-Known Member

    Joined:
    Sep 11, 2003
    Messages:
    210
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Usually, I edit from backend using some editor. Juz tried from cpanel and that works too.
     
  9. brianc

    brianc Well-Known Member

    Joined:
    May 16, 2003
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    16
    Can I see an example of your rules? Thanks.

    Brian
     
Loading...

Share This Page