From: Aravind Divakaran on


HI

I have configured my mailserver with fetchmail and postfix.
Mails will come primarly to Google apps then i will fetch the mails to
my localserver and user will send mail to outside from the localserver
relaying through Google apps. Two virtual domains are configured in the
server and users are created in the ldap. I have created the user in the
ldap for which the mail has to be fetched but we have some more users in
our domain. When we try to send the mails to other users it is not
sending to Google apps instead the mailserver is giving "User unknown in
virtual mailbox table" as the user is not present in the ldap. Is there
a way to configure my postfix server to forward all the user unknown
mails for the virtual domains to the Google apps.

--
Rgds,

Aravind M
D
aravind.divakaran(a)yukthi.com
Helpdesk Team
Yukthi Systems Pvt Ltd
Ph:-
08042351119 08042351120
From: Walter Pinto on
I'm having a hard time understanding your setup. From what I can
gather, you're MX records point to google, incoming mail is then
fetched from google to your local server where you have added matching
users via ldap, but you wish to forward it BACK to google??

From: Aravind Divakaran on
On Wed, 11 Aug 2010 22:48:50 -0700, Walter Pinto <walter(a)amhosting.com>
wrote:
> I'm having a hard time understanding your setup. From what I can
> gather, you're MX records point to google, incoming mail is then
> fetched from google to your local server where you have added matching
> users via ldap, but you wish to forward it BACK to google??

Yes you are right but what i needed is suppose my domain has four users
user1,user2,user3,user4. I need user1 and user2 mails to be fetched from
Google and drop to my local server. When i am sending the mails from
locally to user1 and user2 it has to be dropped locally and when i am
sending the mail to user3 and user4 it has to be forwarded to Google
server. What i need is without creating the user3 and user4 locally
whether there is an option in postfix to forward the mails to Google
server if my local server is saying "User Unknown in Virtual Mailbox
table". In my scenario there are almost 1500 users are their and i need
to fetch only 10 or 20 users mails to local server all the other user
account will be in Google only. I dont want to create all these 1500
users locally and put transport maps for non fetchmail users. Instead
when mail comes to fetchmail users it has to be send locally and all the
other users mail has to be forwarded to Google server.

--
Rgds,

Aravind M D
aravind.divakaran(a)yukthi.com
Helpdesk Team
Yukthi Systems Pvt Ltd
Ph:- 08042351119 08042351120

From: Erwan David on
Aravind Divakaran wrote:
> On Wed, 11 Aug 2010 22:48:50 -0700, Walter Pinto <walter(a)amhosting.com>
> wrote:
>> I'm having a hard time understanding your setup. From what I can
>> gather, you're MX records point to google, incoming mail is then
>> fetched from google to your local server where you have added matching
>> users via ldap, but you wish to forward it BACK to google??
>
> Yes you are right but what i needed is suppose my domain has four users
> user1,user2,user3,user4. I need user1 and user2 mails to be fetched from
> Google and drop to my local server. When i am sending the mails from
> locally to user1 and user2 it has to be dropped locally and when i am
> sending the mail to user3 and user4 it has to be forwarded to Google
> server. What i need is without creating the user3 and user4 locally
> whether there is an option in postfix to forward the mails to Google
> server if my local server is saying "User Unknown in Virtual Mailbox
> table". In my scenario there are almost 1500 users are their and i need
> to fetch only 10 or 20 users mails to local server all the other user
> account will be in Google only. I dont want to create all these 1500
> users locally and put transport maps for non fetchmail users. Instead
> when mail comes to fetchmail users it has to be send locally and all the
> other users mail has to be forwarded to Google server.
>

From what I understand you might achieve this by considering your
(public) domain as a foreign domain in your postfix.

Your postfix then uses a local private domain (my-own.internal.domain)

with local users user1 and user2. use fetchmail or equivalent to fetch
mail for user1 and user2, delivering to user1(a)my-own.internal.domain or
user2(a)my-own.internal.domain

Add a virtual alias (but do not declare your public domain as a
virtual_alias_domain) mapping user1(a)your.public.domain to
user1(a)my-own.internal.domain (and same for user2).

it now should work.

--
Erwan