SOLVED Only Allow Email Traffic From Cpanel Assigned Email Accounts

durangod

Well-Known Member
May 12, 2012
504
46
78
cPanel Access Level
Website Owner
Is there a way to set a cpanel/whm account to only allow traffic to and from using assigned emails. No other email addresses in or out will be processed. In other words every email that goes through the mail server (in or out) must be related to a current assigned email account, if its not then it gets destroyed.

thanks :)
 

cPSamuelM

Technical Analyst Team Lead
Staff member
Nov 20, 2019
196
38
103
USA
cPanel Access Level
Root Administrator
Hello @durangod,

Thank you for contacting cPanel! You can suspend incoming and outgoing mail for individual email accounts via the Email Accounts page in cPanel. For more information, refer to the "Restrictions" section on the following page:


Another method you could use to restrict incoming mail to a specific email account would be to create a filter from the Global Email Filters page in cPanel:


For example, you could create a rule with these options:

  • To
  • does not contain
  • your current assigned email account
  • Action: Discard

Lastly, another option you should be aware of is that you can disable outgoing mail for a whole cPanel account using the suspend_outgoing_email whmapi1 API:


I hope you have found this information helpful. Please feel free to let us know if you have any additional questions.

Best regards