That was quick, thanks!

Regards,
Chris

On 06/14/2021 4:22 pm, Wietse Venema wrote:
Wietse Venema:
Christopher Gurnee:
> Workaround
> ----------
>
> Use a hash table:
>      tls_server_sni_maps = hash:/etc/postfix/tls_server_sni
> and create it with:
>      sudo postmap -F /etc/postfix/tls_server_sni

There is some code that was added to postmap/postmap.c but not to
util/dict_thash.c. This is a bit more than I can do while
reading email. Expect to see some patch in a day or so.

This should work.

        Wietse

--- /var/tmp/postfix-3.7-20210612/src/util/dict_thash.c 2017-12-27
17:29:45.000000000 -0500
+++ src/util/dict_thash.c       2021-06-14 16:10:11.323422125 -0400
@@ -180,6 +181,24 @@
                         " is this an alias file?", path, lineno);

            /*
+ * Optionally treat the value as a filename, and replace the value
+            * with the BASE64-encoded content of the named file.
+            */
+           if (dict_flags & DICT_FLAG_SRC_RHS_IS_FILE) {
+               VSTRING *base64_buf;
+               char   *err;
+
+               if ((base64_buf = dict_file_to_b64(dict, value)) == 0) {
+                   err = dict_file_get_error(dict);
+                   msg_warn("%s, line %d: %s: skipping this entry",
+                            VSTREAM_PATH(fp), lineno, err);
+                   myfree(err);
+                   continue;
+               }
+               value = vstring_str(base64_buf);
+           }
+
+           /*
             * Store the value under the key. Handle duplicates
             * appropriately. XXX Move this into dict_ht, but 1) that map
             * ignores duplicates by default and we would have to check that

Reply via email to