Current time: 05-01-2024, 12:02 PM Hello There, Guest! (LoginRegister)


Poll: What do you think of this How-to?
Great!
Good
Average
So So
Bad Idea/Completely Wrong
[Show Results]
 
Post Reply 
How to use Google Apps as your email solution on your system
Author Message
wb6vpm Offline
Junior Member
*

Posts: 80
Joined: Oct 2007
Reputation: 0
Post: #1
How to use Google Apps as your email solution on your system
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/how...ate_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.
(This post was last modified: 07-17-2008 08:22 AM by wb6vpm.)
07-02-2008 05:36 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


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

Forum Jump:


User(s) browsing this thread: 1 Guest(s)