HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=16)
-   -   ISP Config 2: From POP3/SMTP to GMail/Google (http://www.howtoforge.com/forums/showthread.php?t=54911)

_X_ 12th November 2011 16:58

ISP Config 2: From POP3/SMTP to GMail/Google
 
I have fully functional ISP Config 2 server (ubuntu) on one IP/Domain and second IP/Domains for shared hosting.

On second IP(shared) there is Domain (MyDomain.com) that used local mail server (postfix) for years without any problem and with all records set. They want to move mail to GMail/Google. All steps that I know of are in order but mail is not working so I'm missing something. Here is what I have done so far.

1) IPS Manager/Sites/MyDomain Site
Co-Domains:
Domain: MyDomain.com
Options: Mailserver: External Mailserver
2) DNS Manager/MyDomain.com/Records
aspmx.l.google.com.
alt1.aspmx.l.google.com.
alt2.aspmx.l.google.com.
aspmx2.googlemail.com.
aspmx3.googlemail.com.
3) in named.conf there is:
zone "mydomain.com" {
type master;
file "pri.mydomain.com";
};
4) in pri.mydomain.com there is:
$TTL 86400
@ IN SOA not shared IP. mydomain.mydomain.com. (
2011111201 ; serial, todays date + todays serial #
28800 ; refresh, seconds
7200 ; retry, seconds
604800 ; expire, seconds
86400 ) ; minimum, seconds
;
NS IP of server that is not shared IP. ; Inet Address of name server 1
NS nameserver.com. ; Inet Address of name server 2
;

MX 10 aspmx.l.google.com.
MX 20 alt1.aspmx.l.google.com.
MX 20 alt2.aspmx.l.google.com.
MX 50 aspmx2.googlemail.com.
MX 50 aspmx3.googlemail.com.

mydomain.com. A mydomain IP
www A mydomain IP

mydomain.com. TXT "v=spf1 a mx ptr ~all"

;;;; MAKE MANUAL ENTRIES BELOW THIS LINE! ;;;;

5) dig mx mydomain.com gives:
; <<>> DiG 9.4.2-P2.1 <<>> mx mydomain.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 33901
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;mydomain.com. IN MX

;; ANSWER SECTION:
mydomain.com. 2118 IN MX 10 mail.mydomain.com.

;; Query time: 1 msec
;; SERVER: someIP#53(someIP)
;; WHEN: Sat Nov 12 15:55:41 2011
;; MSG SIZE rcvd: 51

6) local-host-names is:

###################################
#
# ISPConfig local-host-names Configuration File
# Version 1.0
#
###################################
localhost
maindomain.com
localhost.maindomain.com
localhost.com
localhost.localdomain
mail.mydomain.com
forum.mydomain.com
#### MAKE MANUAL ENTRIES BELOW THIS LINE! ####


something is wrong and I cannot see it, although it is probably screaming and jumping in front of me :)
bold section is problem I know, but dont know where does it came from :)

_X_ 12th November 2011 17:17

6a) After ALL Recycle Bins were emptied local-host-names is:

###################################
#
# ISPConfig local-host-names Configuration File
# Version 1.0
#
###################################
localhost
maindomain.com
localhost.maindomain.com
localhost.com
localhost.localdomain
#### MAKE MANUAL ENTRIES BELOW THIS LINE! ####

_X_ 12th November 2011 20:03

7) Found that I need to add to DNS Manager/MyDomain.com/Records
CNAME:
Hostname: mail
Target: ghs.google.com

but that did not change much. still getting

Diagnostic-Code: smtp;554 5.7.1 <user@mydomain.com>: Relay access denied

_X_ 12th November 2011 23:44

Tried to get all back to Local MailServer but still get same error?

Deleted google MX records and set all to Internal MailServer.

EDIT: Found error in DNS. Now local mail delivery works.

_X_ 13th November 2011 00:01

After I got local mail delivery working again here is what I have done to make it work with Google Mail/Apps

- Added MX records as needed for mydomain.com
- switched to External MailServer for domain and co-domain.

Is there something else that needs to be done?

_X_ 13th November 2011 00:32

So, with MX records for google added and local MX record with priority 90, changing to local mailserver everything works, and changing to external mailserver on both places does not work?

postfix does not relay according to MX records?

_X_ 13th November 2011 01:47

even with mail.mydomain.com defined (without DNS and MX records, just for mydomain.com) it does not work. Mail is not relayed to MX records with lower priority (<90) which are google.com urls.

pri.mydomain.com looks like

MX 90 mail.mydomain.com.
MX 40 ASPMX3.GOOGLEMAIL.COM.
MX 40 ASPMX2.GOOGLEMAIL.COM.
MX 20 ALT2.ASPMX.L.GOOGLE.COM.
MX 20 ALT1.ASPMX.L.GOOGLE.COM.
MX 10 ASPMX.L.GOOGLE.COM.

mydomain.com. A 111.222.333.444
www A 111.222.333.444

mydomain.com. TXT "v=spf1 a mx ptr ~all"

do I need A record for mail.mydomain.com?

falko 13th November 2011 12:51

Yes, you need an A record for mail.mydomain.com.

_X_ 13th November 2011 15:54

Thanks for reply, but with or without A record for mail.mydomain.com and MX records set, I cannot change MX records for domain as it looks like there are some errors in DNS records at my provider DNS server. No matter what and how I set A, MX and CNAME records there is always only one MX record pointing to mail.mydomain.com with priority 10.

falko 14th November 2011 11:06

Did you check your domain at www.intodns.com ?


All times are GMT +2. The time now is 03:59.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.