google apps gmail

Discussion in 'Server Operation' started by v2k, Jul 29, 2009.

  1. v2k

    v2k New Member

    I'm using google's gmail app to manage my server's email.

    So externally, [email protected] goes to google's mail server and that gmail account.

    However, on example.com, if I email to [email protected] it goes to the localhost (as expected).

    How do I get local mail to go to google as well? I'm using postfix on fedora.

    Linux 2.6.23.17-88.fc7 #1 SMP Thu May 15 00:02:29 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
     
  2. falko

    falko Super Moderator Howtoforge Staff

    You must remove example.com from mydestination in /etc/postfix/main.cf.
     
  3. v2k

    v2k New Member

    Thanks, I will try that. This is the only information I found on the subject:

    http://www.postfix.org/STANDARD_CONFIGURATION_README.html

     
  4. v2k

    v2k New Member

    Thanks, your solution worked :)
     
  5. v2k

    v2k New Member

    I'm trying to do this on another server, but I'm not having any luck.

    It's running CentOS 5 with Plesk 9; qmail and postfix; although I'm not sure postfix is being used. I didn't setup the server from scratch, it's a VDS.

    It's hosting "server.com" with a vhost for a subdomain of "example.com"; example.com is hosted elsewhere. So subdomain.example.com is a vhost on server.com

    From "server.com"

    [root@server control]# echo hey | sendmail [email protected]
    [root@server control]# echo hey | sendmail [email protected]

    The 1st line works, the 2nd doesn't - I assume it's because I'm hosting subdomain.example.com on the vhost; at least that's my only guess.

    I'd like to set it up to use gmail to handle all the incoming mail, so I only need to be able to send mail.

    From reading about qmail, I thought the issue would be that local-host-names contained example.com. However, /etc/mail/local-host-names only lists server.com.

    Edit: all the mail sent to example.com sits in the mail queue which is visible in plesk.
     
    Last edited: Aug 12, 2009

Share This Page