On Tue, Mar 22, 2022 at 08:38:39AM +0100, Arrigo Triulzi wrote:
I was hoping to be able to use a transport re-write but if I set it up it is
ignored because of the virtual domain settings.
Please show real configs.
On 05.04.22 17:32, Arrigo Triulzi wrote:
Yes, I apologise, I should have done this. Please also excuse the late reply.
main.cf:
parent_domain_matches_subdomains =
relay_domains:
example.com exists
relay_rcipient_maps:
[email protected] exists
[email protected] exists
transport_maps:
example.com smtp:exchange
list.example.com smtp:list
virtual_alias_maps:
[email protected] [email protected]
This ought to work.
...what's the point of quoting own mail?
I can see how this would work but it would mean having a list of all the
valid recipients in relay_recipient_maps which I can’t (trivially) have…
what I had tried so far was:
- main.cf:
virtual_alias_domains = hash:/etc/postfix/virtual_domains
virtual_alias_maps = hash:/etc/postfix/virtual
- virtual_domains:
example.cloud
- virtual:
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
These addresses in @example.cloud should get mapped to ops.example.com
@example.cloud @example-cloud.mail.protection.outlook.com
Virtual_alias_maps is supposed to map into other email addresses.
Looks like you create invalid alias.
Which, according to a bit of Exchange documentation, should have worked
because @example-cloud.mail… is mapped to @exmaple.cloud.
example-cloud.mail is not mentioned here.
This is actually not true, you need to have another domain defined as,
for example, @exampledev.onmicrosoft.com. So, change that to read:
- virtual:
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
@example.cloud @exampledev.onmicrosoft.com
This now delivers everything just fine but it turns out that if you have
both users and aliases on Exchange then the users are delivered but
aliases fail as they are expected to be set to [email protected] and the
other domain is only valid for “real” users.
I don't understand what you are talking about. Postfix redirects a few
addresses locally, but the rest should be forwarded to exchange.
I have no idea how does this resolve:
@example.cloud @exampledev.onmicrosoft.com
but obviously not the way you expect it to.
At which point I thought I’d use transport so I added
transport_maps = hash:/etc/postfix/transport
- transport:
example.cloud smtp:[example-cloud.mail.protection.outlook.com]
And removed the `@example.cloud` catch-all from virtual above. The (wrong)
logic was that in the absence of a virtual map this would fall-through to
the transport and be relayed correctly. In retrospect it is obvious it
won’t work because the virtual_ stuff takes care of the whole virtual
domain and expects all the details. virtual_transport does not do the
trick either, of course, because the whole virtual_ stuff assumes that we
are doing either re-writing or local delivery.
the wrong logic was that you expected to remotely deliver mail to domain
listed in virtual_alias_domains remotely, while it's by definition domain
handled locally (that's what virtual_alias_domains means).
- put "example.cloud" into relay_domains.
- Don't try to define @example.cloud catchall.
- You may want to have username maps in example.cloud do you don't accept
and forward non-existing addresses (I did this using LDAP lookups into the
customer's Active Directory)
that should work.
--
Matus UHLAR - fantomas, [email protected] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Atheism is a non-prophet organization.