How can I block specific incoming emails?

  • Applies to: DV
    • Difficulty: Easy
    • Time Needed: 10
    • Tools Required: Plesk administrator access
  • Applies to: DV 4.0
    • Difficulty: Easy
    • Time Needed: 10
    • Tools Required: Plesk administrator access


(mt) Media Temple makes a best effort to ensure the accuracy of all content contained herein. The publishing of this information does not imply support of this article. This article is provided solely as a courtesy to our customers. Please consult our DV Scope of Support for further information.


  1. Log into the Plesk Control Panel for your domain.


    If you log into Plesk with the admin user, you will be in the Server Administration Panel by default. To get to the Control Panel, click on Domains, then on the Control Panel link next to your domain.

    You can also create a user that will log into the Control Panel by default, which will save you a few clicks on day-to-day webmaster tasks. See Control Panel user.

  2. Click on the Mail tab at the top.

  3. Click on your email address in the list.

  4. Then, click on the Spam Filter tab.

  5. If you want to change the default settings, click on Show Advanced Settings.

         Figure 6. Click on Show Advanced Settings.

  6. Here, you can change the filter sensitivity, or add email addresses to your White List or Black List. For the sensitivity, a lower number will make the spam filter stricter and a higher number will allow more messages through. Click the OK button to save your settings.

    Figure 7. Change your spam filter sensitivity, and access your block and allow lists.

Add addresses via SSH

This method goes one step beyond marking unwanted messages as spam. It will actually send a bounceback to the sender, with the following message:

SMTP error from remote mail server after RCPT TO:<>: host []: 553 sorry, your envelope sender is in my badmailfrom list (#5.7.1)

To add email addresses to your badmailfrom list via SSH, please follow these instructions:

  1. Log into your server with a root or sudo user via SSH.
  2. Open or create your badmailfrom file by executing the following command:
    vi /var/qmail/control/badmailfrom
  3. Add each desired email address, server name, or IP on a separate line. Save the file.


    vi tip: Press "i" to enter "insert mode" so you can type and copy/paste. Press "Esc" to exit "insert mode" when you are done modifying the file. Type ":wq" to save and quit.

  4. Restart the appropriate mail services with the following line:
    /usr/local/psa/admin/bin/mailmng -o ; /usr/local/psa/admin/bin/mailmng -p ; /etc/init.d/xinetd restart ; /etc/init.d/qmail restart
Was this article helpful?
1 out of 1 found this helpful