ispCP - Board - Support
How to use Google Apps as your email solution on your system - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Contributions Area (/forum-40.html)
+--- Forum: Howtos (/forum-41.html)
+--- Thread: How to use Google Apps as your email solution on your system (/thread-3661.html)

Pages: 1 2


How to use Google Apps as your email solution on your system - wb6vpm - 07-02-2008 05:36 AM

How to make your system use Google Apps (herein known as Google)

Before we delve into this, there are a few caveats (disclaimers) that we do have to consider:

1. This how-to is ONLY if you want to host ALL of your domains on Google
2. This does not have you use an API of Google to do it automatically, you will have to do the email setup on Google manually.
3. You will need to use the html verification method for Google. (Or you can manually edit the .db files at the end for each domain if you wish to put the CNAME in)
4. This worked for me, I cannot guarantee that it will work for you, and I assume no liability for you using it.
5. I cannot stress this enough, BACKUP, BACKUP BACKUP! So, incase something goes wrong, you can always roll back to the old settings!

Now that the disclaimers are out of the way Tongue, first things first, lets change the configuration template files

Edit /etc/ispcp/bind/parts/db_e.tpl it should look something like below when you are done (may vary slightly):

Quote:$TTL 86400
@ IN SOA ns.{DMN_NAME}. root.{DMN_NAME}. (
; dmn [{DMN_NAME}] timestamp entry BEGIN.
{TIMESTAMP}
; dmn [{DMN_NAME}] timestamp entry END.
8H
2H
4W
1D
)
IN NS ns1.{DMN_NAME}.
IN NS ns2.{DMN_NAME}.
IN MX 1 ASPMX.L.GOOGLE.COM.
IN MX 5 ALT1.ASPMX.L.GOOGLE.COM.
IN MX 5 ALT2.ASPMX.L.GOOGLE.COM.
IN MX 10 ASPMX2.GOOGLEMAIL.COM.
IN MX 10 ASPMX3.GOOGLEMAIL.COM.


{DMN_NAME}. IN A {DMN_IP}
{DMN_NAME}. IN TXT "v=spf1 mx ip4:{DMN_IP} include:aspmx.googlemail.com ~all"
ns1 IN A {BASE_SERVER_IP}
ns2 IN A {SECONDARY_DNS_IP}
localhost IN A 127.0.0.1
www CNAME {DMN_NAME}.
ftp CNAME {DMN_NAME}.
calendar IN CNAME ghs.google.com.
start IN CNAME ghs.google.com.
mail IN CNAME ghs.google.com.
docs IN CNAME ghs.google.com.
sites IN CNAME ghs.google.com.


; sub [{SUB_NAME}] entry BEGIN.
; sub [{SUB_NAME}] entry END.

Next, we will edit /etc/postfix/main.cf by changing virtual_mailbox_{domains|maps} as shown below:
Code:
...
virtual_mailbox_domains      = hash:/etc/postfix/ispcp/domains-empty
virtual_mailbox_maps         = hash:/etc/postfix/ispcp/mailboxes-empty
...

then execute:

Code:
touch /etc/postfix/ispcp/{domains,mailboxes}-empty
postmap /etc/postfix/ispcp/{domains,mailboxes}-empty
/etc/init.d/postfix force-reload

(Please verify command settings, as they can change OS to OS)

Keep in mind, if main.cf is ever regenerated, (i.e. upgrade ispCP) you will have to redo the above (re-edit, and run the commands)

Next, we will be doing a bit of sql to have the system regenerate our files.

http://isp-control.net/documentation/howto/ispcp/regenerate_config Wrote:====== Howto regenerate the config files ======
Modifying the template files in parts/ is not enough to apply the modification to existing domains. The config files of the affected services have to be regenerated. The following steps will guide you through the process

===== 1. Stop ispCP daemon =====

# /etc/init.d/ispcp_daemon stop

===== 2. Log into MySQL =====

mysql -u root -p

It will prompt for the password.

===== 3. Set to regenerate =====
In the mysql promtp enter:

USE ispcp;

-To regenerate all the domains configs:-

UPDATE `domain` SET `domain_status` = 'change' WHERE `domain_status` = 'ok';

-To regenerate all the subdomains configs:-

UPDATE `subdomain` SET `subdomain_status` = 'change' WHERE `subdomain_status` = 'ok';

-To regenerate all the aliases configs:-

UPDATE `domain_aliasses` SET `alias_status` = 'change' WHERE `alias_status` = 'ok';

-To regenerate all the emails configs:-

UPDATE `mail_users` SET `status` = 'change' WHERE `status` = 'ok';

===== 4. Quit mysql =====

quit

===== 5. Process the request =====

# /var/www/ispcp/engine/ispcp-rqst-mngr

===== 6. Start ispCP Daemon =====

# /etc/init.d/ispcp_daemon start

If you have any comments/suggestions/issues, please do not hesitate to put them here.


RE: How to use Google Apps as your email solution on your system - RatS - 07-02-2008 08:32 AM

Why do you use google? You don't care of your privacy? Are voyeurs allowed if you have sex? Think twice why you have your own server and don't use google and why this is good as it is ...


RE: How to use Google Apps as your email solution on your system - MicCo - 07-14-2008 08:00 PM

O'boy Smile


RE: How to use Google Apps as your email solution on your system - BioALIEN - 07-17-2008 08:06 AM

Some small businesses demand a higher level of service and flexibility. For this, Google/Live/Yahoo hosted services are the perfect addition to their existing IT needs.

You are experts in this space, but think of it from the average consumer. It also appeals to startups and people with a limited budget too.

+1 from me on this write up. SAAS is the way to go these days.


RE: How to use Google Apps as your email solution on your system - wb6vpm - 07-17-2008 08:19 AM

BioALIEN Wrote:Some small businesses demand a higher level of service and flexibility. For this, Google/Live/Yahoo hosted services are the perfect addition to their existing IT needs.

You are experts in this space, but think of it from the average consumer. It also appeals to startups and people with a limited budget too.

+1 from me on this write up. SAAS is the way to go these days.

Thank you! that is pretty much the way I am looking at it.


RE: How to use Google Apps as your email solution on your system - wb6vpm - 07-17-2008 08:23 AM

I will be updating this shortly, as I have discovered a few minor issues that I am currently working on to resolve.


RE: How to use Google Apps as your email solution on your system - four2theizz0 - 10-08-2008 11:50 PM

This is great, i do understand the need to use a reliable service like gmail
and even if you guys dont like it, is there another answer?
i am just starting up my hosting company and have worked in an email call center and DONOT want to deal with the hassles of running your own email and having paying customers and then having something screw up

i would love to run my own email and will if i have to but it is a nightmare when somethign goes wrong ans someone is paying you for it.

so thank you for the write up and please let us know of any updates you have Smile


RE: How to use Google Apps as your email solution on your system - DecIRC - 10-17-2008 04:46 AM

What kind of issues did you encountered ?
And isn't there some mail services we can stop to get some benefits at resource level ?
And an easy way to remove the mail part in the menu... If I put to 0 I have a problem with the automatic created mailboxes (three)

cEd


RE: How to use Google Apps as your email solution on your system - four2theizz0 - 10-17-2008 08:40 AM

Oh, I didn't mean anything specific...I just mean if you are running your own mail and ANYTHING goes wrong, people get mad. Rightfully so. At least if I am not running it and there is a problem I can blame them hehe. Still looks bad on me, but waaaayyyyy less stress.

I didn't encounter the problems myself, I just worked for a big email provider and have been on the frontlines(phone support) when there are email problems.

I am not arguing any of the privacy issues or any other reasons to dislike gmail, just partial to google for the reliability and its free. will take anything else tho Big Grin


RE: How to use Google Apps as your email solution on your system - Illidan - 04-14-2009 09:12 PM

At the moment I created my first e-mail in Google Apps for your Domain, as admin@vecho.de.

I edited the MX Records at my domain hoster and today I edit it then in the bind files. Can I create then in ispCP all email adresses? Also, admin@vecho.de or info@vecho.de or webmaster@subdomain.vecho.de ?