How to block email address or domain
- myVesta
- Site Admin
- Posts: 946
- Joined: Fri Jun 19, 2020 9:59 am
- Has thanked: 9 times
- Been thanked: 6 times
To block Incoming mail
First run:
Here you add email or whole domain which you want to block for receiving emails.
You can also use the wildcards.
Example:
Each email/domain have to be in separate line.
First run:
Code: Select all
vi /etc/exim4/deny_senders
You can also use the wildcards.
Example:
Code: Select all
*.win
*@example.com
*.stream
*.bid
*.racing
*.trade
*.cricket
*.download
*.date
*.loan
*.faith
qq.com
126.com
getgoood.com
*.fun
ict.com
procore.com
[email protected]
- myVesta
- Site Admin
- Posts: 946
- Joined: Fri Jun 19, 2020 9:59 am
- Has thanked: 9 times
- Been thanked: 6 times
Let's say you want to block outgoing emails to BADDOMAIN.COM.
As Admin, go to MAIL section, and just add BADDOMAIN.COM as you normally would in case you want to host it.
Exim4 on your server will then try to do local_delivery to that domain (it will completely ignore MX records of BADDOMAIN.COM domain), and in fact, that way you blocked outgoing emails to that domain.