Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Aug 2005
    Posts
    10

    Default etc/localdomains and /etc/remotedomains

    In my current setup most of our clients use email that is not located on our cPanel server. In turn I have created different packages for accounts. We have a package called standard-noemail. So I add any accounts using this package if their email is elsewhere.. the problem i run into is each time I add an account i have to add it to /etc/remotedomains and make sure its removed from /etc/localdomains...

    Is there a solution to make this automated? I want accounts with no email solutions whatsoever. The reason this becomes a problem is if they have contact forms, etc.. they email the local server unless our admins remember to add it to /etc/remotedomains.

    On another note I have 2 domains that I have issues with sneeking back into /etc/localdomains.

    I remote them from /etc/localdomains and move them to /etc/remotedomains and the next day when i look they are back in localdomains, yet still in /etc/remotedomains.. this causes a big issue for the two clients..

    Any thoughts would be great.

  2. #2
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    One method is to create a /scripts/postwwwacct script as described at: http://www.cpanel.net/support/docs/hooks.htm#postwww

    Here, you can analyze the name of the package and if it has something like -noemail, you can script the tasks your admins are currently performing manually.

    With the domains that creep back into /etc/localdomains, is it possible that they are going to the MX entry editor in the cPanel interface and checking Always accept mail locally even if the primary mx does not point to this server?

    There may be a way to create a hook to intercept that as the code that is being executed can be found in /usr/local/cpanel/base/frontend/x3/mail/dosetmx.html:

    Code:
    <cpanel Email="changemx($FORM{'domain'},$FORM{'mx'},$FORM{'priority'},$FORM{'alwaysaccept'})">
    I am unsure if this API1 function has been ported over to have hooks support as described in /usr/local/cpanel/hooks/README

  3. #3
    Member
    Join Date
    Sep 2008
    Posts
    19

    Default

    Why not just make this in cPanel itself? (not WHM). Again, your competing product which I won't name, has this solved elegantly, by a simple checkmark. No admin intervention needed.

    cPanel is superior to most or all control panels out there, but I keep scratching my head sometimes, why so simple and obviously many times used features aren't implemented yet...

  4. #4
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by micho101 View Post
    Why not just make this in cPanel itself? (not WHM). Again, your competing product which I won't name, has this solved elegantly, by a simple checkmark. No admin intervention needed.

    cPanel is superior to most or all control panels out there, but I keep scratching my head sometimes, why so simple and obviously many times used features aren't implemented yet...
    This thread was about setting this up automatically upon account creation for accounts in a specific package. If you believe that MX entries should be able to be set on a per-package basis, you may want to submit a feature request for that. This thread is the first request I've heard for such functionality. You may even want to put in an official feature request for this functionality if you feel so strongly about this: cPanel Bugzilla Main Page

    If you will be using a remote mail server for all new accounts, just edit the MX entry/entries in the DNS Zone template as needed.

    For individual cPanel users that want to set this up, they just set up their remote MX entry by clicking the MX Entries icon in their cPanel interface.

Similar Threads & Tags
Similar threads

  1. Localdomains and Remotedomains
    By nibin in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 07-20-2011, 04:35 PM
  2. Modification of localdomains/remotedomains
    By henker in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 01-29-2008, 01:23 AM
  3. Exim Firewall localdomains remotedomains
    By tecdesc in forum E-mail Discussions
    Replies: 1
    Last Post: 05-19-2007, 10:49 PM
  4. localdomains / remotedomains not updated
    By jester.ro in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 07-20-2006, 03:18 PM
  5. localdomains -> remotedomains
    By whyoffice in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 10-22-2004, 04:20 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube