Restrict certain email accounts to send email within domain

shanshah

Registered
Jul 28, 2016
4
0
1
Pakistan
cPanel Access Level
Website Owner
Hello Team,

How do I restrict some email accounts to send email only in their same domains instead out side the domains. Your quick response willy highly appreciate.

Thanks
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,236
463

shanshah

Registered
Jul 28, 2016
4
0
1
Pakistan
cPanel Access Level
Website Owner
Dear Michael,

Thanks for suggestion, But I want some thing different.

Suppose I am a Cpanel Account user instead of Root/WHM user, and I want some of mine users to only send emails to within same domain. I don't let them allow to send out bound email.

I don't have rights to edit the Exim System Filter, I am a normal account holder cpanel user, having website hosted and some email accounts. I want my few email accounts user to send only with in same domains email instead outside.

Please help.

Thanks
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,236
463
I don't have rights to edit the Exim System Filter, I am a normal account holder cpanel user, having website hosted and some email accounts. I want my few email accounts user to send only with in same domains email instead outside.
You will need to reach out to your web hosting provider to see if they can implement such a rule for that domain name. The filtering options available to you in cPanel are for incoming email only.

Thank you.
 

shanshah

Registered
Jul 28, 2016
4
0
1
Pakistan
cPanel Access Level
Website Owner
Dear Michael,

Yes there is only incoming email filter option available. But what about outgoing filter? Is there any possibility to restrict the users for outgoing emails only in the same domain?

what you think should I open a ticket to Cpanel team for the same. ( as I am also a hosting service provider ).

Thanks
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,236
463
as I am also a hosting service provider
Could you verify if you have root access to this server? For instance, can you access Web Host Manager as the "root" user?

Thank you.
 

framos41

Member
Jul 10, 2017
9
2
3
Chile
cPanel Access Level
Root Administrator
Hello,

You will need to use an Exim system filter rule to restrict an email account from sending outgoing email to a specific domain name. A document on modifying the filter rules is available at:

How to Customize the Exim System Filter File - cPanel Knowledge Base - cPanel Documentation

You may also find these threads helpful:

Blocking all cpanel users from emailing specific domains/email accounts
Need to filter ALL email

Thank you.

Hello, as in the first link they show how to block emails if coming from some emails, how can this be done but set one email account to receive emails ONLY from the specified emails or domains and block the other ones, this should be done server level email accounts or can be done for each account emails accounts? as i have several accounts in my vps

Regards!
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,236
463
Hello @framos41,

I recommend using the "Global Email Filters" option in cPanel for any account you'd like to implement such a rule with. This is likely the easiest and most supported method of enabling such a filter. The option is documented at:

Global Email Filters - Documentation - cPanel Documentation

Additionally, you may find the following document helpful when attempting to setup the custom filter rule:

How to Configure Mail Filters - cPanel Knowledge Base - cPanel Documentation

Thank you.
 

framos41

Member
Jul 10, 2017
9
2
3
Chile
cPanel Access Level
Root Administrator
Thank
Hello @framos41,

I recommend using the "Global Email Filters" option in cPanel for any account you'd like to implement such a rule with. This is likely the easiest and most supported method of enabling such a filter. The option is documented at:

Global Email Filters - Documentation - cPanel Documentation

Additionally, you may find the following document helpful when attempting to setup the custom filter rule:

How to Configure Mail Filters - cPanel Knowledge Base - cPanel Documentation

Thank you.

Thank you! Solved
 
  • Like
Reactions: cPanelMichael