Hey!

I'm currently working up a patch for Postfix which implements support for libsrs2 functionality in the Postfix core.

I've gotten to some "design" decisions I'm currently somewhat... undecided about:

1) Rewriting the recipient

Basically, rewriting the recipient (in case of a valid SRS address) is a task for trivial-rewrite, as I gather. smtpd and qmgr talk to trivial-rewrite at some point in time, requesting either a rewrite of the address to "normal" form, or a resolution of the address for mail transport, and I'm not entirely certain where resolution of the recipient to the actual "source" form should be placed.

I'm currently somewhat in favor of placing it in rewrite_tree(), simply because SRS is only a means to "obfuscate" an address, and the deobfuscation of an address bound for the local srs "domain" is generally not a transport resolution thing, but just a "rewriting", but rewrite_tree() currently does not call out to any maps or such. What would "real" Postfix developers do?

2) Rewriting the sender

This part is finished and working (in the patch I'm currently running on one of my testing mailservers), and is implemented directly in smtp, right after the hook that pipes the smtp sender through generics maps. This means that only the SMTP/LMTP transports receive actual treatment for source rewriting, but there's really nothing more protocol-wise that actually requires SRS. Does this make sense?

3) String lists

Is there any API documentation for configuration parameters which are lists of strings, separated by some separator? I currently parse a configuration parameter with strchr() into separate components, but that's error prone, and I guess there's some form of infrastructure that deals with this (for parsing mydestination, etc.).

Anyway, if there's interest in the patch, I'll make it available as soon as I fix up the recipient rewriting stuff, and I'd love to get some feedback on the above. Thanks!

--
--- Heiko.

Reply via email to