-1

I have installed postfix+dovecot+mysql. Everything works fine. But I need to do one specific thing:

If a user doesn't exist (e.g. idontexist@mydomain.tld), then the message needs to be forwarded to google apps. I need to the forward original message (like it was send to g-apps directly), not forward it to some bin@g-apps.

Can somene point me to the solution?

Lucas Kauffman
  • 16,880
  • 9
  • 58
  • 93
DominikM
  • 117
  • 1
  • 1
  • 4

2 Answers2

1

DISCLAIMER: I take no responsibility for the undeliverable bounce messages that will get stuck in your mailqueue as a result of this. adaptr's comment is correct; you should only accept mail you can deliver. Ideally, you should check against the google-apps domain to see if a recipient is valid. If at all possible, do that.

You can use a Perl Compatible Regular Expression's table using TEXT SUBSTITUTION as your last virtual alias map.

84104
  • 12,905
  • 6
  • 45
  • 76
0

You can setup catch-all account in your virtual_alias_maps file.

But this would open a hole for lots of spam.

See http://www.postfix.org/VIRTUAL_README.html#virtual_alias for details.

  • I know about catch-all account. I have one now, but it can be (as far as i know) used only to redirect to specific mail address => Mail originally to bar@mydomain.tld is redirected and send to redirect@another-domain.tld. But what i want is redirect it to google apps account like there is no postfix and redirection. Thank you – DominikM Mar 28 '12 at 13:23
  • What do you mean under 'redirect to google apps account'? – Vadym S. Khondar Mar 28 '12 at 13:54
  • Customer has google apps on his domain and uses it for e-mails. Now he want to use his server (postfix, etc...) as mail server, but only for specific accounts and the users not listed in virtual users on his server should be "redirected" (as i described befeore) to google apps, which he uses now. Is it possible to do this? Thanks. – DominikM Mar 28 '12 at 14:15