mirror of
https://github.com/vdukhovni/postfix
synced 2025-08-23 18:37:52 +00:00
postfix-3.4-20180401
This commit is contained in:
parent
61fe98610d
commit
787f2e15f7
@ -23342,3 +23342,24 @@ Apologies for any names omitted.
|
|||||||
built-in or service-defined parameters for ldap, *sql, etc.
|
built-in or service-defined parameters for ldap, *sql, etc.
|
||||||
database names. Problem reported by Christian Rößner. Files:
|
database names. Problem reported by Christian Rößner. Files:
|
||||||
postconf/postconf_user.c.
|
postconf/postconf_user.c.
|
||||||
|
|
||||||
|
20180224
|
||||||
|
|
||||||
|
Workaround: postconf build did not abort if the m4 command
|
||||||
|
is not installed (on a system that does have the make command,
|
||||||
|
the awk command, the perl command, and the C compiler?!).
|
||||||
|
File: postconf/extract_cfg.sh.
|
||||||
|
|
||||||
|
20180303
|
||||||
|
|
||||||
|
Portability: slight differences between MySQL and MariaDB.
|
||||||
|
Olli Hauer. File: global/dict_mysql.c.
|
||||||
|
|
||||||
|
20180306
|
||||||
|
|
||||||
|
Bugfix (introduced: 19990302): when luser_relay specifies
|
||||||
|
a non-existent local address, the luser_relay feature becomes
|
||||||
|
a black hole. Reported by Jørgen Thomsen. File: local/unknown.c.
|
||||||
|
|
||||||
|
Portability: FreeBSD 11 is supported. Files: makedefs,
|
||||||
|
util/sys_defs.h.
|
||||||
|
@ -287,6 +287,15 @@ case "$SYSTEM.$RELEASE" in
|
|||||||
: ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
|
: ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
|
||||||
: ${PLUGIN_LD="${CC} -shared"}
|
: ${PLUGIN_LD="${CC} -shared"}
|
||||||
;;
|
;;
|
||||||
|
FreeBSD.11*) SYSTYPE=FREEBSD11
|
||||||
|
: ${CC=cc}
|
||||||
|
: ${SHLIB_SUFFIX=.so}
|
||||||
|
: ${SHLIB_CFLAGS=-fPIC}
|
||||||
|
: ${SHLIB_LD="${CC} -shared"' -Wl,-soname,${LIB}'}
|
||||||
|
: ${SHLIB_RPATH='-Wl,-rpath,${SHLIB_DIR}'}
|
||||||
|
: ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
|
||||||
|
: ${PLUGIN_LD="${CC} -shared"}
|
||||||
|
;;
|
||||||
DragonFly.*) SYSTYPE=DRAGONFLY
|
DragonFly.*) SYSTYPE=DRAGONFLY
|
||||||
;;
|
;;
|
||||||
OpenBSD.2*) SYSTYPE=OPENBSD2
|
OpenBSD.2*) SYSTYPE=OPENBSD2
|
||||||
|
@ -198,6 +198,14 @@
|
|||||||
|
|
||||||
#include "dict_mysql.h"
|
#include "dict_mysql.h"
|
||||||
|
|
||||||
|
/* MySQL 8.x API change */
|
||||||
|
|
||||||
|
#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 50023
|
||||||
|
#define DICT_MYSQL_SSL_VERIFY_SERVER_CERT MYSQL_OPT_SSL_VERIFY_SERVER_CERT
|
||||||
|
#elif MYSQL_VERSION_ID >= 80000
|
||||||
|
#define DICT_MYSQL_SSL_VERIFY_SERVER_CERT MYSQL_OPT_SSL_MODE
|
||||||
|
#endif
|
||||||
|
|
||||||
/* need some structs to help organize things */
|
/* need some structs to help organize things */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
MYSQL *db;
|
MYSQL *db;
|
||||||
@ -237,7 +245,7 @@ typedef struct {
|
|||||||
char *tls_CAfile;
|
char *tls_CAfile;
|
||||||
char *tls_CApath;
|
char *tls_CApath;
|
||||||
char *tls_ciphers;
|
char *tls_ciphers;
|
||||||
#if MYSQL_VERSION_ID >= 50023
|
#if defined(DICT_MYSQL_SSL_VERIFY_SERVER_CERT)
|
||||||
int tls_verify_cert;
|
int tls_verify_cert;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@ -656,9 +664,9 @@ static void plmysql_connect_single(DICT_MYSQL *dict_mysql, HOST *host)
|
|||||||
dict_mysql->tls_key_file, dict_mysql->tls_cert_file,
|
dict_mysql->tls_key_file, dict_mysql->tls_cert_file,
|
||||||
dict_mysql->tls_CAfile, dict_mysql->tls_CApath,
|
dict_mysql->tls_CAfile, dict_mysql->tls_CApath,
|
||||||
dict_mysql->tls_ciphers);
|
dict_mysql->tls_ciphers);
|
||||||
#if MYSQL_VERSION_ID >= 50023
|
#if defined(DICT_MYSQL_SSL_VERIFY_SERVER_CERT)
|
||||||
if (dict_mysql->tls_verify_cert != -1)
|
if (dict_mysql->tls_verify_cert != -1)
|
||||||
mysql_options(host->db, MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
|
mysql_options(host->db, DICT_MYSQL_SSL_VERIFY_SERVER_CERT,
|
||||||
&dict_mysql->tls_verify_cert);
|
&dict_mysql->tls_verify_cert);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@ -723,7 +731,7 @@ static void mysql_parse_config(DICT_MYSQL *dict_mysql, const char *mysqlcf)
|
|||||||
dict_mysql->tls_CAfile = cfg_get_str(p, "tls_CAfile", NULL, 0, 0);
|
dict_mysql->tls_CAfile = cfg_get_str(p, "tls_CAfile", NULL, 0, 0);
|
||||||
dict_mysql->tls_CApath = cfg_get_str(p, "tls_CApath", NULL, 0, 0);
|
dict_mysql->tls_CApath = cfg_get_str(p, "tls_CApath", NULL, 0, 0);
|
||||||
dict_mysql->tls_ciphers = cfg_get_str(p, "tls_ciphers", NULL, 0, 0);
|
dict_mysql->tls_ciphers = cfg_get_str(p, "tls_ciphers", NULL, 0, 0);
|
||||||
#if MYSQL_VERSION_ID >= 50023
|
#if defined(DICT_MYSQL_SSL_VERIFY_SERVER_CERT)
|
||||||
dict_mysql->tls_verify_cert = cfg_get_bool(p, "tls_verify_cert", -1);
|
dict_mysql->tls_verify_cert = cfg_get_bool(p, "tls_verify_cert", -1);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
* Patches change both the patchlevel and the release date. Snapshots have no
|
* Patches change both the patchlevel and the release date. Snapshots have no
|
||||||
* patchlevel; they change the release date only.
|
* patchlevel; they change the release date only.
|
||||||
*/
|
*/
|
||||||
#define MAIL_RELEASE_DATE "20180222"
|
#define MAIL_RELEASE_DATE "20180401"
|
||||||
#define MAIL_VERSION_NUMBER "3.4"
|
#define MAIL_VERSION_NUMBER "3.4"
|
||||||
|
|
||||||
#ifdef SNAPSHOT
|
#ifdef SNAPSHOT
|
||||||
|
@ -651,6 +651,7 @@ unknown.o: ../../include/argv.h
|
|||||||
unknown.o: ../../include/attr.h
|
unknown.o: ../../include/attr.h
|
||||||
unknown.o: ../../include/been_here.h
|
unknown.o: ../../include/been_here.h
|
||||||
unknown.o: ../../include/bounce.h
|
unknown.o: ../../include/bounce.h
|
||||||
|
unknown.o: ../../include/canon_addr.h
|
||||||
unknown.o: ../../include/check_arg.h
|
unknown.o: ../../include/check_arg.h
|
||||||
unknown.o: ../../include/defer.h
|
unknown.o: ../../include/defer.h
|
||||||
unknown.o: ../../include/deliver_pass.h
|
unknown.o: ../../include/deliver_pass.h
|
||||||
|
@ -73,11 +73,14 @@
|
|||||||
#include <sent.h>
|
#include <sent.h>
|
||||||
#include <deliver_pass.h>
|
#include <deliver_pass.h>
|
||||||
#include <defer.h>
|
#include <defer.h>
|
||||||
|
#include <canon_addr.h>
|
||||||
|
|
||||||
/* Application-specific. */
|
/* Application-specific. */
|
||||||
|
|
||||||
#include "local.h"
|
#include "local.h"
|
||||||
|
|
||||||
|
#define STREQ(x,y) (strcasecmp((x),(y)) == 0)
|
||||||
|
|
||||||
/* deliver_unknown - delivery for unknown recipients */
|
/* deliver_unknown - delivery for unknown recipients */
|
||||||
|
|
||||||
int deliver_unknown(LOCAL_STATE state, USER_ATTR usr_attr)
|
int deliver_unknown(LOCAL_STATE state, USER_ATTR usr_attr)
|
||||||
@ -85,6 +88,7 @@ int deliver_unknown(LOCAL_STATE state, USER_ATTR usr_attr)
|
|||||||
const char *myname = "deliver_unknown";
|
const char *myname = "deliver_unknown";
|
||||||
int status;
|
int status;
|
||||||
VSTRING *expand_luser;
|
VSTRING *expand_luser;
|
||||||
|
VSTRING *canon_luser;
|
||||||
static MAPS *transp_maps;
|
static MAPS *transp_maps;
|
||||||
const char *map_transport;
|
const char *map_transport;
|
||||||
|
|
||||||
@ -139,8 +143,20 @@ int deliver_unknown(LOCAL_STATE state, USER_ATTR usr_attr)
|
|||||||
if (*var_luser_relay) {
|
if (*var_luser_relay) {
|
||||||
state.msg_attr.unmatched = 0;
|
state.msg_attr.unmatched = 0;
|
||||||
expand_luser = vstring_alloc(100);
|
expand_luser = vstring_alloc(100);
|
||||||
|
canon_luser = vstring_alloc(100);
|
||||||
local_expand(expand_luser, var_luser_relay, &state, &usr_attr, (void *) 0);
|
local_expand(expand_luser, var_luser_relay, &state, &usr_attr, (void *) 0);
|
||||||
status = deliver_resolve_addr(state, usr_attr, STR(expand_luser));
|
/* In case luser_relay specifies a domain-less address. */
|
||||||
|
canon_addr_external(canon_luser, vstring_str(expand_luser));
|
||||||
|
/* Assumes that the address resolver won't change the address. */
|
||||||
|
if (STREQ(vstring_str(canon_luser), state.msg_attr.rcpt.address)) {
|
||||||
|
dsb_simple(state.msg_attr.why, "5.1.1",
|
||||||
|
"unknown user: \"%s\"", state.msg_attr.user);
|
||||||
|
status = bounce_append(BOUNCE_FLAGS(state.request),
|
||||||
|
BOUNCE_ATTR(state.msg_attr));
|
||||||
|
} else {
|
||||||
|
status = deliver_resolve_addr(state, usr_attr, STR(expand_luser));
|
||||||
|
}
|
||||||
|
vstring_free(canon_luser);
|
||||||
vstring_free(expand_luser);
|
vstring_free(expand_luser);
|
||||||
return (status);
|
return (status);
|
||||||
}
|
}
|
||||||
@ -149,8 +165,6 @@ int deliver_unknown(LOCAL_STATE state, USER_ATTR usr_attr)
|
|||||||
* If no alias was found for a required reserved name, toss the message
|
* If no alias was found for a required reserved name, toss the message
|
||||||
* into the bit bucket, and issue a warning instead.
|
* into the bit bucket, and issue a warning instead.
|
||||||
*/
|
*/
|
||||||
#define STREQ(x,y) (strcasecmp(x,y) == 0)
|
|
||||||
|
|
||||||
if (STREQ(state.msg_attr.user, MAIL_ADDR_MAIL_DAEMON)
|
if (STREQ(state.msg_attr.user, MAIL_ADDR_MAIL_DAEMON)
|
||||||
|| STREQ(state.msg_attr.user, MAIL_ADDR_POSTMASTER)) {
|
|| STREQ(state.msg_attr.user, MAIL_ADDR_POSTMASTER)) {
|
||||||
msg_warn("required alias not found: %s", state.msg_attr.user);
|
msg_warn("required alias not found: %s", state.msg_attr.user);
|
||||||
|
@ -38,6 +38,9 @@
|
|||||||
# New York, NY 10011, USA
|
# New York, NY 10011, USA
|
||||||
#--
|
#--
|
||||||
|
|
||||||
|
# In case not installed.
|
||||||
|
m4 </dev/null || exit 1
|
||||||
|
|
||||||
# Flags to add db_common parameter names.
|
# Flags to add db_common parameter names.
|
||||||
add_legacy_sql_query_params=
|
add_legacy_sql_query_params=
|
||||||
add_domain_param=
|
add_domain_param=
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#if defined(FREEBSD2) || defined(FREEBSD3) || defined(FREEBSD4) \
|
#if defined(FREEBSD2) || defined(FREEBSD3) || defined(FREEBSD4) \
|
||||||
|| defined(FREEBSD5) || defined(FREEBSD6) || defined(FREEBSD7) \
|
|| defined(FREEBSD5) || defined(FREEBSD6) || defined(FREEBSD7) \
|
||||||
|| defined(FREEBSD8) || defined(FREEBSD9) || defined(FREEBSD10) \
|
|| defined(FREEBSD8) || defined(FREEBSD9) || defined(FREEBSD10) \
|
||||||
|
|| defined(FREEBSD11) \
|
||||||
|| defined(BSDI2) || defined(BSDI3) || defined(BSDI4) \
|
|| defined(BSDI2) || defined(BSDI3) || defined(BSDI4) \
|
||||||
|| defined(OPENBSD2) || defined(OPENBSD3) || defined(OPENBSD4) \
|
|| defined(OPENBSD2) || defined(OPENBSD3) || defined(OPENBSD4) \
|
||||||
|| defined(OPENBSD5) || defined(OPENBSD6) \
|
|| defined(OPENBSD5) || defined(OPENBSD6) \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user