Collapse

Announcement

Collapse
No announcement yet.

Spam Emails

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spam Emails

    Hello,

    I am receiving lots of spam emails from qq.com email addresses on my cPanel server.

    Please advise how to stop these kind of emails?

  • #2
    To blocked all emails from a specific domain name, you will need to create the custom filter rule under your WHM panel.

    To create a custom system filter file, perform the following steps:

    1) Log in to your server as the root user.

    2) Use the following command to copy the /etc/cpanel_exim_system_filter file:

    ```
    cp -p /etc/cpanel_exim_system_filter /etc/cpanel_system_filter_new
    ```

    3) You can edit the /etc/cpanel_system_filter_new file and put below code at the end of the file. Refer below image for more info:

    Click image for larger version

Name:	eximfilterfile.PNG
Views:	1
Size:	27.0 KB
ID:	411

    ```
    if
    $header_from: contains "@qq.com"
    then
    if error_message then save "/dev/null" 660 else fail "Messages from this domain are blocked." endif
    endif
    ```

    If you wish to block the emails from another domain, then you can change the domain instead of qq.com.

    4) and then update the new file path under WHM's Exim Configuration Manager interface WHM >> Home >> Service Configuration >> Exim Configuration Manager. Refer this below image for more details.

    Click image for larger version

Name:	Exim.PNG
Views:	1
Size:	241.9 KB
ID:	412

    In the Basic Editor section of the interface, select the textbox option for the System Filter File setting.

    5) Enter the new file path in the text box (e.g, /etc/cpanel_system_filter_new)

    6) and then click on Save.

    That's it.
    Last edited by santosh; 01-01-2018, 12:58 PM.

    Comment

    Working...
    X