Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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.

Spamassasin filter foreign language emails

Discussion in 'E-mail Discussions' started by nisamudeen97, Jun 15, 2017.

Tags:
  1. nisamudeen97

    nisamudeen97 Well-Known Member

    Joined:
    Jul 7, 2010
    Messages:
    49
    Likes Received:
    5
    Trophy Points:
    58
    Location:
    Cochin
    cPanel Access Level:
    Root Administrator
    Hi,

    I would like to do global filtering of foreign language emails using Spamassasin. I would like to reject emails especially Chinese. I have gone through different docs regarding the same. Below are the ones which I have followed for testing. Meanwhile I could see non are helpful. Still I receive Chinese emails. I have tried to debug the case and found the below error in "/var/log/maillog". Look to have some expert advise on this.

    lifewire.com/spamassassin-foreign-language-spam-1166250

    weavweb.net/2015/10/11/cpanel-email-filtering-to-stop-chinese-or-non-english-character-spam/


    config: failed to parse, now a plugin, skipping, in "/etc/mail/spamassassin/local.cf": ok_languages en de la th sv
     
    #1 nisamudeen97, Jun 15, 2017
    Last edited by a moderator: Jun 19, 2017
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you let us know the specific changes you made to the /etc/mail/spamassassin/local.cf file?

    Thank you.
     
  3. nisamudeen97

    nisamudeen97 Well-Known Member

    Joined:
    Jul 7, 2010
    Messages:
    49
    Likes Received:
    5
    Trophy Points:
    58
    Location:
    Cochin
    cPanel Access Level:
    Root Administrator
    Hi,

    I just added the below line as extra in /etc/mail/spamassassin/local.cf, rest of the things are default.

    ok_languages en
     

    Attached Files:

  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You'd need to also enable the TextCat plugin referenced at:

    ImproveAccuracy - Spamassassin Wiki

    To do so, add the following line to the /etc/mail/spamassassin/init.pre file:

    Code:
    loadplugin Mail::SpamAssassin::Plugin::TextCat
    Then, restart SpamAssassin via:

    Code:
    /scripts/restartsrv_spamd
    Thank you.
     
  5. nisamudeen97

    nisamudeen97 Well-Known Member

    Joined:
    Jul 7, 2010
    Messages:
    49
    Likes Received:
    5
    Trophy Points:
    58
    Location:
    Cochin
    cPanel Access Level:
    Root Administrator
    Hi,

    Thanks for the update. I have done the same, but still emails with Chinese are coming and it is reaching inbox.
     

    Attached Files:

  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Feel free to open a support ticket using the link in my signature if you'd like us to take a closer look. You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  7. nisamudeen97

    nisamudeen97 Well-Known Member

    Joined:
    Jul 7, 2010
    Messages:
    49
    Likes Received:
    5
    Trophy Points:
    58
    Location:
    Cochin
    cPanel Access Level:
    Root Administrator
    Hi,

    Ticket is opened for the same. Ticket number #
    8605173
     
    #7 nisamudeen97, Jun 15, 2017
    Last edited: Jun 15, 2017
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    To update, a symbolic link was created using the below commands to ensure the TextCat SpamAssassin plugin worked as expected:

    Code:
    cd /var/lib/spamassassin/3.004001/
    ln -s updates_spamassassin_org/languages languages
    Thank you.
     
  9. nisamudeen97

    nisamudeen97 Well-Known Member

    Joined:
    Jul 7, 2010
    Messages:
    49
    Likes Received:
    5
    Trophy Points:
    58
    Location:
    Cochin
    cPanel Access Level:
    Root Administrator
    Meanwhile it is not working still. Chinese emails are coming as usual to inbox. I have updated the same in ticket.
     
  10. keat63

    keat63 Well-Known Member

    Joined:
    Nov 20, 2014
    Messages:
    885
    Likes Received:
    26
    Trophy Points:
    28
    cPanel Access Level:
    Root Administrator
    I once wrote a filter rule to block chinese emails.
    Take a look at all the chinese emails that your recieve and you'll start to spot a few common chinese characters.
    I copied and pasted a few in to a global filter rule, they almost stopped over night.
     
Loading...

Share This Page