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

I have postfix set-up on my Debian VPS, I can:

  • send emails
  • receive emails

on my server

But forwarding emails from my server to gmail does not work!

I configured google's DNS through /etc/resolv.conf

I can ping and with dig I also find gmail MX records. But when my server tries to forward email to gmail (setup with /etc/aliases) I get the following error:

postfix/smtp[20280]: 825E117BA8A80: to=<>, orig_to=<xxx@xxx.yyy>, relay=none, delay=40, delays=0/0.01/40/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for type=MX: Host not found, try again)

What am I missing? Any help will be greatly appreciated!

share|improve this question
Is there any particular reason you have to modify resolv.conf? – thinice Jun 30 '12 at 19:41

You are almost certainly running with postfix chrooted. You need to copy /etc/resolv.conf into the chroot as well. On Debian that should be /var/spool/postfix/ - so /var/spool/postfix/etc/resolv.conf.

You may want to check that you don't have SYNC_CHROOT turned off in /etc/default/postfix - it default's to yes - so just stopping and starting postfix with the init script should copy the new /etc/resolv.conf into the right location:

/etc/init.d/postfix stop /etc/init.d/postfix start

You can check if you are running chrooted by looking for any 'y' in the chroot column in /etc/postfix/

share|improve this answer

Your name resolution setup is broken. Repair it. First have a look into /etc/resolv.conf.

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.