diff --git a/doc/configuration.txt b/doc/configuration.txt index 5054e9827..966bfbad0 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -4600,7 +4600,8 @@ table type {ip | integer | string [len ] | binary [len Creates a new mailer list with the name . It is an @@ -4610,6 +4611,11 @@ mailer : Defines a mailer inside a mailers section. Example: + global + # mailers.lua file as provided in the git repository + # adjust path as needed + lua-load examples/lua/mailers.lua + mailers mymailers mailer smtp1 192.168.0.1:587 mailer smtp2 192.168.0.2:587 diff --git a/src/mailers.c b/src/mailers.c index 905bb6745..50f1e76d3 100644 --- a/src/mailers.c +++ b/src/mailers.c @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include @@ -113,6 +113,10 @@ int init_email_alert(struct mailers *mls, struct proxy *p, char **err) const char *err_str; int i = 0; + if (!send_email_disabled) + ha_warning("Legacy mailers used by %s '%s' will not be supported anymore in version 3.3. You should use Lua to send email-alerts, see 'examples/lua/mailers.lua' file.\n", + proxy_type_str(p), p->id); + if ((queues = calloc(mls->count, sizeof(*queues))) == NULL) { memprintf(err, "out of memory while allocating mailer alerts queues"); goto fail_no_queue;