:-)

sender_canonical_maps = unionmap:{ldap:/etc/postfix/ldap-canonical.cf,
ldap:/etc/postfix/ldap-canonical2.cf, tcp:127.0.0.1:10001}

By design, unionmap can produce multiple results separated by comma.
That would be wrong. >
Why not:

sender_canonical_maps = ldap:/etc/postfix/ldap-canonical.cf,
     ldap:/etc/postfix/ldap-canonical2.cf. tcp:127.0.0.1:10001

That produces one result, and it still ensures that each
mapping will be tried.

A good question.
Honestly, there must have been some reason when I configured it a lot of time ago.. I don't remember now ;-) Let me think a little bit and refresh my memory ;-)) However, it has nothing to do with the question.

sender_canonical_classes = envelope_sender
recipient_canonical_maps = tcp:127.0.0.1:10002
recipient_canonical_classes = envelope_recipient, header_recipient

due to some necessary address rewriting based on some LDAP attributes
(postsrsd daemon works of 10001 and 10002 ports). For envelope addresses
as well as the `To:' field everything is fine. The problem concerns the
`From:' field:

Looks like you need to use SRS to rewrite envelopes, and LDAP to
rewrite some headers.

Can you use smtp_generic_maps for the LDAP stuff?

Well, AFAIK smtp_generic_maps works for outgoing mail only (when sending mail to an external system).

We have a very strange configuration "in transition". There is a very old server (postfix2) with no LDAP support and local accounts and its users are being successively migrated to the new LDAP-based infrastructure. Some are being server by the new one (let's say: 5000), while some - the old one (~300). Moreover the new server serves the same domain as the old one and one more. Moreover temporarily some mailing lists are served by mailman, some by postfix - LDAP multivalued attributes and smtpd_restriction_classes / check_sender_access for control; some by the old server, some by the new one.

We're keeping the migration transparent to our users and external senders; users' addresses don't change. They are unaware which server serves them and which one - their recipients or lists. So we're using a very complex re-mappings involving canonicals and virtuals based on LDAP.

In short: we need to rewrite addresses for both remote and local deliveries and AFAIK canonicals are intended for this purpose..?

Best regards,
Marek

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to