Disable Local Mail for an Account

troykelly

Registered
Jul 19, 2007
2
0
51
I can not for the life of me work out how to set mail as "disabled" for a local account.

Many of our clients now host their email at google app's - so how can I set mail as not enabled for those accounts.

At the moment - they can not receive any email created by the server for their domain as it (understandably) tries to deliver locally.
 

Vision

Active Member
Mar 18, 2002
35
0
306
cPanel Access Level
Root Administrator
As far as i know you can't do this from WHM. You can easily login with an SSH client (ie Putty) and modify the 2 files otherwise you better ask an admin to do it for you.
 

mtindor

Well-Known Member
Sep 14, 2004
1,417
82
178
inside a catfish
cPanel Access Level
Root Administrator
Yes you can do it from the Cpanel interface for that account, and actually that is preferred in this instance.

Log into Cpanel for the account in question
- then (if CPanel 11) click on MX Entry under the Mail section
OR
- (if Cpanel 10) click on Mail then Modify Mail Exchanger

You want to change the MX (Mail Exchanger) entry to at least the lowest numbered MX for that domain (based upon what Google Apps told you to use).

That will do two things:
1. Will remove that domain from /etc/localdomains and put it in /etc/remotedomains
2. Will modify the DNS zone that that particular Cpanel machine is using so that it has an MX record that points to the Google MX.

This will allow you to send mail to that domain, from a script on the server, and it will be delivered to Google for delivery instead of to the local machine.

After you do the above, you may want to go into WHM and edit the DNS zone file for that domain and add the additional MX records (so that all of them are listed in the local DNS zone instead of just the one you added via Cpanel).

Mike
 

niyogi

Member
Aug 13, 2003
9
0
151
This should really be an option in WHM as well - although it's great that it can be handled through cPanel as well.