mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-12-03 00:31:00 +01:00
As mentioned in 2.8 announce on the mailing list [1] and on the wiki [2]
native mailers were deprecated and planned for removal in 3.3. Now is
the time to drop the legacy code for native mailers which is based on a
tcpcheck "hack" and cannot be maintained. Lua mailers should be used as
a drop in replacement. Indeed, "mailers" and associated config directives
are preserved because mailers config is exposed to Lua, which helps smoothing
the transition from native mailers to Lua based ones.
As a reminder, to keep mailers configuration working as before without
making changes to the config file, simply add the line below to the global
section:
lua-load examples/lua/mailers.lua
mailers.lua script (provided in the git repository, adjust path as needed)
may be customized by users familiar with Lua, by default it emulates the
behavior of the native (now removed) mailers.
[1]: https://www.mail-archive.com/haproxy@formilux.org/msg43600.html
[2]: https://github.com/haproxy/wiki/wiki/Breaking-changes
40 lines
1.3 KiB
C
40 lines
1.3 KiB
C
/*
|
|
* include/haproxy/mailer.h
|
|
* This file lists exported variables and functions for mailers.
|
|
*
|
|
* Copyright 2015 Horms Solutions Ltd., Simon Horman <horms@verge.net.au>
|
|
* Copyright 2020 Willy Tarreau <w@1wt.eu>
|
|
*
|
|
* Based on include/haproxy/peers-t.h
|
|
*
|
|
* Copyright 2010 EXCELIANCE, Emeric Brun <ebrun@exceliance.fr>
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation, version 2.1
|
|
* exclusively.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*/
|
|
|
|
#ifndef _HAPROXY_MAILERS_H
|
|
#define _HAPROXY_MAILERS_H
|
|
|
|
#include <haproxy/mailers-t.h>
|
|
#include <haproxy/proxy-t.h>
|
|
#include <haproxy/server-t.h>
|
|
|
|
extern struct mailers *mailers;
|
|
|
|
int init_email_alert(struct mailers *mailers, struct proxy *p, char **err);
|
|
void free_email_alert(struct proxy *p);
|
|
|
|
#endif /* _HAPROXY_MAILERS_H */
|