Viktor Dukhovni via Postfix-users: > On Sat, Aug 12, 2023 at 08:05:52PM -0400, Wietse Venema via Postfix-users > wrote: > > > My preference would be: > > > > smtp_sasl_password_map_result_delimiter > > printable character or C escape (like \t for TAB) > > default = : (for backwards compatibility) > > must not be empty > > must not be multiple characters > > > > I think that TAB would be safe for your case, unlikely to conflict > > with anything in a username or password. > > My vote is for this one. > > > There are other approaches, like protecting text with quotes, like > > "foo:bar":password, or prepending a length to each field value, like > > 7:foo:bar8:password. > > Any votes for JSON? :-) > > { "account": "user:foo", "base64password": "AAAABBBBCCCC" }
Before other people start to chime in, let me set some expectations. 1: Generating JSON is easy. For an example, see the postqueue source code. 2: Parsing JSON is not easy, and it's not just syntax. C is a statically-typed language, so the options are: 2a: Generate a parser from a static C structure definition. Then the C code remains simple because it just accesses a struct field. 2b: Represent JSON as a parse tree, and provide library support to navigate the result. This means that the application code is more complex because it has to call navigation functions instead of accessing a struct field. 2c: ... 3: JSON support is not part of C, not part of the standard C library, and not available on Postfix supported platforms like OpenSSL is. 4: I would be reluctant to add an external dependency on Joe Random GitHub User's repo. Wietse _______________________________________________ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org