V
V
VlLight2021-12-10 16:28:10
postfix
VlLight, 2021-12-10 16:28:10

How to send a part of outgoing mails for the local domain via the smtp transport in Postfix?

Good afternoon, I apologize, clumsily formulated the question in the title, it does not work out more precisely. The situation is as follows:
There is mail with the domain.ru domain, linked to Google Workspace. Everything works, but there is a need for more mailboxes that do not require Google Workspace functionality, it is enough to send and receive a letter. I do not want to pay for them and I want these mailboxes to be in the same domain.
Google Workspace has a suitable functionality for this, it can redirect mail to domain addresses that are not registered in it, to the specified server. Postfix was installed as the specified server, in which the necessary mailboxes are set through virtual_mailbox_domains and virtual_mailbox_maps, which are accessed using Dovecot and RoundCube. Accordingly, there is a mailbox [email protected], which is served by Google Workspace and [email protected], which is served by Postfix.
- sending from outside to [email protected] - works, Google Workspace receives a letter, distributes it to the right mailbox;
- sending from outside to [email protected] - works, Google Workspace receives the letter, redirects to Postfix, Postfix distributes it to the required mailbox;
- sending from Postfix to [email protected] - works, Postfix distributes to the right mailbox;
- sending from Postfix to [email protected] - does not work as expected, Postfix defines domain.ru as a virtual domain, sends a letter to the virtual transport, but does not find m1 in the list of virtual mailboxes, because he's not there;
That is, with this scheme, Postfix cannot send mail to addresses that are served by Google Workspace. Unfortunately, I did not find a simple way to somehow specify exceptions for certain addresses in Postfix so that it wraps them not in virtual, but in smtp - the transport_maps settings are not used if the letter got into virtual_mailbox_maps.
Maybe there is an easy way?
PS> While writing, I thought that you can raise the second Postfix, which does not know anything about virtual boxes, and specify it in RoundCube as an SMTP server, as an option; but can you get by with one?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question