How to block email address or domain

Post Reply
User avatar
T4B
Posts: 160
Joined: Sat Jul 11, 2020 9:44 am
Been thanked: 5 times

hey, can block the mail address in myvestacp ?
User avatar
myVesta
Site Admin
Posts: 934
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 8 times
Been thanked: 6 times

To block Incoming mail

First run:

Code: Select all

vi /etc/exim4/deny_senders
Here you add email or whole domain which you want to block for receiving emails.
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]
Each email/domain have to be in separate line.
User avatar
T4B
Posts: 160
Joined: Sat Jul 11, 2020 9:44 am
Been thanked: 5 times

thank you :P
bfcrew
Posts: 24
Joined: Mon Jun 22, 2020 3:41 pm
Been thanked: 2 times

How to block outgoing mail to specific address?
User avatar
myVesta
Site Admin
Posts: 934
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 8 times
Been thanked: 6 times

I know how to block the whole domain - just ADD that domain to MAIL section under any hosting account.
bfcrew
Posts: 24
Joined: Mon Jun 22, 2020 3:41 pm
Been thanked: 2 times

myVesta wrote: Tue Jun 06, 2023 8:55 am I know how to block the whole domain - just ADD that domain to MAIL section under any hosting account.
Sorry I'm not quite understand, you meant to add the domain intended to MAIL section on MyVesta platform? How?
User avatar
myVesta
Site Admin
Posts: 934
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 8 times
Been thanked: 6 times

bfcrew wrote: Tue Jun 06, 2023 10:12 pm
myVesta wrote: Tue Jun 06, 2023 8:55 am I know how to block the whole domain - just ADD that domain to MAIL section under any hosting account.
Sorry I'm not quite understand, you meant to add the domain intended to MAIL section on MyVesta platform? How?
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.
Post Reply