haproxy/examples/lua
Aurelien DARRAGON 837762e2ee MINOR: mailers: warn if mailers are configured but not actually used
Now that native mailers configuration is only usable with Lua mailers,
Willy noticed that we lack a way to warn the user if mailers were
previously configured on an older version but Lua mailers were not loaded,
which could trick the user into thinking mailers keep working when
transitionning to 3.2 while it is not.

In this patch we add the 'core.use_native_mailers_config()' Lua function
which should be called in Lua script body before making use of
'Proxy:get_mailers()' function to retrieve legacy mailers configuration
from haproxy main config. This way haproxy effectively knows that the
native mailers config is actually being used from Lua (which indicates
user correctly migrated from native mailers to Lua mailers), else if
mailers are configured but not used from Lua then haproxy warns the user
about the fact that they will be ignored unless they are used from Lua.
(e.g.: using the provided 'examples/lua/mailers.lua' to ease transition)
2025-06-27 16:41:18 +02:00
..
event_handler.lua
mailers.lua MINOR: mailers: warn if mailers are configured but not actually used 2025-06-27 16:41:18 +02:00
README
trisdemo.lua BUG/MEDIUM: hlua: Fix receive API for TCP applets to properly handle shutdowns 2025-05-27 07:53:19 +02:00

These files are example lua scripts that can be customized
if necessary.

They can be loaded with the 'lua-load' keyword like this:

    lua-load /path/to/lua_script.lua