Canonicals and SRS

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Canonicals and SRS

Marek Kozlowski-2

Due to SPF restrictions I'm interested in SRS address rewriting. For
this purpose I'm using postsrsd (do you have any better solution?). The
recommended configuration of postsrsd is quite simple and as follows

sender_canonical_maps = tcp:localhost:10001
sender_canonical_classes = envelope_sender
recipient_canonical_maps = tcp:localhost:10002
recipient_canonical_classes= envelope_recipient,header_recipient

which in my case is:

sender_canonical_maps = unionmap:{ldap:/etc/postfix/,
ldap:/etc/postfix/, tcp:}
sender_canonical_classes = envelope_sender
recipient_canonical_maps = tcp:
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:

For some reasons I'd need to do some rewriting of this field (or
`Reply-To:') based on some subtle LDAP queries' results. Of course I
don't want SRS to modify it. Unfortunately both: canonicals and SRS use
the same postfix configuration parameters:


so I have no idea how to turn on canonical and simultaneously disable
SRS for it. I'm wondering if I could do some canonical-like rewriting
and no SRS. Something like:

sender_canonical_maps = unionmap:{ldap:/etc/postfix/,

for the `From:' field and:

sender_canonical_maps = unionmap:{ldap:/etc/postfix/,
ldap:/etc/postfix/, tcp:}

for envelope sender (`Return-Path').

Any other parameter for this purpose? I believe it is a quite common
case so some solution should exist?

Thanks is advance,
best regards,

smime.p7s (5K) Download Attachment