Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


Email MX service is on BUT using google mail service. A domain (web service) are on different IP address than google mail service on VPS host and on the same domain name

host has address   <--- VPS server, WEB service mail is handled by 5 mail is handled by 1 mail is handled by 5 mail is handled by 10 mail is handled by 10

host -t mx mail is handled by 5 mail is handled by 1 mail is handled by 5 mail is handled by 10 mail is handled by 10

On a same domain we are using MX service google mail service.

PROBLEM: On a VPS server has address a VPS server can't send an email to another as a same domain.

WHAT I WANT? Using mail service MX from googlemail and VPS from another IP address.

And dig -t

; <<>> DiG 9.9.2-P1 <<>> ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8318 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 512 ;; QUESTION SECTION: ; IN A


;; Query time: 208 msec ;; SERVER: ;; WHEN: Sun Jul 7 13:25:21 2013 ;; MSG SIZE rcvd: 52

Sending mail from google service can send to ALL. Send mail from VPS server can send to ALL EXCEPT on the

Hint: CentOS using Plesk service with full VPS SSH access. What is best solution for working mail service on both and that can VPS send mail service on a same domain?

share|improve this question
What do the mail logs on the VPS server say? – Jenny D Jul 7 '13 at 12:18
Nothing in /var/log/maillog -rw------- 1 root root 0 Srp 7 00:42 maillog -rw------- 1 root root 0 Srp 1 00:42 maillog.1 -rw------- 1 root root 0 Lip 23 00:41 maillog.2 -rw------- 1 root root 0 Lip 17 00:40 maillog.3 -rw------- 1 root root 0 Lip 9 00:40 maillog.4 – Marin Sagovac Jul 7 '13 at 12:34
Now I added into nto VPS MX record. Waiting for propagation. – Marin Sagovac Jul 7 '13 at 12:34
Why is downvoted me? – Marin Sagovac Jul 7 '13 at 13:12
up vote 0 down vote accepted

Solved using SMTP to connect another host and PHPMailer.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.