I have an email server setup with Postfix, MySQL and Dovecot. I am hosting several virtual domains. I am moving one particular domain to Google Apps. Since, Google Apps has limitations on the number of emails you can send in day, I would like to keep the current server setup to send emails. All users would be accessing their emails using Google Apps. The websites and other applications will use the Postfix server to send emails.

I'm wondering if it is possible to disable local delivery(via Dovecot service) for this particular domain. I have searched the Internet for few hours and haven't found anything relevant. If it is possible to have this set up, I would like to know how.

link|improve this question
feedback

1 Answer

I'm a bit confused about the start of the question but in response to if it's "possible to disable local delivery (via Dovecot service) for this particular domain" this might help:

I think inside /etc/postfix/main.cf that if you're using virtual_alias_domains = me.com you.com then just removing the domain from that line will make Postfix look remotely for delivery if DNS and /etc/hosts etc doesn't tell it otherwise. Do a DNS lookup on that domain's MX records on the Server itself to see where it thinks the MX point.

postfix reload to reload the config should set it live if that's the case.

-edit-

I see what you're after.

Actually it's pretty easy from the Google side: Settings > Accounts > edit info for your outbound e-mail address and configure the settings for authenticated outbound SMTP (this will take a few attempts most likely to get used to how it's laid out).

Then add saslauthd to Postfix and run it over TLS to encrypt the login process so Google's webmail client logs in to be allowed to punt mail through your Server (and anyone with the login and password come to that). Here's a very clear HOWTO, adjust it to your version: Postfix SASL HOWTO

This also has the advantage of your mail appearing to come from your SMTP server directly so other than your MX mentioning Google, and adding SASL's package, nothing has actually changed.

link|improve this answer
Thanks for the response. Let me clarify the situation. The email server is hosting several domains. Let's say example.com, example.net, example.org, etc. I have pointed the mx records for example.com to Google Apps servers. I have asked all users to access their emails using Google Apps. Since Google Apps has limitations for sending emails, our websites and applications still use SMTP of our server to send emails. These applications use SMTP authentication. Therefore, the virtual domain has to exist. The problem I am facing is, emails originating from example.net are delivered locally – Sudheer Apr 4 '11 at 6:43
I would like keep the current configuration and just add one rule to it - stop delivering emails to example.com loocally and have them delivered to Google Apps servers. – Sudheer Apr 4 '11 at 6:45
feedback

Your Answer

 
or
required, but never shown

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