postfix/pointer_to_literals.patch

60 lines
2.5 KiB
Diff
Raw Permalink Normal View History

Index: src/cleanup/cleanup_message.c
===================================================================
--- src/cleanup/cleanup_message.c.orig
+++ src/cleanup/cleanup_message.c
@@ -300,7 +300,7 @@ static const char *cleanup_act(CLEANUP_S
while (*optional_text && ISSPACE(*optional_text))
optional_text++;
-#define STREQUAL(x,y,l) (strncasecmp((x), (y), (l)) == 0 && (y)[l] == 0)
+inline int STREQUAL(const char *x, const char *y, size_t l) { return (strncasecmp((x), (y), (l)) == 0 && (y)[l] == 0); }
#define CLEANUP_ACT_DROP 0
/*
Index: src/local/local_expand.c
===================================================================
--- src/local/local_expand.c.orig
+++ src/local/local_expand.c
@@ -115,7 +115,7 @@ static const char *local_expand_lookup(c
LOCAL_EXP *local = (LOCAL_EXP *) ptr;
static char rcpt_delim[2];
-#define STREQ(x,y) (*(x) == *(y) && strcmp((x), (y)) == 0)
+inline int STREQ(const char *x, const char *y) { return (*(x) == *(y) && strcmp((x), (y)) == 0); }
if (STREQ(name, "user")) {
return (local->state->msg_attr.user);
Index: src/smtpd/smtpd_check.c
===================================================================
--- src/smtpd/smtpd_check.c.orig
+++ src/smtpd/smtpd_check.c
Accepting request 1080180 from home:adkorte:branches:server:mail - update to 3.8.0 * Support to look up DNS SRV records in the Postfix SMTP/LMTP client, Based on code by Tomas Korbar (Red Hat). For example, with "use_srv_lookup = submission" and "relayhost = example.com:submission", the Postfix SMTP client will look up DNS SRV records for _submission._tcp.example.com, and will relay email through the hosts and ports that are specified with those records. * TLS obsolescence: Postfix now treats the "export" and "low" cipher grade settings as "medium". The "export" and "low" grades are no longer supported in OpenSSL 1.1.1, the minimum version required in Postfix 3.6.0 and later. Also, Postfix default settings now exclude deprecated or unused ciphers (SEED, IDEA, 3DES, RC2, RC4, RC5), digest (MD5), key exchange algorithms (DH, ECDH), and public key algorithm (DSS). * Attack resistance: the Postfix SMTP server can now aggregate smtpd_client_*_rate and smtpd_client_*_count statistics by network block instead of by IP address, to raise the bar against a memory exhaustion attack in the anvil(8) server; Postfix TLS support unconditionally disables TLS renegotiation in the middle of an SMTP connection, to avoid a CPU exhaustion attack. * The PostgreSQL client encoding is now configurable with the "encoding" Postfix configuration file attribute. The default is "UTF8". Previously the encoding was hard-coded as "LATIN1", which is not useful in the context of SMTP. * The postconf command now warns for #comment in or after a Postfix parameter value. Postfix programs do not support #comment after other text, and treat that as input. - rebase/refresh patches * pointer_to_literals.patch * postfix-linux45.patch * postfix-master.cf.patch * postfix-ssl-release-buffers.patch * set-default-db-type.patch OBS-URL: https://build.opensuse.org/request/show/1080180 OBS-URL: https://build.opensuse.org/package/show/server:mail/postfix?expand=0&rev=454
2023-04-27 23:59:58 +02:00
@@ -384,6 +384,10 @@ static STRING_LIST *smtpd_acl_perm_log;
#define CONST_STR(x) ((const char *) vstring_str(x))
#define UPDATE_STRING(ptr,val) { if (ptr) myfree(ptr); ptr = mystrdup(val); }
+inline int STREQ(const char *x, const char *y) { return (*(x) == *(y) && strcmp((x), (y)) == 0); }
+inline int STREQUAL(const char *x, const char *y, size_t l) { return (strncasecmp((x), (y), (l)) == 0 && (y)[l] == 0); }
+inline int STREQN(const char *x, const char *y, size_t n) { return (*(x) == *(y) && strncmp((x), (y), (n)) == 0); }
+
/*
* If some decision can't be made due to a temporary error, then change
* other decisions into deferrals.
Accepting request 1080180 from home:adkorte:branches:server:mail - update to 3.8.0 * Support to look up DNS SRV records in the Postfix SMTP/LMTP client, Based on code by Tomas Korbar (Red Hat). For example, with "use_srv_lookup = submission" and "relayhost = example.com:submission", the Postfix SMTP client will look up DNS SRV records for _submission._tcp.example.com, and will relay email through the hosts and ports that are specified with those records. * TLS obsolescence: Postfix now treats the "export" and "low" cipher grade settings as "medium". The "export" and "low" grades are no longer supported in OpenSSL 1.1.1, the minimum version required in Postfix 3.6.0 and later. Also, Postfix default settings now exclude deprecated or unused ciphers (SEED, IDEA, 3DES, RC2, RC4, RC5), digest (MD5), key exchange algorithms (DH, ECDH), and public key algorithm (DSS). * Attack resistance: the Postfix SMTP server can now aggregate smtpd_client_*_rate and smtpd_client_*_count statistics by network block instead of by IP address, to raise the bar against a memory exhaustion attack in the anvil(8) server; Postfix TLS support unconditionally disables TLS renegotiation in the middle of an SMTP connection, to avoid a CPU exhaustion attack. * The PostgreSQL client encoding is now configurable with the "encoding" Postfix configuration file attribute. The default is "UTF8". Previously the encoding was hard-coded as "LATIN1", which is not useful in the context of SMTP. * The postconf command now warns for #comment in or after a Postfix parameter value. Postfix programs do not support #comment after other text, and treat that as input. - rebase/refresh patches * pointer_to_literals.patch * postfix-linux45.patch * postfix-master.cf.patch * postfix-ssl-release-buffers.patch * set-default-db-type.patch OBS-URL: https://build.opensuse.org/request/show/1080180 OBS-URL: https://build.opensuse.org/package/show/server:mail/postfix?expand=0&rev=454
2023-04-27 23:59:58 +02:00
@@ -2395,8 +2399,6 @@ static int check_table_result(SMTPD_STAT
if (msg_verbose)
msg_info("%s: %s %s %s", myname, table, value, datum);
-#define STREQUAL(x,y,l) (strncasecmp((x), (y), (l)) == 0 && (y)[l] == 0)
-
/*
* DUNNO means skip this table. Silently ignore optional text.
*/
Accepting request 1080180 from home:adkorte:branches:server:mail - update to 3.8.0 * Support to look up DNS SRV records in the Postfix SMTP/LMTP client, Based on code by Tomas Korbar (Red Hat). For example, with "use_srv_lookup = submission" and "relayhost = example.com:submission", the Postfix SMTP client will look up DNS SRV records for _submission._tcp.example.com, and will relay email through the hosts and ports that are specified with those records. * TLS obsolescence: Postfix now treats the "export" and "low" cipher grade settings as "medium". The "export" and "low" grades are no longer supported in OpenSSL 1.1.1, the minimum version required in Postfix 3.6.0 and later. Also, Postfix default settings now exclude deprecated or unused ciphers (SEED, IDEA, 3DES, RC2, RC4, RC5), digest (MD5), key exchange algorithms (DH, ECDH), and public key algorithm (DSS). * Attack resistance: the Postfix SMTP server can now aggregate smtpd_client_*_rate and smtpd_client_*_count statistics by network block instead of by IP address, to raise the bar against a memory exhaustion attack in the anvil(8) server; Postfix TLS support unconditionally disables TLS renegotiation in the middle of an SMTP connection, to avoid a CPU exhaustion attack. * The PostgreSQL client encoding is now configurable with the "encoding" Postfix configuration file attribute. The default is "UTF8". Previously the encoding was hard-coded as "LATIN1", which is not useful in the context of SMTP. * The postconf command now warns for #comment in or after a Postfix parameter value. Postfix programs do not support #comment after other text, and treat that as input. - rebase/refresh patches * pointer_to_literals.patch * postfix-linux45.patch * postfix-master.cf.patch * postfix-ssl-release-buffers.patch * set-default-db-type.patch OBS-URL: https://build.opensuse.org/request/show/1080180 OBS-URL: https://build.opensuse.org/package/show/server:mail/postfix?expand=0&rev=454
2023-04-27 23:59:58 +02:00
@@ -3483,8 +3485,6 @@ static const char *rbl_expand_lookup(con
- update to 2.8.2 * DNSBL/DNSWL: o Support for address patterns in DNS blacklist and whitelist lookup results. o The Postfix SMTP server now supports DNS-based whitelisting with several safety features * Support for read-only sqlite database access. * Alias expansion: o Postfix now reports a temporary delivery error when the result of virtual alias expansion would exceed the virtual_alias_recursion_limit or virtual_alias_expansion_limit. o To avoid repeated delivery to mailing lists with pathological nested alias configurations, the local(8) delivery agent now keeps the owner-alias attribute of a parent alias, when delivering mail to a child alias that does not have its own owner alias. * The Postfix SMTP client no longer appends the local domain when looking up a DNS name without ".". * The SMTP server now supports contact information that is appended to "reject" responses: smtpd_reject_footer * Postfix by default no longer adds a "To: undisclosed-recipients:;" header when no recipient specified in the message header. * tls support: o The Postfix SMTP server now always re-computes the SASL mechanism list after successful completion of the STARTTLS command. o The smtpd_starttls_timeout default value is now stress-dependent. o Postfix no longer appends the system-supplied default CA certificates to the lists specified with *_tls_CAfile or with *_tls_CApath. * New feature: Prototype postscreen(8) server that runs a number of time-consuming checks in parallel for all incoming SMTP connections, before clients are allowed to talk to a real Postfix SMTP server. It detects clients that start talking too soon, or clients that appear OBS-URL: https://build.opensuse.org/package/show/server:mail/postfix?expand=0&rev=62
2011-03-31 00:00:52 +02:00
SMTPD_RBL_EXPAND_CONTEXT *rbl_exp = (SMTPD_RBL_EXPAND_CONTEXT *) context;
SMTPD_STATE *state = rbl_exp->state;
- update to 2.8.2 * DNSBL/DNSWL: o Support for address patterns in DNS blacklist and whitelist lookup results. o The Postfix SMTP server now supports DNS-based whitelisting with several safety features * Support for read-only sqlite database access. * Alias expansion: o Postfix now reports a temporary delivery error when the result of virtual alias expansion would exceed the virtual_alias_recursion_limit or virtual_alias_expansion_limit. o To avoid repeated delivery to mailing lists with pathological nested alias configurations, the local(8) delivery agent now keeps the owner-alias attribute of a parent alias, when delivering mail to a child alias that does not have its own owner alias. * The Postfix SMTP client no longer appends the local domain when looking up a DNS name without ".". * The SMTP server now supports contact information that is appended to "reject" responses: smtpd_reject_footer * Postfix by default no longer adds a "To: undisclosed-recipients:;" header when no recipient specified in the message header. * tls support: o The Postfix SMTP server now always re-computes the SASL mechanism list after successful completion of the STARTTLS command. o The smtpd_starttls_timeout default value is now stress-dependent. o Postfix no longer appends the system-supplied default CA certificates to the lists specified with *_tls_CAfile or with *_tls_CApath. * New feature: Prototype postscreen(8) server that runs a number of time-consuming checks in parallel for all incoming SMTP connections, before clients are allowed to talk to a real Postfix SMTP server. It detects clients that start talking too soon, or clients that appear OBS-URL: https://build.opensuse.org/package/show/server:mail/postfix?expand=0&rev=62
2011-03-31 00:00:52 +02:00
-#define STREQ(x,y) (*(x) == *(y) && strcmp((x), (y)) == 0)
-
if (state->expand_buf == 0)
state->expand_buf = vstring_alloc(10);