• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question Command line not working for Spam

Change Maker

Basic Pleskian
Server operating system version
Ubuntu 22.04.4 LTS
Plesk version and microupdate number
18.0.58 Update #2
Hi
I've followed this Plesk Thread.
Using the guide for Linux I logged on to my Server via Putty and entered:
plesk bin mailserver --add-to-black-list *@*.shop
I wanted to stop all from that domain and the guide note in the article says I could use that syntax?

The Error I get is:
An error occurred during operation with black list: Unable to add domain to black list: The domain name *@*.shop is invalid.

Am I doing something wrong?
I also get an error for this one:
plesk bin mailserver --add-to-black-list *@sa.com
Thanks
 
The line command example outlined in the article can only be used to blacklist full domains (like example.com or mydomain.de). It does not allow for patterns (like *@*.shop) to be added. Those can be added via Plesk (in the GUI), as also outlined in the article.
 
The blacklist in Tools & Settings > Mail Server Settings doesn't allow the use of wildcards. Only specific domain names can be set.

You can set per mailbox rules when Spamassassin is used or globally when Plesk Email Security is used.
 
You can set per mailbox rules when Spamassassin is used or globally when Plesk Email Security is used.
Small addition, even when Spamassassin is used (w/o PES) senders can be blocked globally using wildcards via Tools & Settings > Spam filter > Black List :D
 
The line command example outlined in the article can only be used to blacklist full domains (like example.com or mydomain.de). It does not allow for patterns (like *@*.shop) to be added. Those can be added via Plesk (in the GUI), as also outlined in the article.
1735659026834.png

So I want to blacklist that whole domain. Is my syntax wrong for doing that then? Using the CMD Line?
 
The blacklist in Tools & Settings > Mail Server Settings doesn't allow the use of wildcards. Only specific domain names can be set.

You can set per mailbox rules when Spamassassin is used or globally when Plesk Email Security is used.
1735659228030.png
So that's what I put into the Spam Filter in Webmail for these 3 domains.
Are you saying I need to put this somewhere else?
Thanks
 
That is sieve filtering performed server side. It will march those domain names and will perform the set action.

You also have Spam settings when editing the email address in Plesk. That is what I was referring to. Spam setting can also be set via CLI.

> So I want to blacklist that whole domain. Is my syntax wrong for doing that then? Using the CMD Line?

Just the domain name, instead of example.com, in the command from point 2.
 
That is sieve filtering performed server side. It will march those domain names and will perform the set action.

You also have Spam settings when editing the email address in Plesk. That is what I was referring to. Spam setting can also be set via CLI.

> So I want to blacklist that whole domain. Is my syntax wrong for doing that then? Using the CMD Line?

Just the domain name, instead of example.com, in the command from point 2.
I should point out that whilst my emails are on my server, I don't use Plesk. I use my Mail Client zohomail as I have a CRM with records integrated.
Now from point 2, if I want to blacklist all with .shop can I ask what should be the syntax please?
 
Simply do it in the mail filter.

Show us the entire filter panel for the rule you shared earlier.
 
Match any of the following rules.

I would move them to the Spam folder. That way the system can learn from the received emails.
You will have to empty the Spam folder from time to time ( one or two times per year, depending on the received mail volume).
 
Ah. Of course. Makes sense. What a dumbo I am. Lets see what happens now then.
Thanks a lot for staying with me on this. Really appreciate that.
Robert
 
Back
Top