On 14/01/2020 18:22, Wietse Venema wrote: >> In section ?What macros will Postfix send to Milters??, MILTER_README >> says: >> >>> As of Sendmail 8.14.0, Milter applications can specify what macros >>> they want to receive at different Milter protocol stages. An >>> application-specified list takes precedence over a Postfix-specified >>> list. >> >> This refers to the API function smfi_setsymlist, right? When I hook a > > The Milter docs say: "This function must only be called during > xxfi_negotiate()". Thus, you cannot call it at any other time. > (found with a Google query, because milter.org is gone).
Yes, I’m using the API correctly, and get the MI_SUCCESS return code. > Postfix test code calls smfi_setsymlist during initial Milter > connection negotiation, through the xxfi_negotiate callback in the > smfiDesc structure. It's been ~10 years, but that code presumably > worked. The program is included with Postfix source as > src/milter/test_milter.c. Maybe you can play with that. I suspect this code doesn’t work and perhaps never did work – in Postfix source there is only one occurrence of smfi_setsymlist, in a code path that is never executed. smfi_setsymlist would be a useful function to have, because it lets milter applications request the macros they need for operation themselves. Just recently there was a thread on this list where someone struggled to set up the required macros for a milter application.