How to block or mark as spam emails coming from certain TLDs?

Is it possible to block emails coming from a certain TLD such as .xyz or .loan?

I only had success doing this on the DirectAdmin servers using Sieve filters. You add those in RoundCube or using the Sieve port. Filter by regex to match something like .*@.*\.best, action Discard with message if you want it to reject.

Thank you for your answer. I will give this a shot but if I could I would much rather be able to do this on a domain level instead on a per user basis.

This was the one significant loss with the move from SpamAssassin to rspamd, we’ve lost a way for you to do that account wide. I fully intend to add back some way to do that at the same level in the future.