Jump to content
  • 0

Change cPanel mail settings during account creation?


TommyKingston

Question

Using Blesta 5.0.4 with the bundled cPanel 2.15.0 module for new user signup. User walks through checkout process, Blesta connects to cPanel and makes the account just fine.

When I manually create accounts in WHM, though, I can change a few additional settings that aren't part of the cPanel package (Notably, Mail Routing and DNS), but don't seem to see a way to make those changes in Blesta.

I know I can access the account after via WHM and make the edit, but if it can be selected during WHM account creation, I'm hoping Blesta can set it and save me a LOT of hassle.

 

(I'm also trying to find a way to change those defaults on the WHM side, but am having no luck there, hence hoping I can get around it using Blesta :))

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

I should add, it IS possible to make this change via the cPanel API at account creation (it's the mxcheck string as documented at Create cPanel account · cPanel & WHM Developer Portal)... I'm just not sure if I'm missing if this is an option to change within Blesta.

If it's not I'm not above getting into the code and modifying something ... but I don't know the Blesta codebase well enough (yet?) to even know where this would be happening. Thanks!

Link to comment
Share on other sites

  • 0

Feels like I'm talking to myself at this point. Lol. I'm still not sure if it's somewhere in a setting (or should be) but in case stumbles on this in the future for the same issue, I did find get a code-hack together to make it work. I hate hacking at Core files (probably too many years working with WordPres/WordPress Themes), but in /components/modules/cpanel/cpanel.php I set the following starting at line 1187: 

            'ip' => $dedicated_ip,
            'mxcheck' => "auto", // < Change default mail handling 
            'contactemail' => isset($vars['cpanel_email']) ? $vars['cpanel_email'] : null

Really, there's probably a cleaner way to do this or at least a prettier way by making it an option as part of a package... but since 'auto' will work for all of the scenarios I'm imagining, this should be the fix for me at least. 

Hope it helps someone else :) 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...