:-)

Some users forward their incoming mail to some external mail servers.
Unfortunately AFAIK with no action taken it may result in breaking the
SPF. The solution for this problem I know is rewriting addresses with
SRS (postsrsd). Unfortunately postsrsd uses the same settings as
canonicals do which in my case is inadvisable because I want canonicals
to operate independently of SRS. A few days ago I sent a post regarding
this problem.

What is the problem? Perhaps you are unaware that Postfix canonical
mapping is recursive, and that it can apply multiple mappings.

I've wrote it on 20.11. Again:

The recommended configuration of postsrsd is quite simple and as follows (main.cf):

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-canonical.cf, ldap:/etc/postfix/ldap-canonical2.cf, tcp:127.0.0.1:10001}
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:

For some reasons I'd need to do some rewriting of the `From:' 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:

sender_canonical_maps
sender_canonical_classes

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/ldap-canonical.cf, ldap:/etc/postfix/ldap-canonical2.cf}

for the `From:' field and:

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

for envelope sender (`Return-Path').

Best regards,
Marek

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

Reply via email to