Filter incoming email by domain

leiahj

New member
Joined
Mar 22, 2021
Messages
1
Hello Guys

I´m new to DirectAdmin and I come from Cpanel.

In Cpanel there is an option to Filter and block incomings emails by domain. And there I´m able to add countless addresses in batch. DirectAdmin has this option, but it has to be one by one. I already have a good list on CPanel that I wanted to take advantage of, but one can’t do it.

Any idea how to solve it?
 

Attachments

  • Screenshot at Mar 22 16-43-20.png
    Screenshot at Mar 22 16-43-20.png
    87.7 KB · Views: 5
In SpamAssassin Settings in DirectAdmin there's an option, location varies by skin in use, says something equivalent to "Manually edit the config file yourself." You'd add entries like this:

blacklist_from {entry}

Example:

blacklist_from *@gmail.com

But of interesting note, if your server uses rspamd instead of SpamAssassin, I am not certain if saving this file will trigger a rewrite of the user's rspamd settings, and I am certain that a wildcard for anything that would come after the @ will not work. You could block @gmail.com, but not @*.gmail.com (wildcard for all possible subdomains) or *@*.tld (the famous TLD block attempt) as rspamd won't process that in the way you expect.
 
Back
Top