From 43399f266f95bed6ce43ba39c55e46b11a077018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Wed, 26 Apr 2023 12:31:07 +0200 Subject: [PATCH 01/55] New version Resolves: rhbz#2187121 --- ...ix-3.7.0-config.patch => postfix-3.8.0-config.patch | 6 +++--- ....7.0-large-fs.patch => postfix-3.8.0-large-fs.patch | 4 ++-- postfix.spec | 10 +++++++--- sources | 2 +- 4 files changed, 13 insertions(+), 9 deletions(-) rename postfix-3.7.0-config.patch => postfix-3.8.0-config.patch (97%) rename postfix-3.7.0-large-fs.patch => postfix-3.8.0-large-fs.patch (92%) diff --git a/postfix-3.7.0-config.patch b/postfix-3.8.0-config.patch similarity index 97% rename from postfix-3.7.0-config.patch rename to postfix-3.8.0-config.patch index d8be512..f77cdc3 100644 --- a/postfix-3.7.0-config.patch +++ b/postfix-3.8.0-config.patch @@ -1,5 +1,5 @@ diff --git a/conf/main.cf b/conf/main.cf -index 47de434..112c1f1 100644 +index 2ee7996..336bd7b 100644 --- a/conf/main.cf +++ b/conf/main.cf @@ -136,6 +136,10 @@ mail_owner = postfix @@ -123,10 +123,10 @@ index 47de434..112c1f1 100644 +# +smtp_tls_security_level = may diff --git a/conf/master.cf b/conf/master.cf -index 83fc6fd..bb0eae9 100644 +index fd282dd..8d969c6 100644 --- a/conf/master.cf +++ b/conf/master.cf -@@ -110,14 +110,14 @@ postlog unix-dgram n - n - 1 postlogd +@@ -112,14 +112,14 @@ postlog unix-dgram n - n - 1 postlogd # Also specify in main.cf: cyrus_destination_recipient_limit=1 # #cyrus unix - n n - - pipe diff --git a/postfix-3.7.0-large-fs.patch b/postfix-3.8.0-large-fs.patch similarity index 92% rename from postfix-3.7.0-large-fs.patch rename to postfix-3.8.0-large-fs.patch index 3c09e5e..b0c7933 100644 --- a/postfix-3.7.0-large-fs.patch +++ b/postfix-3.8.0-large-fs.patch @@ -21,10 +21,10 @@ index 50a4aa7..beef3db 100644 if (msg_verbose) msg_info("%s: %s: block size %lu, blocks free %lu", diff --git a/src/util/sys_defs.h b/src/util/sys_defs.h -index c9ebc33..f2be0e2 100644 +index 1fb449d..bcaac27 100644 --- a/src/util/sys_defs.h +++ b/src/util/sys_defs.h -@@ -771,8 +771,8 @@ extern int initgroups(const char *, int); +@@ -783,8 +783,8 @@ extern int initgroups(const char *, int); #define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0) #define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin" #define FIONREAD_IN_TERMIOS_H diff --git a/postfix.spec b/postfix.spec index d8d1407..3963d7f 100644 --- a/postfix.spec +++ b/postfix.spec @@ -48,7 +48,7 @@ Name: postfix Summary: Postfix Mail Transport Agent -Version: 3.7.4 +Version: 3.8.0 Release: 1%{?dist} Epoch: 2 URL: http://www.postfix.org @@ -89,10 +89,10 @@ Source101: postfix-pam.conf # Patches -Patch1: postfix-3.7.0-config.patch +Patch1: postfix-3.8.0-config.patch Patch2: postfix-3.4.0-files.patch Patch3: postfix-3.3.3-alternatives.patch -Patch4: postfix-3.7.0-large-fs.patch +Patch4: postfix-3.8.0-large-fs.patch Patch9: pflogsumm-1.1.5-datecalc.patch # rhbz#1384871, sent upstream Patch10: pflogsumm-1.1.5-ipv6-warnings-fix.patch @@ -806,6 +806,10 @@ fi %endif %changelog +* Wed Apr 26 2023 Jaroslav Škarvada - 2:3.8.0-1 +- New version + Resolves: rhbz#2187121 + * Wed Jan 25 2023 Jaroslav Škarvada - 2:3.7.4-1 - New version Resolves: rhbz#2162932 diff --git a/sources b/sources index 309edd5..507d326 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (pflogsumm-1.1.5.tar.gz) = 994d660692dfea38a1dd9866d15f15035657e85131c1f5a2cd82baa5bd4ad987a00939cb5233f316d2090014c52ae68ef20db0c893f8634969484e0e74678f4d -SHA512 (postfix-3.7.4.tar.gz) = 972738291b960c90fe83861d55b1288900416167adb353418956e69bcc709a6daf84fbfde11d573eebba030654d27abc8d55f90661a2b880ccfb3a334064c236 +SHA512 (postfix-3.8.0.tar.gz) = a66956b0cc5eb6ad5ee926348b584ba5640586784aec794a84c40472faecb6313d46537c9f5696edfd8fda070591925a0cfaedc014e15bb3496195e5fb9ee4bd From a48b20209c8ad0dc6fa1e6992af905f806c09685 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Wed, 26 Apr 2023 18:45:45 +0200 Subject: [PATCH 02/55] Added links to some patches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jaroslav Škarvada --- postfix.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/postfix.spec b/postfix.spec index 3963d7f..bee1814 100644 --- a/postfix.spec +++ b/postfix.spec @@ -92,12 +92,13 @@ Source101: postfix-pam.conf Patch1: postfix-3.8.0-config.patch Patch2: postfix-3.4.0-files.patch Patch3: postfix-3.3.3-alternatives.patch +# probably rhbz#428996 Patch4: postfix-3.8.0-large-fs.patch Patch9: pflogsumm-1.1.5-datecalc.patch # rhbz#1384871, sent upstream Patch10: pflogsumm-1.1.5-ipv6-warnings-fix.patch Patch11: postfix-3.4.4-chroot-example-fix.patch -# sent upstream +# rhbz#1977732, sent upstream, https://marc.info/?t=162531022900002 Patch12: postfix-3.7.0-whitespace-name-fix.patch # rhbz#1931403, sent upstream Patch13: pflogsumm-1.1.5-syslog-name-underscore-fix.patch From ecc0e9b3440c5a9b4225ccdcce8d7069a4b92aef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Wed, 26 Apr 2023 18:59:11 +0200 Subject: [PATCH 03/55] Dropped whitespace-name-fix patch, not needed --- postfix-3.7.0-whitespace-name-fix.patch | 13 ------------- postfix.spec | 8 ++++---- 2 files changed, 4 insertions(+), 17 deletions(-) delete mode 100644 postfix-3.7.0-whitespace-name-fix.patch diff --git a/postfix-3.7.0-whitespace-name-fix.patch b/postfix-3.7.0-whitespace-name-fix.patch deleted file mode 100644 index e6a1db4..0000000 --- a/postfix-3.7.0-whitespace-name-fix.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/cleanup/cleanup_message.c b/src/cleanup/cleanup_message.c -index f2b86d0..018e39e 100644 ---- a/src/cleanup/cleanup_message.c -+++ b/src/cleanup/cleanup_message.c -@@ -772,6 +772,8 @@ static void cleanup_header_done_callback(void *context) - /* Normalize whitespace. */ - token = tok822_scan_limit(state->fullname, &dummy_token, - var_token_limit); -+ if (!token) -+ token = tok822_alloc(TOK822_QSTRING, state->fullname); - } else { - token = tok822_alloc(TOK822_QSTRING, state->fullname); - } diff --git a/postfix.spec b/postfix.spec index bee1814..dc6b51d 100644 --- a/postfix.spec +++ b/postfix.spec @@ -49,7 +49,7 @@ Name: postfix Summary: Postfix Mail Transport Agent Version: 3.8.0 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IBM and GPLv2+) or (EPL-2.0 and GPLv2+) @@ -98,8 +98,6 @@ Patch9: pflogsumm-1.1.5-datecalc.patch # rhbz#1384871, sent upstream Patch10: pflogsumm-1.1.5-ipv6-warnings-fix.patch Patch11: postfix-3.4.4-chroot-example-fix.patch -# rhbz#1977732, sent upstream, https://marc.info/?t=162531022900002 -Patch12: postfix-3.7.0-whitespace-name-fix.patch # rhbz#1931403, sent upstream Patch13: pflogsumm-1.1.5-syslog-name-underscore-fix.patch @@ -252,7 +250,6 @@ pushd pflogsumm-%{pflogsumm_ver} popd %endif %patch11 -p1 -b .chroot-example-fix -%patch12 -p1 -b .whitespace-name-fix %patch13 -p1 -b .pflogsumm-1.1.5-syslog-name-underscore-fix # Backport 3.8-20221006 fix for uname -r detection @@ -807,6 +804,9 @@ fi %endif %changelog +* Wed Apr 26 2023 Jaroslav Škarvada - 2:3.8.0-2 +- Dropped whitespace-name-fix patch, not needed + * Wed Apr 26 2023 Jaroslav Škarvada - 2:3.8.0-1 - New version Resolves: rhbz#2187121 From 8d9e3a48bbbbbacab50d4a6490649f515f1b4483 Mon Sep 17 00:00:00 2001 From: Tomas Korbar Date: Thu, 25 May 2023 15:02:21 +0200 Subject: [PATCH 04/55] Fix freed memory access --- postfix-3.8.0-posttls-finger.patch | 37 ++++++++++++++++++++++++++++++ postfix.spec | 7 +++++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 postfix-3.8.0-posttls-finger.patch diff --git a/postfix-3.8.0-posttls-finger.patch b/postfix-3.8.0-posttls-finger.patch new file mode 100644 index 0000000..1178961 --- /dev/null +++ b/postfix-3.8.0-posttls-finger.patch @@ -0,0 +1,37 @@ +commit a53fb4c34c8dc09e81ed0577df51a11bc5b7ae3e +Author: Tomas Korbar +Date: Thu May 25 14:59:46 2023 +0200 + + Fix freed memory access in posttls-finger + +diff --git a/src/posttls-finger/posttls-finger.c b/src/posttls-finger/posttls-finger.c +index 2f3a58e..d446583 100644 +--- a/src/posttls-finger/posttls-finger.c ++++ b/src/posttls-finger/posttls-finger.c +@@ -1590,12 +1590,12 @@ static char *parse_destination(char *destination, char *def_service, + static void connect_remote(STATE *state, char *dest) + { + DNS_RR *addr; +- char *buf; +- char *domain; +- char *service; + + /* When reconnecting use IP address of previous session */ + if (state->addr == 0) { ++ char *buf; ++ char *domain; ++ char *service; + buf = parse_destination(dest, state->smtp ? "smtp" : "24", + &domain, &service, &state->port); + if (!state->nexthop) +@@ -1622,8 +1622,8 @@ static void connect_remote(STATE *state, char *dest) + + if (level == TLS_LEV_INVALID + || (state->stream = connect_addr(state, addr)) == 0) { +- msg_info("Failed to establish session to %s:%s via %s:%u: %s", +- dest, service, HNAME(addr), addr->port, ++ msg_info("Failed to establish session to %s via %s:%u: %s", ++ dest, HNAME(addr), addr->port, + vstring_str(state->why->reason)); + continue; + } diff --git a/postfix.spec b/postfix.spec index dc6b51d..249b5a5 100644 --- a/postfix.spec +++ b/postfix.spec @@ -49,7 +49,7 @@ Name: postfix Summary: Postfix Mail Transport Agent Version: 3.8.0 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IBM and GPLv2+) or (EPL-2.0 and GPLv2+) @@ -100,6 +100,8 @@ Patch10: pflogsumm-1.1.5-ipv6-warnings-fix.patch Patch11: postfix-3.4.4-chroot-example-fix.patch # rhbz#1931403, sent upstream Patch13: pflogsumm-1.1.5-syslog-name-underscore-fix.patch +# fix freed memory access reported and fixed by upstream after 3.8.0 +Patch14: postfix-3.8.0-posttls-finger.patch # Optional patches - set the appropriate environment variables to include # them when building the package/spec file @@ -804,6 +806,9 @@ fi %endif %changelog +* Thu May 25 2023 Tomas Korbar - 2:3.8.0-3 +- Fix freed memory access + * Wed Apr 26 2023 Jaroslav Škarvada - 2:3.8.0-2 - Dropped whitespace-name-fix patch, not needed From 973d98f3f8a719a2975a54d63c0ba9661ead84dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Tue, 6 Jun 2023 11:34:45 +0200 Subject: [PATCH 05/55] New version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves: rhbz#2212596 Signed-off-by: Jaroslav Škarvada --- postfix-3.8.0-posttls-finger.patch | 37 ------------------------------ postfix.spec | 10 ++++---- sources | 2 +- 3 files changed, 7 insertions(+), 42 deletions(-) delete mode 100644 postfix-3.8.0-posttls-finger.patch diff --git a/postfix-3.8.0-posttls-finger.patch b/postfix-3.8.0-posttls-finger.patch deleted file mode 100644 index 1178961..0000000 --- a/postfix-3.8.0-posttls-finger.patch +++ /dev/null @@ -1,37 +0,0 @@ -commit a53fb4c34c8dc09e81ed0577df51a11bc5b7ae3e -Author: Tomas Korbar -Date: Thu May 25 14:59:46 2023 +0200 - - Fix freed memory access in posttls-finger - -diff --git a/src/posttls-finger/posttls-finger.c b/src/posttls-finger/posttls-finger.c -index 2f3a58e..d446583 100644 ---- a/src/posttls-finger/posttls-finger.c -+++ b/src/posttls-finger/posttls-finger.c -@@ -1590,12 +1590,12 @@ static char *parse_destination(char *destination, char *def_service, - static void connect_remote(STATE *state, char *dest) - { - DNS_RR *addr; -- char *buf; -- char *domain; -- char *service; - - /* When reconnecting use IP address of previous session */ - if (state->addr == 0) { -+ char *buf; -+ char *domain; -+ char *service; - buf = parse_destination(dest, state->smtp ? "smtp" : "24", - &domain, &service, &state->port); - if (!state->nexthop) -@@ -1622,8 +1622,8 @@ static void connect_remote(STATE *state, char *dest) - - if (level == TLS_LEV_INVALID - || (state->stream = connect_addr(state, addr)) == 0) { -- msg_info("Failed to establish session to %s:%s via %s:%u: %s", -- dest, service, HNAME(addr), addr->port, -+ msg_info("Failed to establish session to %s via %s:%u: %s", -+ dest, HNAME(addr), addr->port, - vstring_str(state->why->reason)); - continue; - } diff --git a/postfix.spec b/postfix.spec index 249b5a5..b69a12f 100644 --- a/postfix.spec +++ b/postfix.spec @@ -48,8 +48,8 @@ Name: postfix Summary: Postfix Mail Transport Agent -Version: 3.8.0 -Release: 3%{?dist} +Version: 3.8.1 +Release: 1%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IBM and GPLv2+) or (EPL-2.0 and GPLv2+) @@ -100,8 +100,6 @@ Patch10: pflogsumm-1.1.5-ipv6-warnings-fix.patch Patch11: postfix-3.4.4-chroot-example-fix.patch # rhbz#1931403, sent upstream Patch13: pflogsumm-1.1.5-syslog-name-underscore-fix.patch -# fix freed memory access reported and fixed by upstream after 3.8.0 -Patch14: postfix-3.8.0-posttls-finger.patch # Optional patches - set the appropriate environment variables to include # them when building the package/spec file @@ -806,6 +804,10 @@ fi %endif %changelog +* Tue Jun 6 2023 Jaroslav Škarvada - 2:3.8.1-1 +- New version + Resolves: rhbz#2212596 + * Thu May 25 2023 Tomas Korbar - 2:3.8.0-3 - Fix freed memory access diff --git a/sources b/sources index 507d326..8fc247a 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (pflogsumm-1.1.5.tar.gz) = 994d660692dfea38a1dd9866d15f15035657e85131c1f5a2cd82baa5bd4ad987a00939cb5233f316d2090014c52ae68ef20db0c893f8634969484e0e74678f4d -SHA512 (postfix-3.8.0.tar.gz) = a66956b0cc5eb6ad5ee926348b584ba5640586784aec794a84c40472faecb6313d46537c9f5696edfd8fda070591925a0cfaedc014e15bb3496195e5fb9ee4bd +SHA512 (postfix-3.8.1.tar.gz) = 9eb91f2baab327de22dd55fc5ff398de74856e30be461282f41b1801301873881a8f40ce061c16e0505d51d96aaf0eff8d0ac660e5f6c70c6125133f64a4ee80 From 50c6b5891cf31442567e4494c54bd2d31b4c7e44 Mon Sep 17 00:00:00 2001 From: Tomas Korbar Date: Thu, 8 Jun 2023 14:16:52 +0200 Subject: [PATCH 06/55] Backport SRV resolution from 3.8.0 release --- postfix-3.7.4-SRV-resolve.patch | 1590 +++++++++++++++++++++++++++++++ postfix.spec | 8 +- 2 files changed, 1597 insertions(+), 1 deletion(-) create mode 100644 postfix-3.7.4-SRV-resolve.patch diff --git a/postfix-3.7.4-SRV-resolve.patch b/postfix-3.7.4-SRV-resolve.patch new file mode 100644 index 0000000..33ad643 --- /dev/null +++ b/postfix-3.7.4-SRV-resolve.patch @@ -0,0 +1,1590 @@ +commit e8e61195459340eb01be5af722609694a9cea6fb +Author: Tomas Korbar +Date: Thu Jun 8 14:12:16 2023 +0200 + + Backport SRV record resolution feature + +diff --git a/mantools/postlink b/mantools/postlink +index 2b1ad8b..c8f659d 100755 +--- a/mantools/postlink ++++ b/mantools/postlink +@@ -1156,6 +1156,10 @@ while (<>) { + s;\blocal_login_sender_maps\b;$&;g; + s;\bempty_address_local_login_sender_maps_lookup_key\b;$&;g; + ++ s;\buse_srv_lookup\b;$&;g; ++ s;\ballow_srv_lookup_fallback\b;$&;g; ++ s;\bignore_srv_lookup_error\b;$&;g; ++ + # Service-defined parameters... + + s;\bpolicy_time_limit\b;$&;g; +diff --git a/proto/postconf.proto b/proto/postconf.proto +index 9b5a550..b9307e2 100644 +--- a/proto/postconf.proto ++++ b/proto/postconf.proto +@@ -18434,3 +18434,110 @@ Postfix SMTP client will continue delivery after logging a warning. + configuration parameter. See there for details.

+ +

This feature is available in Postfix 3.7 and later.

++ ++%PARAM use_srv_lookup ++ ++

Enables discovery for the specified service(s) using DNS SRV ++records. 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. See RFC 2782 for details of the host selection ++process.

++ ++

Specify zero or more service names separated by comma and/or ++whitespace. Any name in the services(5) database may be specified, ++though in practice only submission, submissions, and smtp make ++sense.

++ ++

When SRV record lookup is enabled with use_srv_lookup, you can ++enclose a domain name in "[]" to force IP address lookup instead ++of SRV record lookup.

++ ++

Example 1: MUA-to-MTA submission using SRV record lookup for ++the "submission" service for domain "example.com". This uses the ++default SMTP delivery agent with STARTTLS, and looks up SRV records ++for "_submission._tcp.example.com".

++ ++
++/etc/postfix/main.cf:
++    use_srv_lookup = submission
++    relayhost = example.com:submission
++    smtp_tls_security_level = may
++    ...see SASL_README for sasl configuration...
++
++ ++

Example 2: MUA-to-MTA submission using SRV record lookup for ++the "submissions" service for domain "example.org". This uses a ++dedicated SMTP delivery agent (smtp-wraptls) with tls_wrappermode ++turned on, and looks up SRV records for "_submissions._tcp.example.org". ++

++ ++

Note: specify the older name "smtps" instead of "submissions" ++when a provider has DNS SRV records like "_smtps._tcp.example.org" ++instead of "_submissions._tcp.example.org".

++ ++
++/etc/postfix/main.cf:
++    use_srv_lookup = submissions
++    default_transport = smtp-wraptls:example.org:submissions
++    ...see SASL_README for sasl configuration...
++
++ ++
++/etc/postfix/master.cf:
++    smtp-wraptls   unix   ...   ...   ...   ...   ...   smtp
++        -o { smtp_tls_wrappermode = yes }
++        -o { smtp_tls_security_level = encrypt }
++
++ ++

Example 3: Sender-dependent selection for a combination of ++MUA-to-MTA submission services. This combines examples 1 and 2 with ++examples of how to disable SRV and look up IP address records for ++"smtp-relay.example.net" and "smtp-relay.other.example". Again, ++specify the older name "smtps" instead of "submissions" when a ++provider has DNS SRV records like "_smtps._tcp.example.org" instead ++of "_submissions._tcp.example.org".

++ ++
++/etc/postfix/main.cf:
++    use_srv_lookup = submission, submissions
++    sender_dependent_default_transport_maps = inline:{
++        # Destinations that support SRV record lookup.
++        { user1@example.com = smtp:example.com:submission }
++        { user2@example.org = smtp-wraptls:example.org:submissions }
++        # Use [destination] to force IP address lookups.
++        { user3@example.net = smtp:[smtp-relay.example.net]:submission }
++        { user4@other.example =
++              smtp-wraptls:[smtp-relay.other.example]:submissions } }
++    ...see SASL_README for sasl configuration...
++
++ ++

Example 4: MTA-to-MTA traffic, using SRV record lookup for the ++SMTP service. This is useful for Postfix tests, and may be useful ++in environments where ports are dynamically assigned to servers. ++

++ ++
++/etc/postfix/main.cf:
++    use_srv_lookup = smtp
++    # Fall back to MX record lookup when SRV records are unavailable.
++    #allow_srv_lookup_fallback = yes
++    #ignore_srv_lookup_error = yes
++
++ ++

This feature was backported from Postfix 3.8.

++ ++%PARAM ignore_srv_lookup_error no ++ ++

When SRV record lookup fails, fall back to MX or IP address ++lookup as if SRV record lookup was not enabled.

++ ++

This feature was backported from Postfix 3.8.

++ ++%PARAM allow_srv_lookup_fallback no ++ ++

When SRV record lookup fails or no SRV record exists, fall back ++to MX or IP address lookup as if SRV record lookup was not enabled.

++ ++

This feature was backported from Postfix 3.8.

+diff --git a/src/dns/dns.h b/src/dns/dns.h +index 5f53dbc..0c1dcb3 100644 +--- a/src/dns/dns.h ++++ b/src/dns/dns.h +@@ -158,10 +158,12 @@ typedef struct DNS_RR { + unsigned short class; /* C_IN, etc. */ + unsigned int ttl; /* always */ + unsigned int dnssec_valid; /* DNSSEC validated */ +- unsigned short pref; /* T_MX only */ ++ unsigned short pref; /* T_MX and T_SRV record related */ ++ unsigned short weight; /* T_SRV related, defined in rfc2782 */ ++ unsigned short port; /* T_SRV related, defined in rfc2782 */ + struct DNS_RR *next; /* linkage */ + size_t data_len; /* actual data size */ +- char data[1]; /* actually a bunch of data */ ++ char *data; /* a bunch of data */ + } DNS_RR; + + /* +@@ -183,14 +185,29 @@ extern char *dns_strrecord(VSTRING *, DNS_RR *); + /* + * dns_rr.c + */ ++#define DNS_RR_NOPREF (0) ++#define DNS_RR_NOWEIGHT (0) ++#define DNS_RR_NOPORT (0) ++ ++#define dns_rr_create_noport(qname, rname, type, class, ttl, pref, data, \ ++ data_len) \ ++ dns_rr_create((qname), (rname), (type), (class), (ttl), \ ++ (pref), DNS_RR_NOWEIGHT, DNS_RR_NOPORT, (data), (data_len)) ++ ++#define dns_rr_create_nopref(qname, rname, type, class, ttl, data, data_len) \ ++ dns_rr_create_noport((qname), (rname), (type), (class), (ttl), \ ++ DNS_RR_NOPREF, (data), (data_len)) ++ + extern DNS_RR *dns_rr_create(const char *, const char *, + ushort, ushort, + unsigned, unsigned, ++ unsigned, unsigned, + const char *, size_t); + extern void dns_rr_free(DNS_RR *); + extern DNS_RR *dns_rr_copy(DNS_RR *); + extern DNS_RR *dns_rr_append(DNS_RR *, DNS_RR *); + extern DNS_RR *dns_rr_sort(DNS_RR *, int (*) (DNS_RR *, DNS_RR *)); ++extern DNS_RR *dns_srv_rr_sort(DNS_RR *); + extern int dns_rr_compare_pref_ipv6(DNS_RR *, DNS_RR *); + extern int dns_rr_compare_pref_ipv4(DNS_RR *, DNS_RR *); + extern int dns_rr_compare_pref_any(DNS_RR *, DNS_RR *); +@@ -295,8 +312,9 @@ extern int dns_get_h_errno(void); + * Below is the precedence order. The order between DNS_RETRY and DNS_NOTFOUND + * is arbitrary. + */ +-#define DNS_RECURSE (-7) /* internal only: recursion needed */ +-#define DNS_NOTFOUND (-6) /* query ok, data not found */ ++#define DNS_RECURSE (-8) /* internal only: recursion needed */ ++#define DNS_NOTFOUND (-7) /* query ok, data not found */ ++#define DNS_NULLSRV (-6) /* query ok, service unavailable */ + #define DNS_NULLMX (-5) /* query ok, service unavailable */ + #define DNS_FAIL (-4) /* query failed, don't retry */ + #define DNS_INVAL (-3) /* query ok, malformed reply */ +diff --git a/src/dns/dns_lookup.c b/src/dns/dns_lookup.c +index 1c12a88..134af16 100644 +--- a/src/dns/dns_lookup.c ++++ b/src/dns/dns_lookup.c +@@ -740,6 +740,8 @@ static int dns_get_rr(DNS_RR **list, const char *orig_name, DNS_REPLY *reply, + int comp_len; + ssize_t data_len; + unsigned pref = 0; ++ unsigned weight = 0; ++ unsigned port = 0; + unsigned char *src; + unsigned char *dst; + int ch; +@@ -765,6 +767,18 @@ static int dns_get_rr(DNS_RR **list, const char *orig_name, DNS_REPLY *reply, + return (DNS_INVAL); + data_len = strlen(temp) + 1; + break; ++ case T_SRV: ++ GETSHORT(pref, pos); ++ GETSHORT(weight, pos); ++ GETSHORT(port, pos); ++ if (dn_expand(reply->buf, reply->end, pos, temp, sizeof(temp)) < 0) ++ return (DNS_RETRY); ++ if (*temp == 0) ++ return (DNS_NULLSRV); ++ if (!valid_rr_name(temp, "resource data", fixed->type, reply)) ++ return (DNS_INVAL); ++ data_len = strlen(temp) + 1; ++ break; + case T_MX: + GETSHORT(pref, pos); + if (dn_expand(reply->buf, reply->end, pos, temp, sizeof(temp)) < 0) +@@ -860,7 +874,7 @@ static int dns_get_rr(DNS_RR **list, const char *orig_name, DNS_REPLY *reply, + break; + } + *list = dns_rr_create(orig_name, rr_name, fixed->type, fixed->class, +- fixed->ttl, pref, tempbuf, data_len); ++ fixed->ttl, pref, weight, port, tempbuf, data_len); + return (DNS_OK); + } + +@@ -960,7 +974,7 @@ static int dns_get_answer(const char *orig_name, DNS_REPLY *reply, int type, + resource_found++; + rr->dnssec_valid = *maybe_secure ? reply->dnssec_ad : 0; + *rrlist = dns_rr_append(*rrlist, rr); +- } else if (status == DNS_NULLMX) { ++ } else if (status == DNS_NULLMX || status == DNS_NULLSRV) { + CORRUPT(status); /* TODO: use better name */ + } else if (not_found_status != DNS_RETRY) + not_found_status = status; +@@ -1094,6 +1108,12 @@ int dns_lookup_x(const char *name, unsigned type, unsigned flags, + name); + DNS_SET_H_ERRNO(&dns_res_state, NO_DATA); + return (status); ++ case DNS_NULLSRV: ++ if (why) ++ vstring_sprintf(why, "Domain %s does not support SRV requests", ++ name); ++ DNS_SET_H_ERRNO(&dns_res_state, NO_DATA); ++ return (status); + case DNS_OK: + if (rrlist && dns_rr_filter_maps) { + if (dns_rr_filter_execute(rrlist) < 0) { +diff --git a/src/dns/dns_rr.c b/src/dns/dns_rr.c +index b550788..15b5dee 100644 +--- a/src/dns/dns_rr.c ++++ b/src/dns/dns_rr.c +@@ -7,13 +7,15 @@ + /* #include + /* + /* DNS_RR *dns_rr_create(qname, rname, type, class, ttl, preference, +-/* data, data_len) ++/* weight, port, data, data_len) + /* const char *qname; + /* const char *rname; + /* unsigned short type; + /* unsigned short class; + /* unsigned int ttl; + /* unsigned preference; ++/* unsigned weight; ++/* unsigned port; + /* const char *data; + /* size_t data_len; + /* +@@ -49,6 +51,30 @@ + /* DNS_RR *dns_rr_remove(list, record) + /* DNS_RR *list; + /* DNS_RR *record; ++/* ++/* DNS_RR *dns_srv_rr_sort(list) ++/* DNS_RR *list; ++/* AUXILIARY FUNCTIONS ++/* DNS_RR *dns_rr_create_nopref(qname, rname, type, class, ttl, ++/* data, data_len) ++/* const char *qname; ++/* const char *rname; ++/* unsigned short type; ++/* unsigned short class; ++/* unsigned int ttl; ++/* const char *data; ++/* size_t data_len; ++/* ++/* DNS_RR *dns_rr_create_noport(qname, rname, type, class, ttl, ++/* preference, data, data_len) ++/* const char *qname; ++/* const char *rname; ++/* unsigned short type; ++/* unsigned short class; ++/* unsigned int ttl; ++/* unsigned preference; ++/* const char *data; ++/* size_t data_len; + /* DESCRIPTION + /* The routines in this module maintain memory for DNS resource record + /* information, and maintain lists of DNS resource records. +@@ -56,10 +82,14 @@ + /* dns_rr_create() creates and initializes one resource record. + /* The \fIqname\fR field specifies the query name. + /* The \fIrname\fR field specifies the reply name. +-/* \fIpreference\fR is used for MX records; \fIdata\fR is a null ++/* \fIpreference\fR is used for MX and SRV records; \fIweight\fR ++/* and \fIport\fR are used for SRV records; \fIdata\fR is a null + /* pointer or specifies optional resource-specific data; + /* \fIdata_len\fR is the amount of resource-specific data. + /* ++/* dns_rr_create_nopref() and dns_rr_create_noport() are convenience ++/* wrappers around dns_rr_create() that take fewer arguments. ++/* + /* dns_rr_free() releases the resource used by of zero or more + /* resource records. + /* +@@ -81,6 +111,9 @@ + /* dns_rr_remove() removes the specified record from the specified list. + /* The updated list is the result value. + /* The record MUST be a list member. ++/* ++/* dns_srv_rr_sort() sorts a list of SRV records according to ++/* their priority and weight as described in RFC 2782. + /* LICENSE + /* .ad + /* .fi +@@ -113,11 +146,15 @@ + DNS_RR *dns_rr_create(const char *qname, const char *rname, + ushort type, ushort class, + unsigned int ttl, unsigned pref, ++ unsigned weight, unsigned port, + const char *data, size_t data_len) + { + DNS_RR *rr; + +- rr = (DNS_RR *) mymalloc(sizeof(*rr) + data_len - 1); ++ /* ++ * Note: if this function is changed, update dns_rr_copy(). ++ */ ++ rr = (DNS_RR *) mymalloc(sizeof(*rr)); + rr->qname = mystrdup(qname); + rr->rname = mystrdup(rname); + rr->type = type; +@@ -125,8 +162,14 @@ DNS_RR *dns_rr_create(const char *qname, const char *rname, + rr->ttl = ttl; + rr->dnssec_valid = 0; + rr->pref = pref; +- if (data && data_len > 0) ++ rr->weight = weight; ++ rr->port = port; ++ if (data_len != 0) { ++ rr->data = mymalloc(data_len); + memcpy(rr->data, data, data_len); ++ } else { ++ rr->data = 0; ++ } + rr->data_len = data_len; + rr->next = 0; + return (rr); +@@ -141,6 +184,8 @@ void dns_rr_free(DNS_RR *rr) + dns_rr_free(rr->next); + myfree(rr->qname); + myfree(rr->rname); ++ if (rr->data) ++ myfree(rr->data); + myfree((void *) rr); + } + } +@@ -149,16 +194,17 @@ void dns_rr_free(DNS_RR *rr) + + DNS_RR *dns_rr_copy(DNS_RR *src) + { +- ssize_t len = sizeof(*src) + src->data_len - 1; + DNS_RR *dst; + + /* +- * Combine struct assignment and data copy in one block copy operation. ++ * Note: struct copy, because dns_rr_create() would not copy all fields. + */ +- dst = (DNS_RR *) mymalloc(len); +- memcpy((void *) dst, (void *) src, len); ++ dst = (DNS_RR *) mymalloc(sizeof(*dst)); ++ *dst = *src; + dst->qname = mystrdup(src->qname); + dst->rname = mystrdup(src->rname); ++ if (dst->data) ++ dst->data = mymemdup(src->data, src->data_len); + dst->next = 0; + return (dst); + } +@@ -247,6 +293,12 @@ DNS_RR *dns_rr_sort(DNS_RR *list, int (*compar) (DNS_RR *, DNS_RR *)) + int len; + int i; + ++ /* ++ * Avoid mymalloc() panic. ++ */ ++ if (list == 0) ++ return (list); ++ + /* + * Save state and initialize. + */ +@@ -293,6 +345,12 @@ DNS_RR *dns_rr_shuffle(DNS_RR *list) + int i; + int r; + ++ /* ++ * Avoid mymalloc() panic. ++ */ ++ if (list == 0) ++ return (list); ++ + /* + * Build linear array with pointers to each list element. + */ +@@ -345,3 +403,141 @@ DNS_RR *dns_rr_remove(DNS_RR *list, DNS_RR *record) + } + return (list); + } ++ ++/* weight_order - sort equal-priority records by weight */ ++ ++static void weight_order(DNS_RR **array, int count) ++{ ++ int unordered_weights; ++ int i; ++ ++ /* ++ * Compute the sum of record weights. If weights are not supplied then ++ * this function would be a noop. In fact this would be a noop when all ++ * weights have the same value, whether that weight is zero or not. There ++ * is no need to give special treatment to zero weights. ++ */ ++ for (unordered_weights = 0, i = 0; i < count; i++) ++ unordered_weights += array[i]->weight; ++ if (unordered_weights == 0) ++ return; ++ ++ /* ++ * The record ordering code below differs from RFC 2782 when the input ++ * contains a mix of zero and non-zero weights: the code below does not ++ * give special treatment to zero weights. Instead, it treats a zero ++ * weight just like any other small weight. Fewer special cases make for ++ * code that is simpler and more robust. ++ */ ++ for (i = 0; i < count - 1; i++) { ++ int running_sum; ++ int threshold; ++ int k; ++ DNS_RR *temp; ++ ++ /* ++ * Choose a random threshold [0..unordered_weights] inclusive. ++ */ ++ threshold = myrand() % (unordered_weights + 1); ++ ++ /* ++ * Move the first record with running_sum >= threshold to the ordered ++ * list, and update unordered_weights. ++ */ ++ for (running_sum = 0, k = i; k < count; k++) { ++ running_sum += array[k]->weight; ++ if (running_sum >= threshold) { ++ unordered_weights -= array[k]->weight; ++ temp = array[i]; ++ array[i] = array[k]; ++ array[k] = temp; ++ break; ++ } ++ } ++ } ++} ++ ++/* dns_srv_rr_sort - sort resource record list */ ++ ++DNS_RR *dns_srv_rr_sort(DNS_RR *list) ++{ ++ int (*saved_user) (DNS_RR *, DNS_RR *); ++ DNS_RR **rr_array; ++ DNS_RR *rr; ++ int len; ++ int i; ++ int r; ++ int cur_pref; ++ int left_bound; /* inclusive */ ++ int right_bound; /* non-inclusive */ ++ ++ /* ++ * Avoid mymalloc() panic, or rr_array[0] fence-post error. ++ */ ++ if (list == 0) ++ return (list); ++ ++ /* ++ * Save state and initialize. ++ */ ++ saved_user = dns_rr_sort_user; ++ dns_rr_sort_user = dns_rr_compare_pref_any; ++ ++ /* ++ * Build linear array with pointers to each list element. ++ */ ++ for (len = 0, rr = list; rr != 0; len++, rr = rr->next) ++ /* void */ ; ++ rr_array = (DNS_RR **) mymalloc(len * sizeof(*rr_array)); ++ for (len = 0, rr = list; rr != 0; len++, rr = rr->next) ++ rr_array[len] = rr; ++ ++ /* ++ * Shuffle resource records. Every element has an equal chance of landing ++ * in slot 0. After that every remaining element has an equal chance of ++ * landing in slot 1, ... This is exactly n! states for n! permutations. ++ */ ++ for (i = 0; i < len - 1; i++) { ++ r = i + (myrand() % (len - i)); /* Victor&Son */ ++ rr = rr_array[i]; ++ rr_array[i] = rr_array[r]; ++ rr_array[r] = rr; ++ } ++ ++ /* First order the records by preference. */ ++ qsort((void *) rr_array, len, sizeof(*rr_array), dns_rr_sort_callback); ++ ++ /* ++ * Walk through records and sort the records in every same-preference ++ * partition according to their weight. Note that left_bound is ++ * inclusive, and that right-bound is non-inclusive. ++ */ ++ left_bound = 0; ++ cur_pref = rr_array[left_bound]->pref; /* assumes len > 0 */ ++ ++ for (right_bound = 1; /* see below */ ; right_bound++) { ++ if (right_bound == len || rr_array[right_bound]->pref != cur_pref) { ++ if (right_bound - left_bound > 1) ++ weight_order(rr_array + left_bound, right_bound - left_bound); ++ if (right_bound == len) ++ break; ++ left_bound = right_bound; ++ cur_pref = rr_array[left_bound]->pref; ++ } ++ } ++ ++ /* ++ * Fix the links. ++ */ ++ for (i = 0; i < len - 1; i++) ++ rr_array[i]->next = rr_array[i + 1]; ++ rr_array[i]->next = 0; ++ list = rr_array[0]; ++ ++ /* ++ * Cleanup. ++ */ ++ myfree((void *) rr_array); ++ dns_rr_sort_user = saved_user; ++ return (list); ++} +diff --git a/src/dns/dns_sa_to_rr.c b/src/dns/dns_sa_to_rr.c +index 6b9efcc..b5dee20 100644 +--- a/src/dns/dns_sa_to_rr.c ++++ b/src/dns/dns_sa_to_rr.c +@@ -55,14 +55,14 @@ DNS_RR *dns_sa_to_rr(const char *hostname, unsigned pref, struct sockaddr *sa) + #define DUMMY_TTL 0 + + if (sa->sa_family == AF_INET) { +- return (dns_rr_create(hostname, hostname, T_A, C_IN, DUMMY_TTL, pref, +- (char *) &SOCK_ADDR_IN_ADDR(sa), +- sizeof(SOCK_ADDR_IN_ADDR(sa)))); ++ return (dns_rr_create_noport(hostname, hostname, T_A, C_IN, DUMMY_TTL, ++ pref, (char *) &SOCK_ADDR_IN_ADDR(sa), ++ sizeof(SOCK_ADDR_IN_ADDR(sa)))); + #ifdef HAS_IPV6 + } else if (sa->sa_family == AF_INET6) { +- return (dns_rr_create(hostname, hostname, T_AAAA, C_IN, DUMMY_TTL, pref, +- (char *) &SOCK_ADDR_IN6_ADDR(sa), +- sizeof(SOCK_ADDR_IN6_ADDR(sa)))); ++ return (dns_rr_create_noport(hostname, hostname, T_AAAA, C_IN, DUMMY_TTL, ++ pref, (char *) &SOCK_ADDR_IN6_ADDR(sa), ++ sizeof(SOCK_ADDR_IN6_ADDR(sa)))); + #endif + } else { + errno = EAFNOSUPPORT; +@@ -121,7 +121,7 @@ int main(int argc, char **argv) + resv[len++] = res; + qsort((void *) resv, len, sizeof(*resv), compare_family); + for (n = 0; n < len; n++) { +- if ((rr = dns_sa_to_rr(argv[0], 0, resv[n]->ai_addr)) == 0) ++ if ((rr = dns_sa_to_rr(argv[0], DNS_RR_NOPREF, resv[n]->ai_addr)) == 0) + msg_fatal("dns_sa_to_rr: %m"); + if (dns_rr_to_pa(rr, &hostaddr) == 0) + msg_fatal("dns_rr_to_pa: %m"); +diff --git a/src/dns/dns_strrecord.c b/src/dns/dns_strrecord.c +index 6b8e989..1e3b743 100644 +--- a/src/dns/dns_strrecord.c ++++ b/src/dns/dns_strrecord.c +@@ -80,6 +80,10 @@ char *dns_strrecord(VSTRING *buf, DNS_RR *rr) + case T_MX: + vstring_sprintf_append(buf, "%u %s.", rr->pref, rr->data); + break; ++ case T_SRV: ++ vstring_sprintf_append(buf, "%u %u %u %s.", rr->pref, rr->weight, ++ rr->port, rr->data); ++ break; + case T_TLSA: + if (rr->data_len >= 3) { + uint8_t *ip = (uint8_t *) rr->data; +diff --git a/src/dns/dns_strtype.c b/src/dns/dns_strtype.c +index 70e59ac..7eebe3c 100644 +--- a/src/dns/dns_strtype.c ++++ b/src/dns/dns_strtype.c +@@ -180,6 +180,9 @@ static struct dns_type_map dns_type_map[] = { + #ifdef T_ANY + T_ANY, "ANY", + #endif ++#ifdef T_SRV ++ T_SRV, "SRV", ++#endif + }; + + /* dns_strtype - translate DNS query type to string */ +diff --git a/src/global/mail_params.h b/src/global/mail_params.h +index ff39ae7..791edd2 100644 +--- a/src/global/mail_params.h ++++ b/src/global/mail_params.h +@@ -4348,6 +4348,21 @@ extern char *var_dnssec_probe; + "lmtp=24, smtp=25, smtps=submissions=465, submission=587" + extern char *var_known_tcp_ports; + ++ /* ++ * SRV lookup support. ++ */ ++#define VAR_USE_SRV_LOOKUP "use_srv_lookup" ++#define DEF_USE_SRV_LOOKUP "" ++extern char *var_use_srv_lookup; ++ ++#define VAR_IGN_SRV_LOOKUP_ERR "ignore_srv_lookup_error" ++#define DEF_IGN_SRV_LOOKUP_ERR 0 ++extern bool var_ign_srv_lookup_err; ++ ++#define VAR_ALLOW_SRV_FALLBACK "allow_srv_lookup_fallback" ++#define DEF_ALLOW_SRV_FALLBACK 0 ++extern bool var_allow_srv_fallback; ++ + /* LICENSE + /* .ad + /* .fi +diff --git a/src/posttls-finger/posttls-finger.c b/src/posttls-finger/posttls-finger.c +index 8b34444..df49c36 100644 +--- a/src/posttls-finger/posttls-finger.c ++++ b/src/posttls-finger/posttls-finger.c +@@ -237,6 +237,8 @@ + /* is encountered, up to 5 times or as specified with the \fB-m\fR option. + /* By default reconnection is disabled, specify a positive delay to + /* enable this behavior. ++/* .IP "\fB-R\fR" ++/* Use SRV lookup instead of MX. + /* .IP "\fB-s \fIservername\fR" + /* The server name to send with the TLS Server Name Indication (SNI) + /* extension. When the server has DANE TLSA records, this parameter +@@ -468,6 +470,7 @@ typedef struct STATE { + DNS_RR *mx; /* MX RRset qname, rname, valid */ + int pass; /* Pass number, 2 for reconnect */ + int nochat; /* disable chat logging */ ++ int dosrv; /* look up SRV records instead of MX */ + char *helo; /* Server name from EHLO reply */ + DSN_BUF *why; /* SMTP-style error message */ + VSTRING *buffer; /* Response buffer */ +@@ -1158,7 +1161,7 @@ static VSTREAM *connect_addr(STATE *state, DNS_RR *addr) + /* addr_one - address lookup for one host name */ + + static DNS_RR *addr_one(STATE *state, DNS_RR *addr_list, const char *host, +- int res_opt, unsigned pref) ++ int res_opt, unsigned pref, unsigned port) + { + static const char *myname = "addr_one"; + DSN_BUF *why = state->why; +@@ -1181,6 +1184,8 @@ static DNS_RR *addr_one(STATE *state, DNS_RR *addr_list, const char *host, + if ((addr = dns_sa_to_rr(host, pref, res0->ai_addr)) == 0) + msg_fatal("host %s: conversion error for address family %d: %m", + host, ((struct sockaddr *) (res0->ai_addr))->sa_family); ++ addr->pref = pref; ++ addr->port = port; + addr_list = dns_rr_append(addr_list, addr); + freeaddrinfo(res0); + return (addr_list); +@@ -1197,8 +1202,10 @@ static DNS_RR *addr_one(STATE *state, DNS_RR *addr_list, const char *host, + why->reason, DNS_REQ_FLAG_NONE, + proto_info->dns_atype_list)) { + case DNS_OK: +- for (rr = addr; rr; rr = rr->next) ++ for (rr = addr; rr; rr = rr->next) { + rr->pref = pref; ++ rr->port = port; ++ } + addr_list = dns_rr_append(addr_list, addr); + return (addr_list); + default: +@@ -1285,15 +1292,15 @@ static DNS_RR *mx_addr_list(STATE *state, DNS_RR *mx_names) + #endif + + for (rr = mx_names; rr; rr = rr->next) { +- if (rr->type != T_MX) ++ if (rr->type != T_MX && rr->type != T_SRV) + msg_panic("%s: bad resource type: %d", myname, rr->type); + addr_list = addr_one(state, addr_list, (char *) rr->data, res_opt, +- rr->pref); ++ rr->pref, rr->port); + } + return (addr_list); + } + +-/* smtp_domain_addr - mail exchanger address lookup */ ++/* domain_addr - mail exchanger address lookup */ + + static DNS_RR *domain_addr(STATE *state, char *domain) + { +@@ -1358,6 +1365,74 @@ static DNS_RR *domain_addr(STATE *state, char *domain) + return (addr_list); + } + ++/* service_addr - mail exchanger address lookup */ ++ ++static DNS_RR *service_addr(STATE *state, const char *domain, ++ const char *service) ++{ ++ VSTRING *srv_qname = vstring_alloc(100); ++ char *str_srv_qname; ++ DNS_RR *srv_names; ++ DNS_RR *addr_list = 0; ++ int r = 0; /* Resolver flags */ ++ const char *aname; ++ ++ dsb_reset(state->why); ++ ++#if (RES_USE_DNSSEC != 0) && (RES_USE_EDNS0 != 0) ++ r |= RES_USE_DNSSEC; ++#endif ++ ++ vstring_sprintf(srv_qname, "_%s._tcp.%s", service, domain); ++ str_srv_qname = STR(srv_qname); ++ ++ /* ++ * IDNA support. ++ */ ++#ifndef NO_EAI ++ if (!allascii(str_srv_qname) ++ && (aname = midna_domain_to_ascii(str_srv_qname)) != 0) { ++ msg_info("%s asciified to %s", str_srv_qname, aname); ++ } else ++#endif ++ aname = str_srv_qname; ++ ++ switch (dns_lookup(aname, T_SRV, r, &srv_names, (VSTRING *) 0, ++ state->why->reason)) { ++ default: ++ dsb_status(state->why, "4.4.3"); ++ break; ++ case DNS_INVAL: ++ dsb_status(state->why, "5.4.4"); ++ break; ++ case DNS_NULLMX: ++ dsb_status(state->why, "5.1.0"); ++ break; ++ case DNS_FAIL: ++ dsb_status(state->why, "5.4.3"); ++ break; ++ case DNS_OK: ++ /* Shuffle then sort the SRV rr records by priority and weight. */ ++ srv_names = dns_srv_rr_sort(srv_names); ++ addr_list = mx_addr_list(state, srv_names); ++ state->mx = dns_rr_copy(srv_names); ++ dns_rr_free(srv_names); ++ if (addr_list == 0) { ++ msg_warn("no SRV host for %s has a valid address record", ++ str_srv_qname); ++ break; ++ } ++ /* TODO: sort by priority, weight, and address family preference. */ ++ break; ++ case DNS_NOTFOUND: ++ dsb_status(state->why, "5.4.4"); ++ break; ++ } ++ ++ vstring_free(srv_qname); ++ return (addr_list); ++} ++ + /* host_addr - direct host lookup */ + + static DNS_RR *host_addr(STATE *state, const char *host) +@@ -1384,7 +1459,8 @@ static DNS_RR *host_addr(STATE *state, const char *host) + ahost = host; + + #define PREF0 0 +- addr_list = addr_one(state, (DNS_RR *) 0, ahost, res_opt, PREF0); ++#define NOPORT 0 ++ addr_list = addr_one(state, (DNS_RR *) 0, ahost, res_opt, PREF0, NOPORT); + if (addr_list && addr_list->next) { + addr_list = dns_rr_shuffle(addr_list); + if (inet_proto_info()->ai_family_list[1] != 0) +@@ -1468,7 +1544,8 @@ static int dane_host_level(STATE *state, DNS_RR *addr) + /* parse_destination - parse host/port destination */ + + static char *parse_destination(char *destination, char *def_service, +- char **hostp, unsigned *portp) ++ char **hostp, char **servicep, ++ unsigned *portp) + { + char *buf = mystrdup(destination); + char *service; +@@ -1484,13 +1561,13 @@ static char *parse_destination(char *destination, char *def_service, + * Parse the host/port information. We're working with a copy of the + * destination argument so the parsing can be destructive. + */ +- if ((err = host_port(buf, hostp, (char *) 0, &service, def_service)) != 0) ++ if ((err = host_port(buf, hostp, (char *) 0, servicep, def_service)) != 0) + msg_fatal("%s in server description: %s", err, destination); + + /* + * Convert service to port number, network byte order. + */ +- service = (char *) filter_known_tcp_port(service); ++ service = (char *) filter_known_tcp_port(*servicep); + if (alldig(service)) { + if ((port = atoi(service)) >= 65536 || port == 0) + msg_fatal("bad network port: %s for destination: %s", +@@ -1512,17 +1589,21 @@ static char *parse_destination(char *destination, char *def_service, + static void connect_remote(STATE *state, char *dest) + { + DNS_RR *addr; +- char *buf; +- char *domain; + + /* When reconnecting use IP address of previous session */ + if (state->addr == 0) { ++ char *buf; ++ char *domain; ++ char *service; ++ + buf = parse_destination(dest, state->smtp ? "smtp" : "24", +- &domain, &state->port); ++ &domain, &service, &state->port); + if (!state->nexthop) + state->nexthop = mystrdup(domain); + if (state->smtp == 0 || *dest == '[') + state->addr = host_addr(state, domain); ++ else if (state->dosrv) ++ state->addr = service_addr(state, domain, service); + else + state->addr = domain_addr(state, domain); + myfree(buf); +@@ -1536,10 +1617,14 @@ static void connect_remote(STATE *state, char *dest) + for (addr = state->addr; addr; addr = addr->next) { + int level = dane_host_level(state, addr); + ++ if (addr->port) /* SRV port override */ ++ state->port = htons(addr->port); ++ + if (level == TLS_LEV_INVALID + || (state->stream = connect_addr(state, addr)) == 0) { +- msg_info("Failed to establish session to %s via %s: %s", +- dest, HNAME(addr), vstring_str(state->why->reason)); ++ msg_info("Failed to establish session to %s via %s:%u: %s", ++ dest, HNAME(addr), addr->port, ++ vstring_str(state->why->reason)); + continue; + } + /* We have a connection */ +@@ -1807,6 +1892,7 @@ static void parse_options(STATE *state, int argc, char *argv[]) + + state->smtp = 1; + state->pass = 1; ++ state->dosrv = 0; + state->reconnect = -1; + state->max_reconnect = 5; + state->wrapper_mode = 0; +@@ -1817,7 +1903,7 @@ static void parse_options(STATE *state, int argc, char *argv[]) + memset((void *) &state->options, 0, sizeof(state->options)); + state->options.host_lookup = mystrdup("dns"); + +-#define OPTS "a:ch:o:St:T:v" ++#define OPTS "a:ch:o:RSt:T:v" + #ifdef USE_TLS + #define TLSOPTS "A:Cd:fF:g:H:k:K:l:L:m:M:p:P:r:s:wX" + +@@ -1856,6 +1942,9 @@ static void parse_options(STATE *state, int argc, char *argv[]) + case 'o': + override(optarg); + break; ++ case 'R': ++ state->dosrv = 1; ++ break; + case 'S': + state->smtp = 0; + break; +diff --git a/src/smtp/lmtp_params.c b/src/smtp/lmtp_params.c +index cc33646..bca7cd4 100644 +--- a/src/smtp/lmtp_params.c ++++ b/src/smtp/lmtp_params.c +@@ -65,6 +65,7 @@ + VAR_LMTP_DNS_RE_FILTER, DEF_LMTP_DNS_RE_FILTER, &var_smtp_dns_re_filter, 0, 0, + VAR_TLSPROXY_SERVICE, DEF_TLSPROXY_SERVICE, &var_tlsproxy_service, 1, 0, + VAR_HFROM_FORMAT, DEF_HFROM_FORMAT, &var_hfrom_format, 1, 0, ++ VAR_USE_SRV_LOOKUP, DEF_USE_SRV_LOOKUP, &var_use_srv_lookup, 0, 0, + 0, + }; + static const CONFIG_TIME_TABLE lmtp_time_table[] = { +@@ -128,6 +129,8 @@ + VAR_LMTP_DUMMY_MAIL_AUTH, DEF_LMTP_DUMMY_MAIL_AUTH, &var_smtp_dummy_mail_auth, + VAR_LMTP_BALANCE_INET_PROTO, DEF_LMTP_BALANCE_INET_PROTO, &var_smtp_balance_inet_proto, + VAR_LMTP_BIND_ADDR_ENFORCE, DEF_LMTP_BIND_ADDR_ENFORCE, &var_smtp_bind_addr_enforce, ++ VAR_IGN_SRV_LOOKUP_ERR, DEF_IGN_SRV_LOOKUP_ERR, &var_ign_srv_lookup_err, ++ VAR_ALLOW_SRV_FALLBACK, DEF_ALLOW_SRV_FALLBACK, &var_allow_srv_fallback, + 0, + }; + static const CONFIG_NBOOL_TABLE lmtp_nbool_table[] = { +diff --git a/src/smtp/smtp.c b/src/smtp/smtp.c +index 0561d07..91672f8 100644 +--- a/src/smtp/smtp.c ++++ b/src/smtp/smtp.c +@@ -146,6 +146,7 @@ + /* RFC 2046 (MIME: Media Types) + /* RFC 2554 (AUTH command) + /* RFC 2821 (SMTP protocol) ++/* RFC 2782 (SRV resource records) + /* RFC 2920 (SMTP Pipelining) + /* RFC 3207 (STARTTLS command) + /* RFC 3461 (SMTP DSN Extension) +@@ -352,6 +353,17 @@ + /* DATA requests, when deadlines are enabled with smtp_per_request_deadline. + /* .IP "\fBheader_from_format (standard)\fR" + /* The format of the Postfix-generated \fBFrom:\fR header. ++/* .PP ++/* Backported from Postfix version 3.8: ++/* .IP "\fBuse_srv_lookup (empty)\fR" ++/* Enables discovery for the specified service(s) using DNS SRV ++/* records. ++/* .IP "\fBignore_srv_lookup_error (no)\fR" ++/* When SRV record lookup fails, fall back to MX or IP address ++/* lookup as if SRV record lookup was not enabled. ++/* .IP "\fBallow_srv_lookup_fallback (no)\fR" ++/* When SRV record lookup fails or no SRV record exists, fall back ++/* to MX or IP address lookup as if SRV record lookup was not enabled. + /* MIME PROCESSING CONTROLS + /* .ad + /* .fi +@@ -1085,6 +1097,9 @@ char *var_smtp_dns_re_filter; + bool var_smtp_balance_inet_proto; + bool var_smtp_req_deadline; + int var_smtp_min_data_rate; ++char *var_use_srv_lookup; ++bool var_ign_srv_lookup_err; ++bool var_allow_srv_fallback; + + /* Special handling of 535 AUTH errors. */ + char *var_smtp_sasl_auth_cache_name; +@@ -1111,6 +1126,7 @@ HBC_CHECKS *smtp_header_checks; /* limited header checks */ + HBC_CHECKS *smtp_body_checks; /* limited body checks */ + SMTP_CLI_ATTR smtp_cli_attr; /* parsed command-line */ + int smtp_hfrom_format; /* postmaster notifications */ ++STRING_LIST *smtp_use_srv_lookup; + + #ifdef USE_TLS + +@@ -1401,6 +1417,15 @@ static void post_init(char *unused_name, char **argv) + * header_from format, for postmaster notifications. + */ + smtp_hfrom_format = hfrom_format_parse(VAR_HFROM_FORMAT, var_hfrom_format); ++ ++ ++ /* ++ * Service discovery with SRV record lookup. ++ */ ++ if (*var_use_srv_lookup) ++ smtp_use_srv_lookup = string_list_init(VAR_USE_SRV_LOOKUP, ++ MATCH_FLAG_RETURN, ++ var_use_srv_lookup); + } + + /* pre_init - pre-jail initialization */ +diff --git a/src/smtp/smtp.h b/src/smtp/smtp.h +index 742ed30..0864313 100644 +--- a/src/smtp/smtp.h ++++ b/src/smtp/smtp.h +@@ -84,6 +84,14 @@ typedef struct SMTP_ITERATOR { + vstring_strcpy((iter)->dest, STR((iter)->saved_dest)); \ + } while (0) + ++#define SMTP_ITER_UPDATE_HOST(iter, _host, _addr, _rr) do { \ ++ vstring_strcpy((iter)->host, (_host)); \ ++ vstring_strcpy((iter)->addr, (_addr)); \ ++ (iter)->rr = (_rr); \ ++ if ((_rr)->port) \ ++ (iter)->port = htons((_rr)->port); /* SRV port override */ \ ++ } while (0) ++ + /* + * TLS Policy support. + */ +@@ -273,6 +281,7 @@ typedef struct SMTP_STATE { + #define SMTP_MISC_FLAG_COMPLETE_SESSION (1<<7) + #define SMTP_MISC_FLAG_PREF_IPV6 (1<<8) + #define SMTP_MISC_FLAG_PREF_IPV4 (1<<9) ++#define SMTP_MISC_FLAG_FALLBACK_SRV_TO_MX (1<<10) + + #define SMTP_MISC_FLAG_CONN_CACHE_MASK \ + (SMTP_MISC_FLAG_CONN_LOAD | SMTP_MISC_FLAG_CONN_STORE) +@@ -312,6 +321,8 @@ extern MAPS *smtp_generic_maps; /* make internal address valid */ + extern int smtp_ext_prop_mask; /* address extension propagation */ + extern unsigned smtp_dns_res_opt; /* DNS query flags */ + ++extern STRING_LIST *smtp_use_srv_lookup;/* services with SRV record lookup */ ++ + #ifdef USE_TLS + + extern TLS_APPL_STATE *smtp_tls_ctx; /* client-side TLS engine */ +diff --git a/src/smtp/smtp_addr.c b/src/smtp/smtp_addr.c +index 2b5c126..94adaa1 100644 +--- a/src/smtp/smtp_addr.c ++++ b/src/smtp/smtp_addr.c +@@ -17,6 +17,15 @@ + /* char *name; + /* int misc_flags; + /* DSN_BUF *why; ++/* ++/* DNS_RR *smtp_service_addr(name, service, mxrr, misc_flags, why, ++/* found_myself) ++/* const char *name; ++/* const char *service; ++/* DNS_RR **mxrr; ++/* int misc_flags; ++/* DSN_BUF *why; ++/* int *found_myself; + /* DESCRIPTION + /* This module implements Internet address lookups. By default, + /* lookups are done via the Internet domain name service (DNS). +@@ -33,6 +42,8 @@ + /* destination. If MX records were found, the rname, qname, + /* and dnssec validation status of the MX RRset are returned + /* via mxrr, which the caller must free with dns_rr_free(). ++/* Fallback from MX to address lookups is governed by RFC 2821, ++/* and by local policy (var_ign_mx_lookup_err). + /* + /* When no mail exchanger is listed in the DNS for \fIname\fR, the + /* request is passed to smtp_host_addr(). +@@ -44,8 +55,18 @@ + /* host. The host can be specified as a numerical Internet network + /* address, or as a symbolic host name. + /* +-/* Results from smtp_domain_addr() or smtp_host_addr() are +-/* destroyed by dns_rr_free(), including null lists. ++/* smtp_service_addr() looks up addresses for hosts specified ++/* in SRV records for the specified domain and service. This ++/* supports the features of smtp_domain_addr() except that ++/* the order of SRV records is determined by RFC 2782, and ++/* that address records are not sorted by IP address family ++/* preference. Fallback from SRV to MX or address lookups is ++/* governed by local policy (var_ign_mx_lookup_err and ++/* var_allow_srv_fallback). ++/* ++/* Results from smtp_domain_addr(), smtp_host_addr(), and ++/* smtp_service_addr() are destroyed by dns_rr_free(), including ++/* null lists. + /* DIAGNOSTICS + /* Panics: interface violations. For example, calling smtp_domain_addr() + /* when DNS lookups are explicitly disabled. +@@ -130,7 +151,8 @@ static void smtp_print_addr(const char *what, DNS_RR *addr_list) + /* smtp_addr_one - address lookup for one host name */ + + static DNS_RR *smtp_addr_one(DNS_RR *addr_list, const char *host, int res_opt, +- unsigned pref, DSN_BUF *why) ++ unsigned pref, unsigned port, ++ DSN_BUF *why) + { + const char *myname = "smtp_addr_one"; + DNS_RR *addr = 0; +@@ -153,6 +175,8 @@ static DNS_RR *smtp_addr_one(DNS_RR *addr_list, const char *host, int res_opt, + if ((addr = dns_sa_to_rr(host, pref, res0->ai_addr)) == 0) + msg_fatal("host %s: conversion error for address family " + "%d: %m", host, res0->ai_addr->sa_family); ++ addr->pref = pref; ++ addr->port = port; + addr_list = dns_rr_append(addr_list, addr); + if (msg_verbose) + msg_info("%s: using numerical host %s", myname, host); +@@ -174,8 +198,10 @@ static DNS_RR *smtp_addr_one(DNS_RR *addr_list, const char *host, int res_opt, + why->reason, DNS_REQ_FLAG_NONE, + proto_info->dns_atype_list)) { + case DNS_OK: +- for (rr = addr; rr; rr = rr->next) ++ for (rr = addr; rr; rr = rr->next) { + rr->pref = pref; ++ rr->port = port; ++ } + addr_list = dns_rr_append(addr_list, addr); + return (addr_list); + default: +@@ -293,10 +319,10 @@ static DNS_RR *smtp_addr_list(DNS_RR *mx_names, DSN_BUF *why) + * tweaking the in-process resolver flags. + */ + for (rr = mx_names; rr; rr = rr->next) { +- if (rr->type != T_MX) ++ if (rr->type != T_MX && rr->type != T_SRV) + msg_panic("smtp_addr_list: bad resource type: %d", rr->type); + addr_list = smtp_addr_one(addr_list, (char *) rr->data, res_opt, +- rr->pref, why); ++ rr->pref, rr->port, why); + } + return (addr_list); + } +@@ -678,7 +704,7 @@ DNS_RR *smtp_host_addr(const char *host, int misc_flags, DSN_BUF *why) + * address to internal form. Otherwise, the host is specified by name. + */ + #define PREF0 0 +- addr_list = smtp_addr_one((DNS_RR *) 0, ahost, res_opt, PREF0, why); ++ addr_list = smtp_addr_one((DNS_RR *) 0, ahost, res_opt, PREF0, 0, why); + if (addr_list + && (misc_flags & SMTP_MISC_FLAG_LOOP_DETECT) + && smtp_find_self(addr_list) != 0) { +@@ -700,3 +726,135 @@ DNS_RR *smtp_host_addr(const char *host, int misc_flags, DSN_BUF *why) + smtp_print_addr(host, addr_list); + return (addr_list); + } ++ ++/* smtp_service_addr - service address lookup */ ++ ++DNS_RR *smtp_service_addr(const char *name, const char *service, DNS_RR **mxrr, ++ int misc_flags, DSN_BUF *why, ++ int *found_myself) ++{ ++ static VSTRING *srv_qname = 0; ++ const char *str_srv_qname; ++ DNS_RR *srv_names = 0; ++ DNS_RR *addr_list = 0; ++ DNS_RR *self = 0; ++ unsigned best_pref; ++ unsigned best_found; ++ int r = 0; ++ const char *aname; ++ int allow_non_srv_fallback = var_allow_srv_fallback; ++ ++ dsb_reset(why); ++ ++ /* ++ * Sanity check. ++ */ ++ if (smtp_dns_support == SMTP_DNS_DISABLED) ++ msg_panic("smtp_service_addr: DNS lookup is disabled"); ++ ++ if (smtp_dns_support == SMTP_DNS_DNSSEC) { ++ r |= RES_USE_DNSSEC; ++ } ++ if (srv_qname == 0) ++ srv_qname = vstring_alloc(100); ++ vstring_sprintf(srv_qname, "_%s._tcp.%s", service, name); ++ str_srv_qname = STR(srv_qname); ++ ++ /* ++ * IDNA support. ++ */ ++#ifndef NO_EAI ++ if (!allascii(str_srv_qname) ++ && (aname = midna_domain_to_ascii(str_srv_qname)) != 0) { ++ if (msg_verbose) ++ msg_info("%s asciified to %s", str_srv_qname, aname); ++ } else ++#endif ++ aname = str_srv_qname; ++ ++ switch (dns_lookup(aname, T_SRV, r, &srv_names, (VSTRING *) 0, ++ why->reason)) { ++ default: ++ dsb_status(why, "4.4.3"); ++ allow_non_srv_fallback |= var_ign_srv_lookup_err; ++ break; ++ case DNS_INVAL: ++ dsb_status(why, "5.4.4"); ++ allow_non_srv_fallback |= var_ign_srv_lookup_err; ++ break; ++ case DNS_POLICY: ++ dsb_status(why, "4.7.0"); ++ break; ++ case DNS_FAIL: ++ dsb_status(why, "5.4.3"); ++ allow_non_srv_fallback |= var_ign_srv_lookup_err; ++ break; ++ case DNS_NULLSRV: ++ dsb_status(why, "5.1.0"); ++ break; ++ case DNS_OK: ++ /* Shuffle then sort the SRV rr records by priority and weight. */ ++ srv_names = dns_srv_rr_sort(srv_names); ++ best_pref = (srv_names ? srv_names->pref : IMPOSSIBLE_PREFERENCE); ++ addr_list = smtp_addr_list(srv_names, why); ++ if (mxrr) ++ *mxrr = dns_rr_copy(srv_names); /* copies one record! */ ++ dns_rr_free(srv_names); ++ if (addr_list == 0) { ++ msg_warn("no SRV host for %s has a valid address record", ++ str_srv_qname); ++ break; ++ } ++ /* Optional loop prevention, similar to smtp_domain_addr(). */ ++ best_found = (addr_list ? addr_list->pref : IMPOSSIBLE_PREFERENCE); ++ if (msg_verbose) ++ smtp_print_addr(aname, addr_list); ++ if ((misc_flags & SMTP_MISC_FLAG_LOOP_DETECT) ++ && (self = smtp_find_self(addr_list)) != 0) { ++ addr_list = smtp_truncate_self(addr_list, self->pref); ++ if (addr_list == 0) { ++ if (best_pref != best_found) { ++ dsb_simple(why, "4.4.4", ++ "unable to find primary relay for %s", ++ str_srv_qname); ++ } else { ++ dsb_simple(why, "5.4.6", "mail for %s loops back to myself", ++ str_srv_qname); ++ } ++ } ++ } ++ /* TODO: sort by priority, weight, and address family preference. */ ++ ++ /* Optional address family balancing, as in smtp_domain_addr(). */ ++ if (addr_list && addr_list->next) { ++ if (var_smtp_mxaddr_limit > 0 && var_smtp_balance_inet_proto) ++ addr_list = smtp_balance_inet_proto(addr_list, misc_flags, ++ var_smtp_mxaddr_limit); ++ } ++ break; ++ case DNS_NOTFOUND: ++ dsb_status(why, "5.4.4"); ++ break; ++ } ++ ++ /* ++ * If permitted, fall back to non-SRV record lookups. ++ */ ++ if (addr_list == 0 && allow_non_srv_fallback) { ++ msg_info("skipping SRV lookup for %s: %s", ++ str_srv_qname, STR(why->reason)); ++ if (misc_flags & SMTP_MISC_FLAG_FALLBACK_SRV_TO_MX) ++ addr_list = smtp_domain_addr(name, mxrr, misc_flags, why, ++ found_myself); ++ else ++ addr_list = smtp_host_addr(name, misc_flags, why); ++ } ++ ++ /* ++ * Only if we're not falling back. ++ */ ++ else { ++ *found_myself |= (self != 0); ++ } ++ return (addr_list); ++} +diff --git a/src/smtp/smtp_addr.h b/src/smtp/smtp_addr.h +index 8f20961..3d70413 100644 +--- a/src/smtp/smtp_addr.h ++++ b/src/smtp/smtp_addr.h +@@ -18,6 +18,7 @@ + */ + extern DNS_RR *smtp_host_addr(const char *, int, DSN_BUF *); + extern DNS_RR *smtp_domain_addr(const char *, DNS_RR **, int, DSN_BUF *, int *); ++extern DNS_RR *smtp_service_addr(const char *, const char *, DNS_RR **, int, DSN_BUF *, int *); + + /* LICENSE + /* .ad +diff --git a/src/smtp/smtp_connect.c b/src/smtp/smtp_connect.c +index ed58180..68faca1 100644 +--- a/src/smtp/smtp_connect.c ++++ b/src/smtp/smtp_connect.c +@@ -28,7 +28,8 @@ + /* destinations may be specified as "unix:pathname", "inet:host" + /* or "inet:host:port". + /* +-/* With SMTP, the Internet domain name service is queried for mail ++/* With SMTP, or with SRV record lookup enabled, the Internet ++/* domain name service is queried for mail + /* exchanger hosts. Quote the domain name with `[' and `]' to + /* suppress mail exchanger lookups. + /* +@@ -357,7 +358,8 @@ static SMTP_SESSION *smtp_connect_sock(int sock, struct sockaddr *sa, + /* smtp_parse_destination - parse host/port destination */ + + static char *smtp_parse_destination(char *destination, char *def_service, +- char **hostp, unsigned *portp) ++ char **hostp, char **servicep, ++ unsigned *portp) + { + char *buf = mystrdup(destination); + char *service; +@@ -373,13 +375,13 @@ static char *smtp_parse_destination(char *destination, char *def_service, + * Parse the host/port information. We're working with a copy of the + * destination argument so the parsing can be destructive. + */ +- if ((err = host_port(buf, hostp, (char *) 0, &service, def_service)) != 0) ++ if ((err = host_port(buf, hostp, (char *) 0, servicep, def_service)) != 0) + msg_fatal("%s in server description: %s", err, destination); + + /* + * Convert service to port number, network byte order. + */ +- service = (char *) filter_known_tcp_port(service); ++ service = (char *) filter_known_tcp_port(*servicep); + if (alldig(service)) { + if ((port = atoi(service)) >= 65536 || port == 0) + msg_fatal("bad network port: %s for destination: %s", +@@ -661,6 +663,9 @@ static void smtp_update_addr_list(DNS_RR **addr_list, const char *server_addr, + * XXX Extend the SMTP_SESSION structure with sockaddr information so that + * we can avoid repeated string->binary transformations for the same + * address. ++ * ++ * XXX SRV support: this should match the port, too, otherwise we may ++ * eliminate too many list entries. + */ + if ((aierr = hostaddr_to_sockaddr(server_addr, (char *) 0, 0, &res0)) != 0) { + msg_warn("hostaddr_to_sockaddr %s: %s", +@@ -691,6 +696,18 @@ static int smtp_reuse_session(SMTP_STATE *state, DNS_RR **addr_list, + DSN_BUF *why = state->why; + + /* ++ * This code is called after server address/port lookup, before ++ * iter->host, iter->addr, iter->rr and iter->mx are assigned concrete ++ * values, and while iter->port still corresponds to the nexthop service, ++ * or the default service configured with smtp_tcp_port or lmtp_tcp_port. ++ * ++ * When a connection is reused by nexthop/service or by server address/port, ++ * iter->host, iter->addr and iter->port are updated with actual values ++ * from the cached session. Additionally, when a connection is searched ++ * by nexthop/service, iter->rr remains null, and when a connection is ++ * searched by server address/port, iter->rr is updated with an actual ++ * server address/port before the search is made. ++ * + * First, search the cache by delivery request nexthop. We truncate the + * server address list when all the sessions for this destination are + * used up, to reduce the number of variables that need to be checked +@@ -757,9 +774,7 @@ static int smtp_reuse_session(SMTP_STATE *state, DNS_RR **addr_list, + /* XXX Assume there is no code at the end of this loop. */ + continue; + } +- vstring_strcpy(iter->addr, hostaddr.buf); +- vstring_strcpy(iter->host, SMTP_HNAME(addr)); +- iter->rr = addr; ++ SMTP_ITER_UPDATE_HOST(iter, SMTP_HNAME(addr), hostaddr.buf, addr); + #ifdef USE_TLS + if (!smtp_tls_policy_cache_query(why, state->tls, iter)) { + msg_warn("TLS policy lookup error for %s/%s: %s", +@@ -844,6 +859,7 @@ static void smtp_connect_inet(SMTP_STATE *state, const char *nexthop, + char *dest_buf; + char *domain; + unsigned port; ++ char *service; + DNS_RR *addr_list; + DNS_RR *addr; + DNS_RR *next; +@@ -851,6 +867,8 @@ static void smtp_connect_inet(SMTP_STATE *state, const char *nexthop, + int sess_count; + SMTP_SESSION *session; + int lookup_mx; ++ int non_dns_or_literal; ++ int i_am_mx; + unsigned domain_best_pref; + MAI_HOSTADDR_STR hostaddr; + +@@ -860,8 +878,28 @@ static void smtp_connect_inet(SMTP_STATE *state, const char *nexthop, + /* + * Parse the destination. If no TCP port is specified, use the port + * that is reserved for the protocol (SMTP or LMTP). ++ * ++ * The 'service' variable corresponds to the remote service specified ++ * with the nexthop, or the default service configured with ++ * smtp_tcp_port or lmtp_tcp_port. The 'port' variable and ++ * SMTP_ITERATOR.port initially correspond to that service. This ++ * determines what loop prevention will be in effect. ++ * ++ * The SMTP_ITERATOR.port will be overwritten after SRV record lookup. ++ * This guarantees that the connection cache key contains the correct ++ * port value when caching and retrieving a connection by its server ++ * address (and port). ++ * ++ * By design, the connection cache key contains NO port information when ++ * caching or retrieving a connection by its nexthop destination. ++ * Instead, the cache key contains the master.cf service name (a ++ * proxy for all the parameter settings including the default service ++ * from smtp_tcp_port or lmtp_tcp_port), together with the nexthop ++ * destination and sender-dependent info. This should be sufficient ++ * to avoid cross talk between mail streams that should be separated. + */ +- dest_buf = smtp_parse_destination(dest, def_service, &domain, &port); ++ dest_buf = smtp_parse_destination(dest, def_service, &domain, ++ &service, &port); + if (var_helpful_warnings && var_smtp_tls_wrappermode == 0 + && ntohs(port) == 465) { + msg_info("SMTPS wrappermode (TCP port 465) requires setting " +@@ -874,32 +912,48 @@ static void smtp_connect_inet(SMTP_STATE *state, const char *nexthop, + SMTP_ITER_INIT(iter, dest, NO_HOST, NO_ADDR, port, state); + + /* +- * Resolve an SMTP or LMTP server. In the case of SMTP, skip mail +- * exchanger lookups when a quoted host is specified or when DNS +- * lookups are disabled. ++ * Resolve an SMTP or LMTP server. Skip MX or SRV lookups when a ++ * quoted domain is specified or when DNS lookups are disabled. + */ + if (msg_verbose) +- msg_info("connecting to %s port %d", domain, ntohs(port)); ++ msg_info("connecting to %s service %s", domain, service); ++ non_dns_or_literal = (smtp_dns_support == SMTP_DNS_DISABLED ++ || *dest == '['); + if (smtp_mode) { + if (ntohs(port) == IPPORT_SMTP) + state->misc_flags |= SMTP_MISC_FLAG_LOOP_DETECT; + else + state->misc_flags &= ~SMTP_MISC_FLAG_LOOP_DETECT; +- lookup_mx = (smtp_dns_support != SMTP_DNS_DISABLED && *dest != '['); ++ lookup_mx = !non_dns_or_literal; + } else + lookup_mx = 0; +- if (!lookup_mx) { ++ ++ /* ++ * Look up SRV and address records and fall back to non-SRV lookups ++ * if permitted by configuration settings, or look up MX and address ++ * records, or look up address records only. ++ */ ++ i_am_mx = 0; ++ addr_list = 0; ++ if (!non_dns_or_literal && smtp_use_srv_lookup ++ && string_list_match(smtp_use_srv_lookup, service)) { ++ if (lookup_mx) ++ state->misc_flags |= SMTP_MISC_FLAG_FALLBACK_SRV_TO_MX; ++ else ++ state->misc_flags &= ~SMTP_MISC_FLAG_FALLBACK_SRV_TO_MX; ++ addr_list = smtp_service_addr(domain, service, &iter->mx, ++ state->misc_flags, why, &i_am_mx); ++ } else if (!lookup_mx) { ++ /* Non-DNS, literal, or non-SMTP service */ + addr_list = smtp_host_addr(domain, state->misc_flags, why); + /* XXX We could be an MX host for this destination... */ + } else { +- int i_am_mx = 0; +- + addr_list = smtp_domain_addr(domain, &iter->mx, state->misc_flags, + why, &i_am_mx); +- /* If we're MX host, don't connect to non-MX backups. */ +- if (i_am_mx) +- state->misc_flags |= SMTP_MISC_FLAG_FINAL_NEXTHOP; + } ++ /* If we're MX host, don't connect to non-MX backups. */ ++ if (i_am_mx) ++ state->misc_flags |= SMTP_MISC_FLAG_FINAL_NEXTHOP; + + /* + * Don't try fall-back hosts if mail loops to myself. That would just +@@ -992,9 +1046,7 @@ static void smtp_connect_inet(SMTP_STATE *state, const char *nexthop, + /* XXX Assume there is no code at the end of this loop. */ + continue; + } +- vstring_strcpy(iter->addr, hostaddr.buf); +- vstring_strcpy(iter->host, SMTP_HNAME(addr)); +- iter->rr = addr; ++ SMTP_ITER_UPDATE_HOST(iter, SMTP_HNAME(addr), hostaddr.buf, addr); + #ifdef USE_TLS + if (!smtp_tls_policy_cache_query(why, state->tls, iter)) { + msg_warn("TLS policy lookup for %s/%s: %s", +diff --git a/src/smtp/smtp_params.c b/src/smtp/smtp_params.c +index cd54f8f..22f4709 100644 +--- a/src/smtp/smtp_params.c ++++ b/src/smtp/smtp_params.c +@@ -66,6 +66,7 @@ + VAR_SMTP_DNS_RE_FILTER, DEF_SMTP_DNS_RE_FILTER, &var_smtp_dns_re_filter, 0, 0, + VAR_TLSPROXY_SERVICE, DEF_TLSPROXY_SERVICE, &var_tlsproxy_service, 1, 0, + VAR_HFROM_FORMAT, DEF_HFROM_FORMAT, &var_hfrom_format, 1, 0, ++ VAR_USE_SRV_LOOKUP, DEF_USE_SRV_LOOKUP, &var_use_srv_lookup, 0, 0, + 0, + }; + static const CONFIG_TIME_TABLE smtp_time_table[] = { +@@ -132,6 +133,8 @@ + VAR_SMTP_DUMMY_MAIL_AUTH, DEF_SMTP_DUMMY_MAIL_AUTH, &var_smtp_dummy_mail_auth, + VAR_SMTP_BALANCE_INET_PROTO, DEF_SMTP_BALANCE_INET_PROTO, &var_smtp_balance_inet_proto, + VAR_SMTP_BIND_ADDR_ENFORCE, DEF_SMTP_BIND_ADDR_ENFORCE, &var_smtp_bind_addr_enforce, ++ VAR_IGN_SRV_LOOKUP_ERR, DEF_IGN_SRV_LOOKUP_ERR, &var_ign_srv_lookup_err, ++ VAR_ALLOW_SRV_FALLBACK, DEF_ALLOW_SRV_FALLBACK, &var_allow_srv_fallback, + 0, + }; + static const CONFIG_NBOOL_TABLE smtp_nbool_table[] = { +diff --git a/src/smtp/smtp_session.c b/src/smtp/smtp_session.c +index 9f13978..90a0ff1 100644 +--- a/src/smtp/smtp_session.c ++++ b/src/smtp/smtp_session.c +@@ -129,6 +129,7 @@ + #define SESS_ATTR_DEST "destination" + #define SESS_ATTR_HOST "host_name" + #define SESS_ATTR_ADDR "host_addr" ++#define SESS_ATTR_PORT "host_port" + #define SESS_ATTR_DEST_FEATURES "destination_features" + + #define SESS_ATTR_TLS_LEVEL "tls_level" +@@ -259,6 +260,7 @@ int smtp_session_passivate(SMTP_SESSION *session, VSTRING *dest_prop, + SEND_ATTR_STR(SESS_ATTR_DEST, STR(iter->dest)), + SEND_ATTR_STR(SESS_ATTR_HOST, STR(iter->host)), + SEND_ATTR_STR(SESS_ATTR_ADDR, STR(iter->addr)), ++ SEND_ATTR_UINT(SESS_ATTR_PORT, iter->port), + SEND_ATTR_INT(SESS_ATTR_DEST_FEATURES, + session->features & SMTP_FEATURE_DESTINATION_MASK), + ATTR_TYPE_END) != 0 +@@ -398,9 +400,10 @@ SMTP_SESSION *smtp_session_activate(int fd, SMTP_ITERATOR *iter, + RECV_ATTR_STR(SESS_ATTR_DEST, iter->dest), + RECV_ATTR_STR(SESS_ATTR_HOST, iter->host), + RECV_ATTR_STR(SESS_ATTR_ADDR, iter->addr), ++ RECV_ATTR_UINT(SESS_ATTR_PORT, &iter->port), + RECV_ATTR_INT(SESS_ATTR_DEST_FEATURES, + &dest_features), +- ATTR_TYPE_END) != 4 ++ ATTR_TYPE_END) != 5 + || vstream_fclose(mp) != 0) { + msg_warn("smtp_session_passivate: bad cached dest properties"); + SMTP_SESSION_ACTIVATE_ERR_RETURN(); +diff --git a/src/smtpd/smtpd_check.c b/src/smtpd/smtpd_check.c +index a4a6af0..aa6200f 100644 +--- a/src/smtpd/smtpd_check.c ++++ b/src/smtpd/smtpd_check.c +@@ -3064,8 +3064,8 @@ static int check_server_access(SMTPD_STATE *state, const char *table, + || type == T_AAAA + #endif + ) { +- server_list = dns_rr_create(domain, domain, T_MX, C_IN, 0, 0, +- domain, strlen(domain) + 1); ++ server_list = dns_rr_create_nopref(domain, domain, T_MX, C_IN, 0, ++ domain, strlen(domain) + 1); + } else { + dns_status = dns_lookup(domain, type, 0, &server_list, + (VSTRING *) 0, (VSTRING *) 0); +@@ -3073,8 +3073,8 @@ static int check_server_access(SMTPD_STATE *state, const char *table, + return (SMTPD_CHECK_DUNNO); + if (dns_status == DNS_NOTFOUND /* Not: h_errno == NO_DATA */ ) { + if (type == T_MX) { +- server_list = dns_rr_create(domain, domain, type, C_IN, 0, 0, +- domain, strlen(domain) + 1); ++ server_list = dns_rr_create_nopref(domain, domain, type, C_IN, ++ 0, domain, strlen(domain) + 1); + dns_status = DNS_OK; + } else if (type == T_NS /* && h_errno == NO_DATA */ ) { + while ((domain = strchr(domain, '.')) != 0 && domain[1]) { +diff --git a/src/util/attr.h b/src/util/attr.h +index 067405f..7cd0cf2 100644 +--- a/src/util/attr.h ++++ b/src/util/attr.h +@@ -62,6 +62,7 @@ typedef int (*ATTR_PRINT_CUSTOM_FN) (ATTR_PRINT_COMMON_FN, VSTREAM *, int, const + * for documentation. + */ + #define SEND_ATTR_INT(name, val) ATTR_TYPE_INT, CHECK_CPTR(ATTR, char, (name)), CHECK_VAL(ATTR, int, (val)) ++#define SEND_ATTR_UINT(name, val) ATTR_TYPE_INT, CHECK_CPTR(ATTR, char, (name)), CHECK_VAL(ATTR, unsigned, (val)) + #define SEND_ATTR_STR(name, val) ATTR_TYPE_STR, CHECK_CPTR(ATTR, char, (name)), CHECK_CPTR(ATTR, char, (val)) + #define SEND_ATTR_HASH(val) ATTR_TYPE_HASH, CHECK_CPTR(ATTR, HTABLE, (val)) + #define SEND_ATTR_NV(val) ATTR_TYPE_NV, CHECK_CPTR(ATTR, NVTABLE, (val)) +@@ -70,6 +71,7 @@ typedef int (*ATTR_PRINT_CUSTOM_FN) (ATTR_PRINT_COMMON_FN, VSTREAM *, int, const + #define SEND_ATTR_FUNC(func, val) ATTR_TYPE_FUNC, CHECK_VAL(ATTR, ATTR_PRINT_CUSTOM_FN, (func)), CHECK_CPTR(ATTR, void, (val)) + + #define RECV_ATTR_INT(name, val) ATTR_TYPE_INT, CHECK_CPTR(ATTR, char, (name)), CHECK_PTR(ATTR, int, (val)) ++#define RECV_ATTR_UINT(name, val) ATTR_TYPE_INT, CHECK_CPTR(ATTR, char, (name)), CHECK_PTR(ATTR, unsigned, (val)) + #define RECV_ATTR_STR(name, val) ATTR_TYPE_STR, CHECK_CPTR(ATTR, char, (name)), CHECK_PTR(ATTR, VSTRING, (val)) + #define RECV_ATTR_STREQ(name, val) ATTR_TYPE_STREQ, CHECK_CPTR(ATTR, char, (name)), CHECK_CPTR(ATTR, char, (val)) + #define RECV_ATTR_HASH(val) ATTR_TYPE_HASH, CHECK_PTR(ATTR, HTABLE, (val)) +@@ -81,9 +83,11 @@ typedef int (*ATTR_PRINT_CUSTOM_FN) (ATTR_PRINT_COMMON_FN, VSTREAM *, int, const + CHECK_VAL_HELPER_DCL(ATTR, ssize_t); + CHECK_VAL_HELPER_DCL(ATTR, long); + CHECK_VAL_HELPER_DCL(ATTR, int); ++CHECK_VAL_HELPER_DCL(ATTR, unsigned); + CHECK_PTR_HELPER_DCL(ATTR, void); + CHECK_PTR_HELPER_DCL(ATTR, long); + CHECK_PTR_HELPER_DCL(ATTR, int); ++CHECK_PTR_HELPER_DCL(ATTR, unsigned); + CHECK_PTR_HELPER_DCL(ATTR, VSTRING); + CHECK_PTR_HELPER_DCL(ATTR, NVTABLE); + CHECK_PTR_HELPER_DCL(ATTR, HTABLE); diff --git a/postfix.spec b/postfix.spec index d8d1407..06b18b0 100644 --- a/postfix.spec +++ b/postfix.spec @@ -49,7 +49,7 @@ Name: postfix Summary: Postfix Mail Transport Agent Version: 3.7.4 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IBM and GPLv2+) or (EPL-2.0 and GPLv2+) @@ -101,6 +101,8 @@ Patch11: postfix-3.4.4-chroot-example-fix.patch Patch12: postfix-3.7.0-whitespace-name-fix.patch # rhbz#1931403, sent upstream Patch13: pflogsumm-1.1.5-syslog-name-underscore-fix.patch +# backported feature from upstream +Patch14: postfix-3.7.4-SRV-resolve.patch # Optional patches - set the appropriate environment variables to include # them when building the package/spec file @@ -253,6 +255,7 @@ popd %patch11 -p1 -b .chroot-example-fix %patch12 -p1 -b .whitespace-name-fix %patch13 -p1 -b .pflogsumm-1.1.5-syslog-name-underscore-fix +%patch14 -p1 -b .SRV # Backport 3.8-20221006 fix for uname -r detection sed -i makedefs -e '\@Linux\.@s|345|3456|' @@ -806,6 +809,9 @@ fi %endif %changelog +* Thu Jun 08 2023 Tomas Korbar - 2:3.7.4-2 +- Backport SRV resolution from 3.8.0 release + * Wed Jan 25 2023 Jaroslav Škarvada - 2:3.7.4-1 - New version Resolves: rhbz#2162932 From daef2e4088e6e0b8d1d3bef93e5a34b04f16c4c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dora=20O=E2=80=99Fee?= Date: Sat, 8 Jul 2023 01:26:22 +0000 Subject: [PATCH 07/55] Fix master.pid: No such file or directory error --- postfix.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postfix.service b/postfix.service index 7a798fb..1016ac3 100644 --- a/postfix.service +++ b/postfix.service @@ -11,7 +11,7 @@ PrivateTmp=true CapabilityBoundingSet=~ CAP_NET_ADMIN CAP_SYS_ADMIN CAP_SYS_BOOT CAP_SYS_MODULE ProtectSystem=true PrivateDevices=true -ExecStartPre=-/usr/sbin/restorecon -R /var/spool/postfix/pid/master.pid +ExecStartPre=-/usr/sbin/restorecon -R /var/spool/postfix/pid ExecStartPre=-/usr/libexec/postfix/aliasesdb ExecStartPre=-/usr/libexec/postfix/chroot-update ExecStart=/usr/sbin/postfix start From 2548b6b070a824532b50827f502596adac81876e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Tue, 11 Jul 2023 13:55:28 +0200 Subject: [PATCH 08/55] Fixed possible warning when postfix is restarted Resolves: rhbz#2218058 --- postfix.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/postfix.spec b/postfix.spec index b69a12f..90fff80 100644 --- a/postfix.spec +++ b/postfix.spec @@ -49,7 +49,7 @@ Name: postfix Summary: Postfix Mail Transport Agent Version: 3.8.1 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IBM and GPLv2+) or (EPL-2.0 and GPLv2+) @@ -804,6 +804,10 @@ fi %endif %changelog +* Tue Jul 11 2023 Jaroslav Škarvada - 2:3.8.1-2 +- Fixed possible warning when postfix is restarted + Resolves: rhbz#2218058 + * Tue Jun 6 2023 Jaroslav Škarvada - 2:3.8.1-1 - New version Resolves: rhbz#2212596 From 86d5a50db165634aa74a807a7bc1871265f12cc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Tue, 11 Jul 2023 13:57:14 +0200 Subject: [PATCH 09/55] Fixed possible warning when postfix is restarted Resolves: rhbz#2218058 --- postfix.service | 2 +- postfix.spec | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/postfix.service b/postfix.service index 7a798fb..1016ac3 100644 --- a/postfix.service +++ b/postfix.service @@ -11,7 +11,7 @@ PrivateTmp=true CapabilityBoundingSet=~ CAP_NET_ADMIN CAP_SYS_ADMIN CAP_SYS_BOOT CAP_SYS_MODULE ProtectSystem=true PrivateDevices=true -ExecStartPre=-/usr/sbin/restorecon -R /var/spool/postfix/pid/master.pid +ExecStartPre=-/usr/sbin/restorecon -R /var/spool/postfix/pid ExecStartPre=-/usr/libexec/postfix/aliasesdb ExecStartPre=-/usr/libexec/postfix/chroot-update ExecStart=/usr/sbin/postfix start diff --git a/postfix.spec b/postfix.spec index 06b18b0..a631951 100644 --- a/postfix.spec +++ b/postfix.spec @@ -49,7 +49,7 @@ Name: postfix Summary: Postfix Mail Transport Agent Version: 3.7.4 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IBM and GPLv2+) or (EPL-2.0 and GPLv2+) @@ -809,6 +809,10 @@ fi %endif %changelog +* Tue Jul 11 2023 Jaroslav Škarvada - 2:3.7.4-3 +- Fixed possible warning when postfix is restarted + Resolves: rhbz#2218058 + * Thu Jun 08 2023 Tomas Korbar - 2:3.7.4-2 - Backport SRV resolution from 3.8.0 release From 032b6a18cdd75a26ac9568aff461a55c20a9e22a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= Date: Tue, 11 Jul 2023 22:20:45 +0200 Subject: [PATCH 10/55] Rebuilt for ICU 73.2 --- postfix.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/postfix.spec b/postfix.spec index 90fff80..05e06a4 100644 --- a/postfix.spec +++ b/postfix.spec @@ -49,7 +49,7 @@ Name: postfix Summary: Postfix Mail Transport Agent Version: 3.8.1 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IBM and GPLv2+) or (EPL-2.0 and GPLv2+) @@ -804,6 +804,9 @@ fi %endif %changelog +* Tue Jul 11 2023 František Zatloukal - 2:3.8.1-3 +- Rebuilt for ICU 73.2 + * Tue Jul 11 2023 Jaroslav Škarvada - 2:3.8.1-2 - Fixed possible warning when postfix is restarted Resolves: rhbz#2218058 From 64f10e56029907322cd3d51a60e08a0bc2732fa6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jul 2023 06:06:38 +0000 Subject: [PATCH 11/55] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- postfix.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/postfix.spec b/postfix.spec index 05e06a4..5d5aacd 100644 --- a/postfix.spec +++ b/postfix.spec @@ -49,7 +49,7 @@ Name: postfix Summary: Postfix Mail Transport Agent Version: 3.8.1 -Release: 3%{?dist} +Release: 4%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IBM and GPLv2+) or (EPL-2.0 and GPLv2+) @@ -804,6 +804,9 @@ fi %endif %changelog +* Fri Jul 21 2023 Fedora Release Engineering - 2:3.8.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Tue Jul 11 2023 František Zatloukal - 2:3.8.1-3 - Rebuilt for ICU 73.2 From 42292a103eaba98fa9fa0ac58807296513ab1ff9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Mon, 14 Aug 2023 15:38:32 +0200 Subject: [PATCH 12/55] Use systemd-sysusers, original patch by Jonathan Wright --- postfix.spec | 26 +++++++++++++++----------- postfix.sysusers | 4 ++++ 2 files changed, 19 insertions(+), 11 deletions(-) create mode 100644 postfix.sysusers diff --git a/postfix.spec b/postfix.spec index 5d5aacd..740d880 100644 --- a/postfix.spec +++ b/postfix.spec @@ -21,12 +21,9 @@ # Postfix requires one exlusive uid/gid and a 2nd exclusive gid for its own # use. Let me know if the second gid collides with another package. # Be careful: Redhat's 'mail' user & group isn't unique! -%define postfix_uid 89 +# It's now handled by systemd-sysusers. %define postfix_user postfix -%define postfix_gid 89 -%define postfix_group postfix %define maildrop_group postdrop -%define maildrop_gid 90 %define postfix_config_dir %{_sysconfdir}/postfix %define postfix_daemon_dir %{_libexecdir}/postfix @@ -49,15 +46,13 @@ Name: postfix Summary: Postfix Mail Transport Agent Version: 3.8.1 -Release: 4%{?dist} +Release: 5%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IBM and GPLv2+) or (EPL-2.0 and GPLv2+) Requires(post): systemd systemd-sysv hostname Requires(post): %{_sbindir}/alternatives Requires(post): %{_bindir}/openssl -Requires(pre): %{_sbindir}/groupadd -Requires(pre): %{_sbindir}/useradd Requires(preun): %{_sbindir}/alternatives Requires(preun): systemd Requires(postun): systemd @@ -74,6 +69,7 @@ Source2: postfix.service Source3: README-Postfix-SASL-RedHat.txt Source4: postfix.aliasesdb Source5: postfix-chroot-update +Source6: postfix.sysusers # Sources 50-99 are upstream [patch] contributions @@ -110,6 +106,7 @@ BuildRequires: make BuildRequires: libdb-devel, perl-generators, pkgconfig, zlib-devel BuildRequires: systemd-units, libicu-devel BuildRequires: gcc, m4, findutils +BuildRequires: systemd-rpm-macros %if 0%{?rhel} < 9 BuildRequires: libnsl2-devel %endif @@ -384,6 +381,9 @@ install -m 644 %{SOURCE2} %{buildroot}%{_unitdir} install -m 755 %{SOURCE4} %{buildroot}%{postfix_daemon_dir}/aliasesdb install -m 755 %{SOURCE5} %{buildroot}%{postfix_daemon_dir}/chroot-update +# systemd-sysusers +install -p -D -m 0644 %{SOURCE6} %{buildroot}%{_sysusersdir}/postfix.conf + install -c auxiliary/rmail/rmail $RPM_BUILD_ROOT%{_bindir}/rmail.postfix for i in active bounce corrupt defer deferred flush incoming private saved maildrop public pid saved trace; do @@ -539,10 +539,7 @@ exit 0 %pre # Add user and groups if necessary -%{_sbindir}/groupadd -g %{maildrop_gid} -r %{maildrop_group} 2>/dev/null -%{_sbindir}/groupadd -g %{postfix_gid} -r %{postfix_group} 2>/dev/null -%{_sbindir}/groupadd -g 12 -r mail 2>/dev/null -%{_sbindir}/useradd -d %{postfix_queue_dir} -s /sbin/nologin -g %{postfix_group} -G mail -M -r -u %{postfix_uid} %{postfix_user} 2>/dev/null +%sysusers_create_compat %{SOURCE6} # hack, to turn man8/smtpd.8.gz into alternatives symlink (part of the rhbz#1051180 fix) # this could be probably dropped in f23+ @@ -726,6 +723,9 @@ fi %ghost %attr(0644, root, root) %{_var}/lib/misc/postfix.aliasesdb-stamp +# systemd-sysusers +%{_sysusersdir}/postfix.conf + %if 0%{?fedora} < 23 && 0%{?rhel} < 9 %files sysvinit %{_initrddir}/postfix @@ -804,6 +804,10 @@ fi %endif %changelog +* Mon Aug 14 2023 Jaroslav Škarvada - 2:3.8.1-5 +- Use systemd-sysusers, original patch by + Jonathan Wright + * Fri Jul 21 2023 Fedora Release Engineering - 2:3.8.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild diff --git a/postfix.sysusers b/postfix.sysusers new file mode 100644 index 0000000..876b305 --- /dev/null +++ b/postfix.sysusers @@ -0,0 +1,4 @@ +u postfix 89 - /var/spool/postfix /sbin/nologin +g postdrop 90 +g mail 12 +m postfix mail From e1e2ac872bbe77f7107fa8c3c414584b7ac08f4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Tue, 5 Sep 2023 15:17:21 +0200 Subject: [PATCH 13/55] New version Resolves: rhbz#2236828 --- postfix.spec | 8 ++++++-- sources | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/postfix.spec b/postfix.spec index 740d880..f9ef5a1 100644 --- a/postfix.spec +++ b/postfix.spec @@ -45,8 +45,8 @@ Name: postfix Summary: Postfix Mail Transport Agent -Version: 3.8.1 -Release: 5%{?dist} +Version: 3.8.2 +Release: 1%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IBM and GPLv2+) or (EPL-2.0 and GPLv2+) @@ -804,6 +804,10 @@ fi %endif %changelog +* Tue Sep 5 2023 Jaroslav Škarvada - 2:3.8.2-1 +- New version + Resolves: rhbz#2236828 + * Mon Aug 14 2023 Jaroslav Škarvada - 2:3.8.1-5 - Use systemd-sysusers, original patch by Jonathan Wright diff --git a/sources b/sources index 8fc247a..1491640 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (pflogsumm-1.1.5.tar.gz) = 994d660692dfea38a1dd9866d15f15035657e85131c1f5a2cd82baa5bd4ad987a00939cb5233f316d2090014c52ae68ef20db0c893f8634969484e0e74678f4d -SHA512 (postfix-3.8.1.tar.gz) = 9eb91f2baab327de22dd55fc5ff398de74856e30be461282f41b1801301873881a8f40ce061c16e0505d51d96aaf0eff8d0ac660e5f6c70c6125133f64a4ee80 +SHA512 (postfix-3.8.2.tar.gz) = 1c441c95bcadee6fc038eb5cb826a686a8bd98b0c78afbc36fdcee01ca0b1c7071036542c729ac345ef8f1e6fb42211452da802e86048967ebc77774dea7752d From 6a2621e4d73d59337dc64ba45922132286b841a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Mon, 9 Oct 2023 18:22:23 +0200 Subject: [PATCH 14/55] Drop libdb for RHEL>9 Related: rhbz#1788480 --- postfix-etc-init.d-postfix | 17 +++++++++----- postfix.aliasesdb | 17 +++++++++----- postfix.spec | 46 ++++++++++++++++++++++++++++++++++---- 3 files changed, 64 insertions(+), 16 deletions(-) diff --git a/postfix-etc-init.d-postfix b/postfix-etc-init.d-postfix index c609b0a..52bd7bd 100644 --- a/postfix-etc-init.d-postfix +++ b/postfix-etc-init.d-postfix @@ -51,15 +51,20 @@ conf_check() { } make_aliasesdb() { - if [ "$(/usr/sbin/postconf -h alias_database)" == "hash:/etc/aliases" ] + local MAP="" + local ALIASESDB="$(/usr/sbin/postconf -h alias_database)" + [ "$ALIASESDB" = "hash:/etc/aliases" ] && MAP="db" + [ "$ALIASESDB" = "lmdb:/etc/aliases" ] && MAP="lmdb" + + if [ "$MAP" = "db" -o "$MAP" = "lmdb" ] then - # /etc/aliases.db may be used by other MTA, make sure nothing + # /etc/aliases.db|lmdb may be used by other MTA, make sure nothing # has touched it since our last newaliases call - [ /etc/aliases -nt /etc/aliases.db ] || - [ "$ALIASESDB_STAMP" -nt /etc/aliases.db ] || - [ "$ALIASESDB_STAMP" -ot /etc/aliases.db ] || return + [ /etc/aliases -nt /etc/aliases.$MAP ] || + [ "$ALIASESDB_STAMP" -nt /etc/aliases.$MAP ] || + [ "$ALIASESDB_STAMP" -ot /etc/aliases.$MAP ] || return /usr/bin/newaliases - touch -r /etc/aliases.db "$ALIASESDB_STAMP" + touch -r /etc/aliases.$MAP "$ALIASESDB_STAMP" else /usr/bin/newaliases fi diff --git a/postfix.aliasesdb b/postfix.aliasesdb index 8c0156e..863b405 100644 --- a/postfix.aliasesdb +++ b/postfix.aliasesdb @@ -3,15 +3,20 @@ ALIASESDB_STAMP=/var/lib/misc/postfix.aliasesdb-stamp make_aliasesdb() { - if [ "$(/usr/sbin/postconf -h alias_database)" == "hash:/etc/aliases" ] + local MAP="" + local ALIASESDB="$(/usr/sbin/postconf -h alias_database)" + [ "$ALIASESDB" = "hash:/etc/aliases" ] && MAP="db" + [ "$ALIASESDB" = "lmdb:/etc/aliases" ] && MAP="lmdb" + + if [ "$MAP" = "db" -o "$MAP" = "lmdb" ] then - # /etc/aliases.db may be used by other MTA, make sure nothing + # /etc/aliases.db|lmdb may be used by other MTA, make sure nothing # has touched it since our last newaliases call - [ /etc/aliases -nt /etc/aliases.db ] || - [ "$ALIASESDB_STAMP" -nt /etc/aliases.db ] || - [ "$ALIASESDB_STAMP" -ot /etc/aliases.db ] || return 0 + [ /etc/aliases -nt /etc/aliases.$MAP ] || + [ "$ALIASESDB_STAMP" -nt /etc/aliases.$MAP ] || + [ "$ALIASESDB_STAMP" -ot /etc/aliases.$MAP ] || return 0 /usr/bin/newaliases - touch -r /etc/aliases.db "$ALIASESDB_STAMP" + touch -r /etc/aliases.$MAP "$ALIASESDB_STAMP" else /usr/bin/newaliases fi diff --git a/postfix.spec b/postfix.spec index f9ef5a1..c784d14 100644 --- a/postfix.spec +++ b/postfix.spec @@ -1,6 +1,11 @@ # plugins have unresolvable symbols in compile time %undefine _strict_symbol_defs_build +%if 0%{?rhel} < 10 +%bcond_without db +%else +%bcond_with db +%endif %bcond_without mysql %bcond_without pgsql %bcond_without sqlite @@ -13,6 +18,12 @@ %bcond_without ipv6 %bcond_without pflogsumm +%if %{without db} && %{with lmdb} +%global defmap_lmdb 1 +%else +%global defmap_lmdb 0 +%endif + %global sysv2systemdnvr 2.8.12-2 # hardened build if not overrided @@ -46,7 +57,7 @@ Name: postfix Summary: Postfix Mail Transport Agent Version: 3.8.2 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IBM and GPLv2+) or (EPL-2.0 and GPLv2+) @@ -103,10 +114,19 @@ Patch13: pflogsumm-1.1.5-syslog-name-underscore-fix.patch # Determine the different packages required for building postfix BuildRequires: make -BuildRequires: libdb-devel, perl-generators, pkgconfig, zlib-devel -BuildRequires: systemd-units, libicu-devel -BuildRequires: gcc, m4, findutils +%if %{with db} +BuildRequires: libdb-devel +%endif +BuildRequires: perl-generators +BuildRequires: pkgconfig +BuildRequires: zlib-devel +BuildRequires: systemd-units +BuildRequires: libicu-devel +BuildRequires: gcc +BuildRequires: m4 +BuildRequires: findutils BuildRequires: systemd-rpm-macros +BuildRequires: sed %if 0%{?rhel} < 9 BuildRequires: libnsl2-devel %endif @@ -121,6 +141,10 @@ BuildRequires: libnsl2-devel %{?with_cdb:BuildRequires: tinycdb-devel} %{?with_tls:BuildRequires: openssl-devel} +%if 0%{?defmap_lmdb} +Requires: %{name}-lmdb%{?_isa} = %{epoch}:%{version}-%{release} +%endif + %description Postfix is a Mail Transport Agent (MTA). @@ -258,6 +282,12 @@ for f in README_FILES/TLS_{LEGACY_,}README TLS_ACKNOWLEDGEMENTS; do touch -r ${f}{,_} && mv -f ${f}{_,} done +# fix default maps +%if 0%{?defmap_lmdb} + sed -i '/^\s*alias_maps\s*=\s*hash:\/etc\/aliases/ s|hash:|lmdb:|g' conf/main.cf + sed -i '/^\s*alias_database\s*=\s*hash:\/etc\/aliases/ s|hash:|lmdb:|g' conf/main.cf +%endif + %build %set_build_flags unset AUXLIBS AUXLIBS_LDAP AUXLIBS_LMDB AUXLIBS_PCRE AUXLIBS_MYSQL AUXLIBS_PGSQL AUXLIBS_SQLITE AUXLIBS_CDB @@ -268,6 +298,10 @@ AUXLIBS="" AUXLIBS="-lnsl" %endif +%if %{without db} + CCARGS="${CCARGS} -DNO_DB" +%endif + %ifarch s390 s390x ppc CCARGS="${CCARGS} -fsigned-char" %endif @@ -804,6 +838,10 @@ fi %endif %changelog +* Mon Oct 9 2023 Jaroslav Škarvada - 2:3.8.2-2 +- Drop libdb for RHEL>9 + Related: rhbz#1788480 + * Tue Sep 5 2023 Jaroslav Škarvada - 2:3.8.2-1 - New version Resolves: rhbz#2236828 From 917062105008cce583ce0b47688caa606dc9cd89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Thu, 2 Nov 2023 13:59:52 +0100 Subject: [PATCH 15/55] Minor spec improvement regarding libdb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jaroslav Škarvada --- postfix.spec | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/postfix.spec b/postfix.spec index c784d14..895d7b9 100644 --- a/postfix.spec +++ b/postfix.spec @@ -114,9 +114,6 @@ Patch13: pflogsumm-1.1.5-syslog-name-underscore-fix.patch # Determine the different packages required for building postfix BuildRequires: make -%if %{with db} -BuildRequires: libdb-devel -%endif BuildRequires: perl-generators BuildRequires: pkgconfig BuildRequires: zlib-devel @@ -131,6 +128,7 @@ BuildRequires: sed BuildRequires: libnsl2-devel %endif +%{?with_db:BuildRequires: libdb-devel} %{?with_ldap:BuildRequires: openldap-devel} %{?with_lmdb:BuildRequires: lmdb-devel} %{?with_sasl:BuildRequires: cyrus-sasl-devel} From f2bc8dd8d36029600141bf921b79e2557872dd58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Thu, 2 Nov 2023 21:12:24 +0100 Subject: [PATCH 16/55] New version Resolves: rhbz#2247553 --- postfix.spec | 8 ++++++-- sources | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/postfix.spec b/postfix.spec index 895d7b9..3713509 100644 --- a/postfix.spec +++ b/postfix.spec @@ -56,8 +56,8 @@ Name: postfix Summary: Postfix Mail Transport Agent -Version: 3.8.2 -Release: 2%{?dist} +Version: 3.8.3 +Release: 1%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IBM and GPLv2+) or (EPL-2.0 and GPLv2+) @@ -836,6 +836,10 @@ fi %endif %changelog +* Thu Nov 2 2023 Jaroslav Škarvada - 2:3.8.3-1 +- New version + Resolves: rhbz#2247553 + * Mon Oct 9 2023 Jaroslav Škarvada - 2:3.8.2-2 - Drop libdb for RHEL>9 Related: rhbz#1788480 diff --git a/sources b/sources index 1491640..748ce3c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ +SHA512 (postfix-3.8.3.tar.gz) = 38df222cd1fca992bba9eef123ed547386244f41577f0f4eec9c055afd48773736bd9d5857166e31d94e5c55be57a4381f8ce1c8cde80e9b8779bae5e0720aef SHA512 (pflogsumm-1.1.5.tar.gz) = 994d660692dfea38a1dd9866d15f15035657e85131c1f5a2cd82baa5bd4ad987a00939cb5233f316d2090014c52ae68ef20db0c893f8634969484e0e74678f4d -SHA512 (postfix-3.8.2.tar.gz) = 1c441c95bcadee6fc038eb5cb826a686a8bd98b0c78afbc36fdcee01ca0b1c7071036542c729ac345ef8f1e6fb42211452da802e86048967ebc77774dea7752d From 629eddff09169a643f8a729672246d6944d2e532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Tue, 12 Dec 2023 19:19:39 +0100 Subject: [PATCH 17/55] Converted license tag to SPDX --- postfix.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/postfix.spec b/postfix.spec index 3713509..8fae092 100644 --- a/postfix.spec +++ b/postfix.spec @@ -57,10 +57,10 @@ Name: postfix Summary: Postfix Mail Transport Agent Version: 3.8.3 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 URL: http://www.postfix.org -License: (IBM and GPLv2+) or (EPL-2.0 and GPLv2+) +License: (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC Requires(post): systemd systemd-sysv hostname Requires(post): %{_sbindir}/alternatives Requires(post): %{_bindir}/openssl @@ -836,6 +836,9 @@ fi %endif %changelog +* Tue Dec 12 2023 Jaroslav Škarvada - 2:3.8.3-2 +- Converted license tag to SPDX + * Thu Nov 2 2023 Jaroslav Škarvada - 2:3.8.3-1 - New version Resolves: rhbz#2247553 From f1e8416149086937053fc2e1876f20ff6438d931 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Tue, 2 Jan 2024 23:37:43 +0100 Subject: [PATCH 18/55] New version Resolves: rhbz#2255641 Fixed SMTP smuggling vulnerability Resolves: CVE-2023-51764 --- postfix.spec | 10 ++++++++-- sources | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/postfix.spec b/postfix.spec index 8fae092..462a0e5 100644 --- a/postfix.spec +++ b/postfix.spec @@ -56,8 +56,8 @@ Name: postfix Summary: Postfix Mail Transport Agent -Version: 3.8.3 -Release: 2%{?dist} +Version: 3.8.4 +Release: 1%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC @@ -836,6 +836,12 @@ fi %endif %changelog +* Tue Jan 2 2024 Jaroslav Škarvada - 2:3.8.4-1 +- New version + Resolves: rhbz#2255641 +- Fixed SMTP smuggling vulnerability + Resolves: CVE-2023-51764 + * Tue Dec 12 2023 Jaroslav Škarvada - 2:3.8.3-2 - Converted license tag to SPDX diff --git a/sources b/sources index 748ce3c..71a9a6a 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (postfix-3.8.3.tar.gz) = 38df222cd1fca992bba9eef123ed547386244f41577f0f4eec9c055afd48773736bd9d5857166e31d94e5c55be57a4381f8ce1c8cde80e9b8779bae5e0720aef +SHA512 (postfix-3.8.4.tar.gz) = 5bae3d62e104714aead1fff28a595bab4315227382f53c8dae2a231f4240e31abda19c1e3befc1db4c89bc5d66c9a43830390365aadabdac5cf36b493c5c48c7 SHA512 (pflogsumm-1.1.5.tar.gz) = 994d660692dfea38a1dd9866d15f15035657e85131c1f5a2cd82baa5bd4ad987a00939cb5233f316d2090014c52ae68ef20db0c893f8634969484e0e74678f4d From a0eceffedc481908a3f1f84540396a330e6187d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Tue, 2 Jan 2024 23:54:00 +0100 Subject: [PATCH 19/55] New version Resolves: rhbz#2255641 Fixed SMTP smuggling vulnerability Resolves: CVE-2023-51764 --- ...e.patch => postfix-3.7.9-SRV-resolve.patch | 36 ++++++++----------- ...e-fs.patch => postfix-3.7.9-large-fs.patch | 4 +-- postfix.spec | 14 +++++--- sources | 2 +- 4 files changed, 28 insertions(+), 28 deletions(-) rename postfix-3.7.4-SRV-resolve.patch => postfix-3.7.9-SRV-resolve.patch (98%) rename postfix-3.7.0-large-fs.patch => postfix-3.7.9-large-fs.patch (92%) diff --git a/postfix-3.7.4-SRV-resolve.patch b/postfix-3.7.9-SRV-resolve.patch similarity index 98% rename from postfix-3.7.4-SRV-resolve.patch rename to postfix-3.7.9-SRV-resolve.patch index 33ad643..48171c3 100644 --- a/postfix-3.7.4-SRV-resolve.patch +++ b/postfix-3.7.9-SRV-resolve.patch @@ -1,14 +1,8 @@ -commit e8e61195459340eb01be5af722609694a9cea6fb -Author: Tomas Korbar -Date: Thu Jun 8 14:12:16 2023 +0200 - - Backport SRV record resolution feature - diff --git a/mantools/postlink b/mantools/postlink -index 2b1ad8b..c8f659d 100755 +index 15306d9..70ff038 100755 --- a/mantools/postlink +++ b/mantools/postlink -@@ -1156,6 +1156,10 @@ while (<>) { +@@ -1161,6 +1161,10 @@ while (<>) { s;\blocal_login_sender_maps\b;$&;g; s;\bempty_address_local_login_sender_maps_lookup_key\b;$&;g; @@ -20,13 +14,13 @@ index 2b1ad8b..c8f659d 100755 s;\bpolicy_time_limit\b;$&;g; diff --git a/proto/postconf.proto b/proto/postconf.proto -index 9b5a550..b9307e2 100644 +index 787e01c..6c214e7 100644 --- a/proto/postconf.proto +++ b/proto/postconf.proto -@@ -18434,3 +18434,110 @@ Postfix SMTP client will continue delivery after logging a warning. - configuration parameter. See there for details.

+@@ -18599,3 +18599,110 @@ to enable. This feature is enabled by default with Postfix ≥ -

This feature is available in Postfix 3.7 and later.

+

This feature is available in Postfix ≥ 3.9, 3.8.1, 3.7.6, + 3.6.10, and 3.5.20.

+ +%PARAM use_srv_lookup + @@ -196,7 +190,7 @@ index 5f53dbc..0c1dcb3 100644 #define DNS_FAIL (-4) /* query failed, don't retry */ #define DNS_INVAL (-3) /* query ok, malformed reply */ diff --git a/src/dns/dns_lookup.c b/src/dns/dns_lookup.c -index 1c12a88..134af16 100644 +index 615902d..18d6916 100644 --- a/src/dns/dns_lookup.c +++ b/src/dns/dns_lookup.c @@ -740,6 +740,8 @@ static int dns_get_rr(DNS_RR **list, const char *orig_name, DNS_REPLY *reply, @@ -632,10 +626,10 @@ index 70e59ac..7eebe3c 100644 /* dns_strtype - translate DNS query type to string */ diff --git a/src/global/mail_params.h b/src/global/mail_params.h -index ff39ae7..791edd2 100644 +index 25df5fc..781264b 100644 --- a/src/global/mail_params.h +++ b/src/global/mail_params.h -@@ -4348,6 +4348,21 @@ extern char *var_dnssec_probe; +@@ -4370,6 +4370,21 @@ extern char *var_dnssec_probe; "lmtp=24, smtp=25, smtps=submissions=465, submission=587" extern char *var_known_tcp_ports; @@ -658,7 +652,7 @@ index ff39ae7..791edd2 100644 /* .ad /* .fi diff --git a/src/posttls-finger/posttls-finger.c b/src/posttls-finger/posttls-finger.c -index 8b34444..df49c36 100644 +index 502645c..7a62afe 100644 --- a/src/posttls-finger/posttls-finger.c +++ b/src/posttls-finger/posttls-finger.c @@ -237,6 +237,8 @@ @@ -929,7 +923,7 @@ index cc33646..bca7cd4 100644 }; static const CONFIG_NBOOL_TABLE lmtp_nbool_table[] = { diff --git a/src/smtp/smtp.c b/src/smtp/smtp.c -index 0561d07..91672f8 100644 +index 791ec89..816095b 100644 --- a/src/smtp/smtp.c +++ b/src/smtp/smtp.c @@ -146,6 +146,7 @@ @@ -958,7 +952,7 @@ index 0561d07..91672f8 100644 /* MIME PROCESSING CONTROLS /* .ad /* .fi -@@ -1085,6 +1097,9 @@ char *var_smtp_dns_re_filter; +@@ -1092,6 +1104,9 @@ char *var_smtp_dns_re_filter; bool var_smtp_balance_inet_proto; bool var_smtp_req_deadline; int var_smtp_min_data_rate; @@ -968,7 +962,7 @@ index 0561d07..91672f8 100644 /* Special handling of 535 AUTH errors. */ char *var_smtp_sasl_auth_cache_name; -@@ -1111,6 +1126,7 @@ HBC_CHECKS *smtp_header_checks; /* limited header checks */ +@@ -1118,6 +1133,7 @@ HBC_CHECKS *smtp_header_checks; /* limited header checks */ HBC_CHECKS *smtp_body_checks; /* limited body checks */ SMTP_CLI_ATTR smtp_cli_attr; /* parsed command-line */ int smtp_hfrom_format; /* postmaster notifications */ @@ -976,7 +970,7 @@ index 0561d07..91672f8 100644 #ifdef USE_TLS -@@ -1401,6 +1417,15 @@ static void post_init(char *unused_name, char **argv) +@@ -1408,6 +1424,15 @@ static void post_init(char *unused_name, char **argv) * header_from format, for postmaster notifications. */ smtp_hfrom_format = hfrom_format_parse(VAR_HFROM_FORMAT, var_hfrom_format); @@ -993,7 +987,7 @@ index 0561d07..91672f8 100644 /* pre_init - pre-jail initialization */ diff --git a/src/smtp/smtp.h b/src/smtp/smtp.h -index 742ed30..0864313 100644 +index 0d5c80a..2818d6e 100644 --- a/src/smtp/smtp.h +++ b/src/smtp/smtp.h @@ -84,6 +84,14 @@ typedef struct SMTP_ITERATOR { diff --git a/postfix-3.7.0-large-fs.patch b/postfix-3.7.9-large-fs.patch similarity index 92% rename from postfix-3.7.0-large-fs.patch rename to postfix-3.7.9-large-fs.patch index 3c09e5e..28c1eab 100644 --- a/postfix-3.7.0-large-fs.patch +++ b/postfix-3.7.9-large-fs.patch @@ -21,10 +21,10 @@ index 50a4aa7..beef3db 100644 if (msg_verbose) msg_info("%s: %s: block size %lu, blocks free %lu", diff --git a/src/util/sys_defs.h b/src/util/sys_defs.h -index c9ebc33..f2be0e2 100644 +index aec8d8a..aff8d44 100644 --- a/src/util/sys_defs.h +++ b/src/util/sys_defs.h -@@ -771,8 +771,8 @@ extern int initgroups(const char *, int); +@@ -772,8 +772,8 @@ extern int initgroups(const char *, int); #define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0) #define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin" #define FIONREAD_IN_TERMIOS_H diff --git a/postfix.spec b/postfix.spec index a631951..499df4f 100644 --- a/postfix.spec +++ b/postfix.spec @@ -48,8 +48,8 @@ Name: postfix Summary: Postfix Mail Transport Agent -Version: 3.7.4 -Release: 3%{?dist} +Version: 3.7.9 +Release: 1%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IBM and GPLv2+) or (EPL-2.0 and GPLv2+) @@ -92,7 +92,7 @@ Source101: postfix-pam.conf Patch1: postfix-3.7.0-config.patch Patch2: postfix-3.4.0-files.patch Patch3: postfix-3.3.3-alternatives.patch -Patch4: postfix-3.7.0-large-fs.patch +Patch4: postfix-3.7.9-large-fs.patch Patch9: pflogsumm-1.1.5-datecalc.patch # rhbz#1384871, sent upstream Patch10: pflogsumm-1.1.5-ipv6-warnings-fix.patch @@ -102,7 +102,7 @@ Patch12: postfix-3.7.0-whitespace-name-fix.patch # rhbz#1931403, sent upstream Patch13: pflogsumm-1.1.5-syslog-name-underscore-fix.patch # backported feature from upstream -Patch14: postfix-3.7.4-SRV-resolve.patch +Patch14: postfix-3.7.9-SRV-resolve.patch # Optional patches - set the appropriate environment variables to include # them when building the package/spec file @@ -809,6 +809,12 @@ fi %endif %changelog +* Tue Jan 2 2024 Jaroslav Škarvada - 2:3.7.9-1 +- New version + Resolves: rhbz#2255641 +- Fixed SMTP smuggling vulnerability + Resolves: CVE-2023-51764 + * Tue Jul 11 2023 Jaroslav Škarvada - 2:3.7.4-3 - Fixed possible warning when postfix is restarted Resolves: rhbz#2218058 diff --git a/sources b/sources index 309edd5..648cef3 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ +SHA512 (postfix-3.7.9.tar.gz) = a529a2ee3e7623e258ffb7b5d8708253ec55b616a87a83f8e3200e37fff939f8cb23ee65e7c685d71aeacd3deb3f19d343a616be2fec2eaee912dd8cf0cd6a7a SHA512 (pflogsumm-1.1.5.tar.gz) = 994d660692dfea38a1dd9866d15f15035657e85131c1f5a2cd82baa5bd4ad987a00939cb5233f316d2090014c52ae68ef20db0c893f8634969484e0e74678f4d -SHA512 (postfix-3.7.4.tar.gz) = 972738291b960c90fe83861d55b1288900416167adb353418956e69bcc709a6daf84fbfde11d573eebba030654d27abc8d55f90661a2b880ccfb3a334064c236 From 46fa6ce8eb5e31ada6b4389f4e3a5246eff28f4b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 21 Jan 2024 22:10:55 +0000 Subject: [PATCH 20/55] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- postfix.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/postfix.spec b/postfix.spec index 462a0e5..fb1bea2 100644 --- a/postfix.spec +++ b/postfix.spec @@ -57,7 +57,7 @@ Name: postfix Summary: Postfix Mail Transport Agent Version: 3.8.4 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC @@ -836,6 +836,9 @@ fi %endif %changelog +* Sun Jan 21 2024 Fedora Release Engineering - 2:3.8.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Tue Jan 2 2024 Jaroslav Škarvada - 2:3.8.4-1 - New version Resolves: rhbz#2255641 From d7cfa84b6259394830688d00bcf892d6819b1b78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Mon, 22 Jan 2024 17:35:56 +0100 Subject: [PATCH 21/55] New version Resolves: rhbz#2259469 --- postfix.spec | 8 ++++++-- sources | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/postfix.spec b/postfix.spec index fb1bea2..94d4273 100644 --- a/postfix.spec +++ b/postfix.spec @@ -56,8 +56,8 @@ Name: postfix Summary: Postfix Mail Transport Agent -Version: 3.8.4 -Release: 2%{?dist} +Version: 3.8.5 +Release: 1%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC @@ -836,6 +836,10 @@ fi %endif %changelog +* Mon Jan 22 2024 Jaroslav Škarvada - 2:3.8.5-1 +- New version + Resolves: rhbz#2259469 + * Sun Jan 21 2024 Fedora Release Engineering - 2:3.8.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild diff --git a/sources b/sources index 71a9a6a..e933b83 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (postfix-3.8.4.tar.gz) = 5bae3d62e104714aead1fff28a595bab4315227382f53c8dae2a231f4240e31abda19c1e3befc1db4c89bc5d66c9a43830390365aadabdac5cf36b493c5c48c7 +SHA512 (postfix-3.8.5.tar.gz) = 26005da5750e7af742f4fc7596ae8320467176e069546c3487418c663b54f56734b4a6541665b8d72d94df2e0fd4f68a2bcc44c50a6d950334d5a5fb2293dff4 SHA512 (pflogsumm-1.1.5.tar.gz) = 994d660692dfea38a1dd9866d15f15035657e85131c1f5a2cd82baa5bd4ad987a00939cb5233f316d2090014c52ae68ef20db0c893f8634969484e0e74678f4d From e2c24f776de6cf5a6cd7b7643ea983a5b6ba11d4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jan 2024 23:57:57 +0000 Subject: [PATCH 22/55] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- postfix.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/postfix.spec b/postfix.spec index 94d4273..63def9b 100644 --- a/postfix.spec +++ b/postfix.spec @@ -57,7 +57,7 @@ Name: postfix Summary: Postfix Mail Transport Agent Version: 3.8.5 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC @@ -836,6 +836,9 @@ fi %endif %changelog +* Thu Jan 25 2024 Fedora Release Engineering - 2:3.8.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Mon Jan 22 2024 Jaroslav Škarvada - 2:3.8.5-1 - New version Resolves: rhbz#2259469 From 5494e96544265abf0c989184ac3e0bd8b29ba1d8 Mon Sep 17 00:00:00 2001 From: Pete Walter Date: Thu, 1 Feb 2024 11:13:30 +0000 Subject: [PATCH 23/55] Rebuild for ICU 74 --- postfix.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/postfix.spec b/postfix.spec index 63def9b..bbe521f 100644 --- a/postfix.spec +++ b/postfix.spec @@ -57,7 +57,7 @@ Name: postfix Summary: Postfix Mail Transport Agent Version: 3.8.5 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC @@ -836,6 +836,9 @@ fi %endif %changelog +* Thu Feb 01 2024 Pete Walter - 2:3.8.5-3 +- Rebuild for ICU 74 + * Thu Jan 25 2024 Fedora Release Engineering - 2:3.8.5-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From b4c7cd3ad1dc848715fef4b2aba4555e1584cac0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Tue, 27 Feb 2024 17:03:27 +0100 Subject: [PATCH 24/55] Dropped mail group configuration / creation, it is provided by setup Resolves: rhbz#2244744 --- postfix.spec | 6 +++++- postfix.sysusers | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/postfix.spec b/postfix.spec index bbe521f..37e83b0 100644 --- a/postfix.spec +++ b/postfix.spec @@ -57,7 +57,7 @@ Name: postfix Summary: Postfix Mail Transport Agent Version: 3.8.5 -Release: 3%{?dist} +Release: 4%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC @@ -836,6 +836,10 @@ fi %endif %changelog +* Tue Feb 27 2024 Jaroslav Škarvada - 2:3.8.5-4 +- Dropped mail group configuration / creation, it is provided by setup + Resolves: rhbz#2244744 + * Thu Feb 01 2024 Pete Walter - 2:3.8.5-3 - Rebuild for ICU 74 diff --git a/postfix.sysusers b/postfix.sysusers index 876b305..7778edf 100644 --- a/postfix.sysusers +++ b/postfix.sysusers @@ -1,4 +1,3 @@ u postfix 89 - /var/spool/postfix /sbin/nologin g postdrop 90 -g mail 12 m postfix mail From dbf6c74d764eae3352d52cb01213ef8930e27c98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Tue, 5 Mar 2024 14:07:03 +0100 Subject: [PATCH 25/55] New version Resolves: rhbz#2267836 --- postfix.spec | 8 ++++++-- sources | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/postfix.spec b/postfix.spec index 37e83b0..60346bb 100644 --- a/postfix.spec +++ b/postfix.spec @@ -56,8 +56,8 @@ Name: postfix Summary: Postfix Mail Transport Agent -Version: 3.8.5 -Release: 4%{?dist} +Version: 3.8.6 +Release: 1%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC @@ -836,6 +836,10 @@ fi %endif %changelog +* Tue Mar 5 2024 Jaroslav Škarvada - 2:3.8.6-1 +- New version + Resolves: rhbz#2267836 + * Tue Feb 27 2024 Jaroslav Škarvada - 2:3.8.5-4 - Dropped mail group configuration / creation, it is provided by setup Resolves: rhbz#2244744 diff --git a/sources b/sources index e933b83..e511a92 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (postfix-3.8.5.tar.gz) = 26005da5750e7af742f4fc7596ae8320467176e069546c3487418c663b54f56734b4a6541665b8d72d94df2e0fd4f68a2bcc44c50a6d950334d5a5fb2293dff4 SHA512 (pflogsumm-1.1.5.tar.gz) = 994d660692dfea38a1dd9866d15f15035657e85131c1f5a2cd82baa5bd4ad987a00939cb5233f316d2090014c52ae68ef20db0c893f8634969484e0e74678f4d +SHA512 (postfix-3.8.6.tar.gz) = 2b227bb6b57e4cf2d727a23762b161f2328959faa4683d63b35543701c3e954be552537eaa14a899c65ec4856d9f91b0398337088a6e2b48c0446fd406be8de4 From 7dd4fb79730c338e7ad26643772bd5722a297bfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Thu, 7 Mar 2024 17:50:30 +0100 Subject: [PATCH 26/55] New version Resolves: rhbz#2268245 --- ...natives.patch => postfix-3.9.0-alternatives.patch | 0 ...ix-3.4.0-files.patch => postfix-3.9.0-files.patch | 12 ++++++------ postfix.spec | 10 +++++++--- sources | 2 +- 4 files changed, 14 insertions(+), 10 deletions(-) rename postfix-3.3.3-alternatives.patch => postfix-3.9.0-alternatives.patch (100%) rename postfix-3.4.0-files.patch => postfix-3.9.0-files.patch (88%) diff --git a/postfix-3.3.3-alternatives.patch b/postfix-3.9.0-alternatives.patch similarity index 100% rename from postfix-3.3.3-alternatives.patch rename to postfix-3.9.0-alternatives.patch diff --git a/postfix-3.4.0-files.patch b/postfix-3.9.0-files.patch similarity index 88% rename from postfix-3.4.0-files.patch rename to postfix-3.9.0-files.patch index ad73553..a7592ba 100644 --- a/postfix-3.4.0-files.patch +++ b/postfix-3.9.0-files.patch @@ -1,8 +1,8 @@ diff --git a/conf/postfix-files b/conf/postfix-files -index 4ed9d1f..19711d2 100644 +index 5a93982..336c07b 100644 --- a/conf/postfix-files +++ b/conf/postfix-files -@@ -83,7 +83,6 @@ $shlib_directory/${LIB_PREFIX}sqlite${LIB_SUFFIX}:f:root:-:755 +@@ -84,7 +84,6 @@ $shlib_directory/${LIB_PREFIX}sqlite${LIB_SUFFIX}:f:root:-:755 $meta_directory/dynamicmaps.cf.d:d:root:-:755 $meta_directory/dynamicmaps.cf:f:root:-:644 $meta_directory/main.cf.proto:f:root:-:644 @@ -10,7 +10,7 @@ index 4ed9d1f..19711d2 100644 $meta_directory/master.cf.proto:f:root:-:644 $meta_directory/postfix-files.d:d:root:-:755 $meta_directory/postfix-files:f:root:-:644 -@@ -141,18 +140,13 @@ $command_directory/postqueue:f:root:$setgid_group:2755:u +@@ -142,18 +141,13 @@ $command_directory/postqueue:f:root:$setgid_group:2755:u $sendmail_path:f:root:-:755 $newaliases_path:l:$sendmail_path $mailq_path:l:$sendmail_path @@ -29,7 +29,7 @@ index 4ed9d1f..19711d2 100644 $config_directory/main.cf:f:root:-:644:p $config_directory/master.cf:f:root:-:644:p $config_directory/pcre_table:f:root:-:644:o -@@ -165,8 +159,8 @@ $config_directory/postfix-script:f:root:-:755:o +@@ -166,8 +160,8 @@ $config_directory/postfix-script:f:root:-:755:o $config_directory/postfix-script-sgid:f:root:-:755:o $config_directory/postfix-script-nosgid:f:root:-:755:o $config_directory/post-install:f:root:-:755:o @@ -40,7 +40,7 @@ index 4ed9d1f..19711d2 100644 $manpage_directory/man1/postalias.1:f:root:-:644 $manpage_directory/man1/postcat.1:f:root:-:644 $manpage_directory/man1/postconf.1:f:root:-:644 -@@ -180,9 +174,9 @@ $manpage_directory/man1/postmap.1:f:root:-:644 +@@ -181,9 +175,9 @@ $manpage_directory/man1/postmap.1:f:root:-:644 $manpage_directory/man1/postmulti.1:f:root:-:644 $manpage_directory/man1/postqueue.1:f:root:-:644 $manpage_directory/man1/postsuper.1:f:root:-:644 @@ -52,7 +52,7 @@ index 4ed9d1f..19711d2 100644 $manpage_directory/man5/body_checks.5:f:root:-:644 $manpage_directory/man5/bounce.5:f:root:-:644 $manpage_directory/man5/canonical.5:f:root:-:644 -@@ -230,7 +224,7 @@ $manpage_directory/man8/qmqpd.8:f:root:-:644 +@@ -232,7 +226,7 @@ $manpage_directory/man8/qmqpd.8:f:root:-:644 $manpage_directory/man8/scache.8:f:root:-:644 $manpage_directory/man8/showq.8:f:root:-:644 $manpage_directory/man8/smtp.8:f:root:-:644 diff --git a/postfix.spec b/postfix.spec index 60346bb..8afb86d 100644 --- a/postfix.spec +++ b/postfix.spec @@ -56,7 +56,7 @@ Name: postfix Summary: Postfix Mail Transport Agent -Version: 3.8.6 +Version: 3.9.0 Release: 1%{?dist} Epoch: 2 URL: http://www.postfix.org @@ -97,8 +97,8 @@ Source101: postfix-pam.conf # Patches Patch1: postfix-3.8.0-config.patch -Patch2: postfix-3.4.0-files.patch -Patch3: postfix-3.3.3-alternatives.patch +Patch2: postfix-3.9.0-files.patch +Patch3: postfix-3.9.0-alternatives.patch # probably rhbz#428996 Patch4: postfix-3.8.0-large-fs.patch Patch9: pflogsumm-1.1.5-datecalc.patch @@ -836,6 +836,10 @@ fi %endif %changelog +* Thu Mar 7 2024 Jaroslav Škarvada - 2:3.9.0-1 +- New version + Resolves: rhbz#2268245 + * Tue Mar 5 2024 Jaroslav Škarvada - 2:3.8.6-1 - New version Resolves: rhbz#2267836 diff --git a/sources b/sources index e511a92..2154c8c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (pflogsumm-1.1.5.tar.gz) = 994d660692dfea38a1dd9866d15f15035657e85131c1f5a2cd82baa5bd4ad987a00939cb5233f316d2090014c52ae68ef20db0c893f8634969484e0e74678f4d -SHA512 (postfix-3.8.6.tar.gz) = 2b227bb6b57e4cf2d727a23762b161f2328959faa4683d63b35543701c3e954be552537eaa14a899c65ec4856d9f91b0398337088a6e2b48c0446fd406be8de4 +SHA512 (postfix-3.9.0.tar.gz) = 46faaf529a6d2edc5ea747ee0d73a028f7061a923da0ea4b1e1828d935b15f5782d83f7a8472e7c74b45ea0e96666c871efd352934bead28a88ddd3561ade324 From 0d8d1ab875e2f9c6b54640ca07aa3910d278257b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Thu, 11 Apr 2024 16:06:25 +0200 Subject: [PATCH 27/55] Added man8/smtp.8.gz to alternatives Resolves: rhbz#2274402 --- postfix-3.9.0-alternatives.patch | 5 +++-- postfix-3.9.0-files.patch | 8 +++++--- postfix.spec | 22 ++++++++++++++-------- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/postfix-3.9.0-alternatives.patch b/postfix-3.9.0-alternatives.patch index 2c3ba18..d384239 100644 --- a/postfix-3.9.0-alternatives.patch +++ b/postfix-3.9.0-alternatives.patch @@ -1,8 +1,8 @@ diff --git a/conf/post-install b/conf/post-install -index 25ef7e6..4fd6434 100644 +index ed7c79a..c647f81 100644 --- a/conf/post-install +++ b/conf/post-install -@@ -537,6 +537,17 @@ test -n "$create" && { +@@ -541,6 +541,18 @@ test -n "$create" && { case $path in no|no/*) continue;; esac @@ -15,6 +15,7 @@ index 25ef7e6..4fd6434 100644 + /usr/share/man/man1/mailq.1.gz) path=/usr/share/man/man1/mailq.postfix.1.gz ;; + /usr/share/man/man1/newaliases.1.gz) path=/usr/share/man/man1/newaliases.postfix.1.gz ;; + /usr/share/man/man5/aliases.5.gz) path=/usr/share/man/man5/aliases.postfix.5.gz ;; ++ /usr/share/man/man8/smtp.8.gz) path=/usr/share/man/man8/smtp.postfix.8.gz ;; + /usr/share/man/man8/smtpd.8.gz) path=/usr/share/man/man8/smtpd.postfix.8.gz ;; + esac # Pick up the flags. diff --git a/postfix-3.9.0-files.patch b/postfix-3.9.0-files.patch index a7592ba..03ae645 100644 --- a/postfix-3.9.0-files.patch +++ b/postfix-3.9.0-files.patch @@ -1,5 +1,5 @@ diff --git a/conf/postfix-files b/conf/postfix-files -index 5a93982..336c07b 100644 +index 5a93982..b843fec 100644 --- a/conf/postfix-files +++ b/conf/postfix-files @@ -84,7 +84,6 @@ $shlib_directory/${LIB_PREFIX}sqlite${LIB_SUFFIX}:f:root:-:755 @@ -52,11 +52,13 @@ index 5a93982..336c07b 100644 $manpage_directory/man5/body_checks.5:f:root:-:644 $manpage_directory/man5/bounce.5:f:root:-:644 $manpage_directory/man5/canonical.5:f:root:-:644 -@@ -232,7 +226,7 @@ $manpage_directory/man8/qmqpd.8:f:root:-:644 +@@ -231,8 +225,8 @@ $manpage_directory/man8/qmgr.8:f:root:-:644 + $manpage_directory/man8/qmqpd.8:f:root:-:644 $manpage_directory/man8/scache.8:f:root:-:644 $manpage_directory/man8/showq.8:f:root:-:644 - $manpage_directory/man8/smtp.8:f:root:-:644 +-$manpage_directory/man8/smtp.8:f:root:-:644 -$manpage_directory/man8/smtpd.8:f:root:-:644 ++$manpage_directory/man8/smtp.postfix.8:f:root:-:644 +$manpage_directory/man8/smtpd.postfix.8:f:root:-:644 $manpage_directory/man8/spawn.8:f:root:-:644 $manpage_directory/man8/tlsproxy.8:f:root:-:644 diff --git a/postfix.spec b/postfix.spec index 8afb86d..64b1ef7 100644 --- a/postfix.spec +++ b/postfix.spec @@ -57,7 +57,7 @@ Name: postfix Summary: Postfix Mail Transport Agent Version: 3.9.0 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC @@ -377,7 +377,7 @@ make -f Makefile.init makefiles shared=yes dynamicmaps=yes \ # install postfix into $RPM_BUILD_ROOT # Move stuff around so we don't conflict with sendmail -for i in man1/mailq.1 man1/newaliases.1 man1/sendmail.1 man5/aliases.5 man8/smtpd.8; do +for i in man1/mailq.1 man1/newaliases.1 man1/sendmail.1 man5/aliases.5 man8/smtp{,d}.8; do dest=$(echo $i | sed 's|\.[1-9]$|.postfix\0|') mv man/$i man/$dest sed -i "s|^\.so $i|\.so $dest|" man/man?/*.[1-9] @@ -484,7 +484,7 @@ touch $RPM_BUILD_ROOT%{_var}/lib/misc/postfix.aliasesdb-stamp # prepare alternatives ghosts for i in %{postfix_command_dir}/sendmail %{_bindir}/{mailq,newaliases,rmail} \ %{_sysconfdir}/pam.d/smtp %{_prefix}/lib/sendmail \ - %{_mandir}/{man1/{mailq.1,newaliases.1},man5/aliases.5,man8/{sendmail.8,smtpd.8}} + %{_mandir}/{man1/{mailq.1,newaliases.1},man5/aliases.5,man8/{sendmail.8,smtp{,d}.8}} do touch $RPM_BUILD_ROOT$i done @@ -529,6 +529,7 @@ ALTERNATIVES_DOCS="" --slave %{_mandir}/man1/newaliases.1.gz mta-newaliasesman %{_mandir}/man1/newaliases.postfix.1.gz --slave %{_mandir}/man8/sendmail.8.gz mta-sendmailman %{_mandir}/man1/sendmail.postfix.1.gz --slave %{_mandir}/man5/aliases.5.gz mta-aliasesman %{_mandir}/man5/aliases.postfix.5.gz + --slave %{_mandir}/man8/smtp.8.gz mta-smtpman %{_mandir}/man8/smtp.postfix.8.gz' --slave %{_mandir}/man8/smtpd.8.gz mta-smtpdman %{_mandir}/man8/smtpd.postfix.8.gz' %{_sbindir}/alternatives --install %{postfix_command_dir}/sendmail mta %{postfix_command_dir}/sendmail.postfix 60 \ @@ -573,10 +574,10 @@ exit 0 # Add user and groups if necessary %sysusers_create_compat %{SOURCE6} -# hack, to turn man8/smtpd.8.gz into alternatives symlink (part of the rhbz#1051180 fix) -# this could be probably dropped in f23+ -if [ -e %{_mandir}/man8/smtpd.8.gz ]; then - [ -h %{_mandir}/man8/smtpd.8.gz ] || rm -f %{_mandir}/man8/smtpd.8.gz +# hack, to turn man8/smtp.8.gz into alternatives symlink (part of the rhbz#2274402 fix) +# this could be probably dropped in f44+ +if [ -e %{_mandir}/man8/smtp.8.gz ]; then + [ -h %{_mandir}/man8/smtp.8.gz ] || rm -f %{_mandir}/man8/smtp.8.gz fi exit 0 @@ -688,7 +689,7 @@ fi %attr(0644, root, root) %{_mandir}/man5/*.postfix.5* %attr(0644, root, root) %{_mandir}/man8/[a-qt-v]*.8* %attr(0644, root, root) %{_mandir}/man8/s[ch-lnp]*.8* -%attr(0644, root, root) %{_mandir}/man8/smtp.8* +%attr(0644, root, root) %{_mandir}/man8/smtp.postfix.8* %attr(0644, root, root) %{_mandir}/man8/smtpd.postfix.8* %attr(0755, root, root) %{postfix_command_dir}/smtp-sink @@ -745,6 +746,7 @@ fi %ghost %{_mandir}/man1/newaliases.1.gz %ghost %{_mandir}/man5/aliases.5.gz %ghost %{_mandir}/man8/sendmail.8.gz +%ghost %{_mandir}/man8/smtp.8.gz %ghost %{_mandir}/man8/smtpd.8.gz %ghost %attr(0755, root, root) %{_bindir}/mailq @@ -836,6 +838,10 @@ fi %endif %changelog +* Thu Apr 11 2024 Jaroslav Škarvada - 2:3.9.0-2 +- Added man8/smtp.8.gz to alternatives + Resolves: rhbz#2274402 + * Thu Mar 7 2024 Jaroslav Škarvada - 2:3.9.0-1 - New version Resolves: rhbz#2268245 From bf9c337d2b636872cba876effa340a7f124cf411 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Thu, 11 Apr 2024 18:15:34 +0200 Subject: [PATCH 28/55] Fixed typo in alternatives Related: rhbz#2274402 --- postfix.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/postfix.spec b/postfix.spec index 64b1ef7..5940344 100644 --- a/postfix.spec +++ b/postfix.spec @@ -57,7 +57,7 @@ Name: postfix Summary: Postfix Mail Transport Agent Version: 3.9.0 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC @@ -529,8 +529,8 @@ ALTERNATIVES_DOCS="" --slave %{_mandir}/man1/newaliases.1.gz mta-newaliasesman %{_mandir}/man1/newaliases.postfix.1.gz --slave %{_mandir}/man8/sendmail.8.gz mta-sendmailman %{_mandir}/man1/sendmail.postfix.1.gz --slave %{_mandir}/man5/aliases.5.gz mta-aliasesman %{_mandir}/man5/aliases.postfix.5.gz - --slave %{_mandir}/man8/smtp.8.gz mta-smtpman %{_mandir}/man8/smtp.postfix.8.gz' - --slave %{_mandir}/man8/smtpd.8.gz mta-smtpdman %{_mandir}/man8/smtpd.postfix.8.gz' + --slave %{_mandir}/man8/smtp.8.gz mta-smtpman %{_mandir}/man8/smtp.postfix.8.gz + --slave %{_mandir}/man8/smtpd.8.gz mta-smtpdman %{_mandir}/man8/smtpd.postfix.8.gz %{_sbindir}/alternatives --install %{postfix_command_dir}/sendmail mta %{postfix_command_dir}/sendmail.postfix 60 \ --slave %{_bindir}/mailq mta-mailq %{_bindir}/mailq.postfix \ @@ -838,6 +838,10 @@ fi %endif %changelog +* Thu Apr 11 2024 Jaroslav Škarvada - 2:3.9.0-3 +- Fixed typo in alternatives + Related: rhbz#2274402 + * Thu Apr 11 2024 Jaroslav Škarvada - 2:3.9.0-2 - Added man8/smtp.8.gz to alternatives Resolves: rhbz#2274402 From 7f2afe66cd301cdf91a0b93c0b0e36cc52c384a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Fri, 12 Apr 2024 15:16:45 +0200 Subject: [PATCH 29/55] Fixed closing quote in alternatives Related: rhbz#2274402 --- postfix.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/postfix.spec b/postfix.spec index 5940344..e135a68 100644 --- a/postfix.spec +++ b/postfix.spec @@ -57,7 +57,7 @@ Name: postfix Summary: Postfix Mail Transport Agent Version: 3.9.0 -Release: 3%{?dist} +Release: 4%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC @@ -530,7 +530,7 @@ ALTERNATIVES_DOCS="" --slave %{_mandir}/man8/sendmail.8.gz mta-sendmailman %{_mandir}/man1/sendmail.postfix.1.gz --slave %{_mandir}/man5/aliases.5.gz mta-aliasesman %{_mandir}/man5/aliases.postfix.5.gz --slave %{_mandir}/man8/smtp.8.gz mta-smtpman %{_mandir}/man8/smtp.postfix.8.gz - --slave %{_mandir}/man8/smtpd.8.gz mta-smtpdman %{_mandir}/man8/smtpd.postfix.8.gz + --slave %{_mandir}/man8/smtpd.8.gz mta-smtpdman %{_mandir}/man8/smtpd.postfix.8.gz' %{_sbindir}/alternatives --install %{postfix_command_dir}/sendmail mta %{postfix_command_dir}/sendmail.postfix 60 \ --slave %{_bindir}/mailq mta-mailq %{_bindir}/mailq.postfix \ @@ -838,6 +838,10 @@ fi %endif %changelog +* Fri Apr 12 2024 Jaroslav Škarvada - 2:3.9.0-4 +- Fixed closing quote in alternatives + Related: rhbz#2274402 + * Thu Apr 11 2024 Jaroslav Škarvada - 2:3.9.0-3 - Fixed typo in alternatives Related: rhbz#2274402 From 9967419b85ed38a8ecb433953910764c1dfcacb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sat, 13 Apr 2024 12:04:15 +0200 Subject: [PATCH 30/55] Add compat sbin Provides In preparation for https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin. About a dozen packages require /usr/sbin/sendmail. php-phpmailer6 has BuildRequires: /usr/sbin/smtp-sink. Also, use macro instead of hardcoding "sbindir", so that it becomes /usr/bin automatically when the macro definition is updated. --- postfix.spec | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/postfix.spec b/postfix.spec index e135a68..14e0cba 100644 --- a/postfix.spec +++ b/postfix.spec @@ -143,6 +143,14 @@ BuildRequires: libnsl2-devel Requires: %{name}-lmdb%{?_isa} = %{epoch}:%{version}-%{release} %endif +%if "%{_sbindir}" == "%{_bindir}" +# Compat symlinks for Requires in other packages. +# We rely on filesystem to create the symlinks for us. +Requires: filesystem(unmerged-sbin-symlinks) +Provides: /usr/sbin/sendmail +Provides: /usr/sbin/smtp-sink +%endif + %description Postfix is a Mail Transport Agent (MTA). @@ -474,9 +482,7 @@ rm -f $RPM_BUILD_ROOT%{postfix_config_dir}/aliases # create /usr/lib/sendmail mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib -pushd $RPM_BUILD_ROOT%{_prefix}/lib -ln -sf ../sbin/sendmail.postfix . -popd +ln -sf --relative $RPM_BUILD_ROOT%{_sbindir}/sendmail.postfix $RPM_BUILD_ROOT%{_prefix}/lib/ mkdir -p $RPM_BUILD_ROOT%{_var}/lib/misc touch $RPM_BUILD_ROOT%{_var}/lib/misc/postfix.aliasesdb-stamp From aa0f226f942f521863b0829a367844c1464d9ddc Mon Sep 17 00:00:00 2001 From: Software Management Team Date: Thu, 30 May 2024 12:46:49 +0200 Subject: [PATCH 31/55] Eliminate use of obsolete %patchN syntax (#2283636) --- postfix.spec | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/postfix.spec b/postfix.spec index 14e0cba..5fc193d 100644 --- a/postfix.spec +++ b/postfix.spec @@ -259,10 +259,10 @@ maps with Postfix, you need this. %prep %setup -q # Apply obligatory patches -%patch1 -p1 -b .config -%patch2 -p1 -b .files -%patch3 -p1 -b .alternatives -%patch4 -p1 -b .large-fs +%patch -P1 -p1 -b .config +%patch -P2 -p1 -b .files +%patch -P3 -p1 -b .alternatives +%patch -P4 -p1 -b .large-fs # Change DEF_SHLIB_DIR according to build host sed -i \ @@ -272,12 +272,12 @@ src/global/mail_params.h %if %{with pflogsumm} gzip -dc %{SOURCE53} | tar xf - pushd pflogsumm-%{pflogsumm_ver} -%patch9 -p1 -b .datecalc -%patch10 -p1 -b .ipv6-warnings-fix +%patch -P9 -p1 -b .datecalc +%patch -P10 -p1 -b .ipv6-warnings-fix popd %endif -%patch11 -p1 -b .chroot-example-fix -%patch13 -p1 -b .pflogsumm-1.1.5-syslog-name-underscore-fix +%patch -P11 -p1 -b .chroot-example-fix +%patch -P13 -p1 -b .pflogsumm-1.1.5-syslog-name-underscore-fix # Backport 3.8-20221006 fix for uname -r detection sed -i makedefs -e '\@Linux\.@s|345|3456|' From db003f90d8ce21c82cff01150c51f1c3b73a2702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 9 Jul 2024 13:48:32 +0200 Subject: [PATCH 32/55] Rebuilt for the bin-sbin merge https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin --- postfix.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/postfix.spec b/postfix.spec index 5fc193d..25d7173 100644 --- a/postfix.spec +++ b/postfix.spec @@ -57,7 +57,7 @@ Name: postfix Summary: Postfix Mail Transport Agent Version: 3.9.0 -Release: 4%{?dist} +Release: 5%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC @@ -844,6 +844,9 @@ fi %endif %changelog +* Tue Jul 09 2024 Zbigniew Jędrzejewski-Szmek - 2:3.9.0-5 +- Rebuilt for the bin-sbin merge + * Fri Apr 12 2024 Jaroslav Škarvada - 2:3.9.0-4 - Fixed closing quote in alternatives Related: rhbz#2274402 From 9d9c784155cd3d22e2ddf1b4ed88df3872b5adf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 9 Jul 2024 14:33:51 +0200 Subject: [PATCH 33/55] Pull in openssl-devel-engine to fix build --- postfix.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/postfix.spec b/postfix.spec index 25d7173..268b1f8 100644 --- a/postfix.spec +++ b/postfix.spec @@ -138,6 +138,9 @@ BuildRequires: libnsl2-devel %{?with_sqlite:BuildRequires: sqlite-devel} %{?with_cdb:BuildRequires: tinycdb-devel} %{?with_tls:BuildRequires: openssl-devel} +%if %{?with_tls} && 0%{?fedora} >= 41 +BuildRequires: openssl-devel-engine +%endif %if 0%{?defmap_lmdb} Requires: %{name}-lmdb%{?_isa} = %{epoch}:%{version}-%{release} From c2344f2115036c3ae4a36996954443ef2bb8805f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jul 2024 08:18:17 +0000 Subject: [PATCH 34/55] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- postfix.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/postfix.spec b/postfix.spec index 268b1f8..4219c2b 100644 --- a/postfix.spec +++ b/postfix.spec @@ -57,7 +57,7 @@ Name: postfix Summary: Postfix Mail Transport Agent Version: 3.9.0 -Release: 5%{?dist} +Release: 6%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC @@ -847,6 +847,9 @@ fi %endif %changelog +* Fri Jul 19 2024 Fedora Release Engineering - 2:3.9.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Tue Jul 09 2024 Zbigniew Jędrzejewski-Szmek - 2:3.9.0-5 - Rebuilt for the bin-sbin merge From 7235852485bb4452cd2f909d5ff9cbb6c451e08f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Thu, 25 Jul 2024 12:11:56 +0200 Subject: [PATCH 35/55] Explicitly set default_database_type if lmdb map is used --- postfix.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/postfix.spec b/postfix.spec index 4219c2b..caf8c65 100644 --- a/postfix.spec +++ b/postfix.spec @@ -57,7 +57,7 @@ Name: postfix Summary: Postfix Mail Transport Agent Version: 3.9.0 -Release: 6%{?dist} +Release: 7%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC @@ -295,6 +295,8 @@ done %if 0%{?defmap_lmdb} sed -i '/^\s*alias_maps\s*=\s*hash:\/etc\/aliases/ s|hash:|lmdb:|g' conf/main.cf sed -i '/^\s*alias_database\s*=\s*hash:\/etc\/aliases/ s|hash:|lmdb:|g' conf/main.cf + echo >> conf/main.cf + echo "default_database_type = lmdb" >> conf/main.cf %endif %build @@ -847,6 +849,9 @@ fi %endif %changelog +* Thu Jul 25 2024 Jaroslav Škarvada - 2:3.9.0-7 +- Explicitly set default_database_type if lmdb map is used + * Fri Jul 19 2024 Fedora Release Engineering - 2:3.9.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 979433fd55a9ab13420321454b157f8fcd01d6a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Thu, 25 Jul 2024 17:51:06 +0200 Subject: [PATCH 36/55] Fixed postlog RPM verification --- postfix.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/postfix.spec b/postfix.spec index caf8c65..ffa4332 100644 --- a/postfix.spec +++ b/postfix.spec @@ -57,7 +57,7 @@ Name: postfix Summary: Postfix Mail Transport Agent Version: 3.9.0 -Release: 7%{?dist} +Release: 8%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC @@ -714,7 +714,7 @@ fi %attr(0755, root, root) %{postfix_command_dir}/postfix %attr(0755, root, root) %{postfix_command_dir}/postkick %attr(0755, root, root) %{postfix_command_dir}/postlock -%attr(0755, root, root) %{postfix_command_dir}/postlog +%attr(2755, root, %{maildrop_group}) %{postfix_command_dir}/postlog %attr(0755, root, root) %{postfix_command_dir}/postmap %attr(0755, root, root) %{postfix_command_dir}/postmulti %attr(2755, root, %{maildrop_group}) %{postfix_command_dir}/postqueue @@ -849,6 +849,9 @@ fi %endif %changelog +* Thu Jul 25 2024 Jaroslav Škarvada - 2:3.9.0-8 +- Fixed postlog RPM verification + * Thu Jul 25 2024 Jaroslav Škarvada - 2:3.9.0-7 - Explicitly set default_database_type if lmdb map is used From 46307bcec61b708b24c0d73afc88678b08219536 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Sun, 8 Sep 2024 16:23:50 -0400 Subject: [PATCH 37/55] Avoid openssl-devel-engine dependency The ENGINE_* APIs are not used here, and the header is not available by default in Fedora 41 and RHEL 10: https://fedoraproject.org/wiki/Changes/OpensslDeprecateEngine --- postfix-3.9.0-openssl-no-engine.patch | 15 +++++++++++++++ postfix.spec | 6 +++--- 2 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 postfix-3.9.0-openssl-no-engine.patch diff --git a/postfix-3.9.0-openssl-no-engine.patch b/postfix-3.9.0-openssl-no-engine.patch new file mode 100644 index 0000000..f19ae39 --- /dev/null +++ b/postfix-3.9.0-openssl-no-engine.patch @@ -0,0 +1,15 @@ +diff --git a/src/posttls-finger/posttls-finger.c b/src/posttls-finger/posttls-finger.c +index b474a40..9f633f7 100644 +--- a/src/posttls-finger/posttls-finger.c ++++ b/src/posttls-finger/posttls-finger.c +@@ -414,7 +414,9 @@ + + #ifdef USE_TLS + #include +-#include ++#include ++#include ++#include + #endif + + /* diff --git a/postfix.spec b/postfix.spec index ffa4332..93447ea 100644 --- a/postfix.spec +++ b/postfix.spec @@ -107,6 +107,8 @@ Patch10: pflogsumm-1.1.5-ipv6-warnings-fix.patch Patch11: postfix-3.4.4-chroot-example-fix.patch # rhbz#1931403, sent upstream Patch13: pflogsumm-1.1.5-syslog-name-underscore-fix.patch +# https://fedoraproject.org/wiki/Changes/OpensslDeprecateEngine +Patch14: postfix-3.9.0-openssl-no-engine.patch # Optional patches - set the appropriate environment variables to include # them when building the package/spec file @@ -138,9 +140,6 @@ BuildRequires: libnsl2-devel %{?with_sqlite:BuildRequires: sqlite-devel} %{?with_cdb:BuildRequires: tinycdb-devel} %{?with_tls:BuildRequires: openssl-devel} -%if %{?with_tls} && 0%{?fedora} >= 41 -BuildRequires: openssl-devel-engine -%endif %if 0%{?defmap_lmdb} Requires: %{name}-lmdb%{?_isa} = %{epoch}:%{version}-%{release} @@ -281,6 +280,7 @@ popd %endif %patch -P11 -p1 -b .chroot-example-fix %patch -P13 -p1 -b .pflogsumm-1.1.5-syslog-name-underscore-fix +%patch -P14 -p1 -b .openssl-no-engine # Backport 3.8-20221006 fix for uname -r detection sed -i makedefs -e '\@Linux\.@s|345|3456|' From 2439c37dacb925b26dfa1dbf60d837d542c1cd66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Thu, 5 Dec 2024 12:36:01 +0100 Subject: [PATCH 38/55] New version Resolves: rhbz#2330454 New version Resolves: rhbz#2330454 New version Resolves: rhbz#2330454 New version Resolves: rhbz#2330454 New version Resolves: rhbz#2330454 New version Resolves: rhbz#2330454 New version Resolves: rhbz#2330454 New version Resolves: rhbz#2330454 New version Resolves: rhbz#2330454 --- postfix.spec | 8 ++++++-- sources | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/postfix.spec b/postfix.spec index 93447ea..b106229 100644 --- a/postfix.spec +++ b/postfix.spec @@ -56,8 +56,8 @@ Name: postfix Summary: Postfix Mail Transport Agent -Version: 3.9.0 -Release: 8%{?dist} +Version: 3.9.1 +Release: 1%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC @@ -849,6 +849,10 @@ fi %endif %changelog +* Thu Dec 5 2024 Jaroslav Škarvada - 2:3.9.1-1 +- New version + Resolves: rhbz#2330454 + * Thu Jul 25 2024 Jaroslav Škarvada - 2:3.9.0-8 - Fixed postlog RPM verification diff --git a/sources b/sources index 2154c8c..a90f33b 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (pflogsumm-1.1.5.tar.gz) = 994d660692dfea38a1dd9866d15f15035657e85131c1f5a2cd82baa5bd4ad987a00939cb5233f316d2090014c52ae68ef20db0c893f8634969484e0e74678f4d -SHA512 (postfix-3.9.0.tar.gz) = 46faaf529a6d2edc5ea747ee0d73a028f7061a923da0ea4b1e1828d935b15f5782d83f7a8472e7c74b45ea0e96666c871efd352934bead28a88ddd3561ade324 +SHA512 (postfix-3.9.1.tar.gz) = 79109d9f19e51d9089a0f2b5c6134972148a6e1a7e385aabc79c0a32e09c78715ad94a93ae3eca1171b770c62d6bf3b8e079b94183ae851001db1a0cf21fff15 From 069ee8017f377ad220b807a17bf6d7ef01c01a5a Mon Sep 17 00:00:00 2001 From: Pete Walter Date: Sun, 8 Dec 2024 22:38:21 +0000 Subject: [PATCH 39/55] Rebuild for ICU 76 --- postfix.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/postfix.spec b/postfix.spec index b106229..ed82738 100644 --- a/postfix.spec +++ b/postfix.spec @@ -57,7 +57,7 @@ Name: postfix Summary: Postfix Mail Transport Agent Version: 3.9.1 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC @@ -849,6 +849,9 @@ fi %endif %changelog +* Sun Dec 08 2024 Pete Walter - 2:3.9.1-2 +- Rebuild for ICU 76 + * Thu Dec 5 2024 Jaroslav Škarvada - 2:3.9.1-1 - New version Resolves: rhbz#2330454 From 00a7ff6259df387710df39eb6e58da1778650d36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sun, 12 Jan 2025 14:39:35 +0100 Subject: [PATCH 40/55] Rebuilt for the bin-sbin merge (2nd attempt) https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin --- postfix.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/postfix.spec b/postfix.spec index ed82738..af9ff77 100644 --- a/postfix.spec +++ b/postfix.spec @@ -57,7 +57,7 @@ Name: postfix Summary: Postfix Mail Transport Agent Version: 3.9.1 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC @@ -849,6 +849,9 @@ fi %endif %changelog +* Sun Jan 12 2025 Zbigniew Jędrzejewski-Szmek - 2:3.9.1-3 +- Rebuilt for the bin-sbin merge (2nd attempt) + * Sun Dec 08 2024 Pete Walter - 2:3.9.1-2 - Rebuild for ICU 76 From 0cb102fcd6b98aa4e734a876582a1f0ed9fdf4ea Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 18 Jan 2025 10:37:13 +0000 Subject: [PATCH 41/55] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- postfix.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/postfix.spec b/postfix.spec index af9ff77..2cb7b95 100644 --- a/postfix.spec +++ b/postfix.spec @@ -57,7 +57,7 @@ Name: postfix Summary: Postfix Mail Transport Agent Version: 3.9.1 -Release: 3%{?dist} +Release: 4%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC @@ -849,6 +849,9 @@ fi %endif %changelog +* Sat Jan 18 2025 Fedora Release Engineering - 2:3.9.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Sun Jan 12 2025 Zbigniew Jędrzejewski-Szmek - 2:3.9.1-3 - Rebuilt for the bin-sbin merge (2nd attempt) From cf122c7cff7e0941a83097be55cc10799c1a933f Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Tue, 4 Mar 2025 19:46:03 -0500 Subject: [PATCH 42/55] Fix build with GCC 15 GCC 15 defaults to C23, in which `bool` is a keyword and not ABI compatible with int, which this code relies upon. This has yet to be fixed upstream, so compiling for an earlier standard is the simplest solution. --- postfix.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postfix.spec b/postfix.spec index 2cb7b95..6d1c411 100644 --- a/postfix.spec +++ b/postfix.spec @@ -302,7 +302,7 @@ done %build %set_build_flags unset AUXLIBS AUXLIBS_LDAP AUXLIBS_LMDB AUXLIBS_PCRE AUXLIBS_MYSQL AUXLIBS_PGSQL AUXLIBS_SQLITE AUXLIBS_CDB -CCARGS="-fPIC -fcommon" +CCARGS="-fPIC -fcommon -std=gnu17" %if 0%{?rhel} >= 9 AUXLIBS="" %else From a6b853cc3230ed496cda63a3b1bb5a4a87ce65bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Thu, 6 Mar 2025 14:44:38 +0100 Subject: [PATCH 43/55] New version Resolves: rhbz#2346039 New version Resolves: rhbz#2346039 New version Resolves: rhbz#2346039 New version Resolves: rhbz#2346039 New version Resolves: rhbz#2346039 New version Resolves: rhbz#2346039 New version Resolves: rhbz#2346039 New version Resolves: rhbz#2346039 New version Resolves: rhbz#2346039 --- postfix.spec | 8 ++++++-- sources | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/postfix.spec b/postfix.spec index 6d1c411..00dd7a3 100644 --- a/postfix.spec +++ b/postfix.spec @@ -56,8 +56,8 @@ Name: postfix Summary: Postfix Mail Transport Agent -Version: 3.9.1 -Release: 4%{?dist} +Version: 3.10.1 +Release: 1%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC @@ -849,6 +849,10 @@ fi %endif %changelog +* Thu Mar 6 2025 Jaroslav Škarvada - 2:3.10.1-1 +- New version + Resolves: rhbz#2346039 + * Sat Jan 18 2025 Fedora Release Engineering - 2:3.9.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild diff --git a/sources b/sources index a90f33b..9ebeb11 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (pflogsumm-1.1.5.tar.gz) = 994d660692dfea38a1dd9866d15f15035657e85131c1f5a2cd82baa5bd4ad987a00939cb5233f316d2090014c52ae68ef20db0c893f8634969484e0e74678f4d -SHA512 (postfix-3.9.1.tar.gz) = 79109d9f19e51d9089a0f2b5c6134972148a6e1a7e385aabc79c0a32e09c78715ad94a93ae3eca1171b770c62d6bf3b8e079b94183ae851001db1a0cf21fff15 +SHA512 (postfix-3.10.1.tar.gz) = f977668a3475493c679884fb06e7b6aee33e082b2a828e63e1f67515907ded7b406468d2bb03685275b9cde50ac04c03415876119401d0ca45c5b28ca0277cfe From ef0ff458256534983298fe2ea69a9d690202c9b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Thu, 24 Apr 2025 14:20:19 +0200 Subject: [PATCH 44/55] New version Resolves: rhbz#2361704 Switched to the GCC default standard (now C23) --- postfix.spec | 9 +++++++-- sources | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/postfix.spec b/postfix.spec index 00dd7a3..6fa2cfd 100644 --- a/postfix.spec +++ b/postfix.spec @@ -56,7 +56,7 @@ Name: postfix Summary: Postfix Mail Transport Agent -Version: 3.10.1 +Version: 3.10.2 Release: 1%{?dist} Epoch: 2 URL: http://www.postfix.org @@ -302,7 +302,7 @@ done %build %set_build_flags unset AUXLIBS AUXLIBS_LDAP AUXLIBS_LMDB AUXLIBS_PCRE AUXLIBS_MYSQL AUXLIBS_PGSQL AUXLIBS_SQLITE AUXLIBS_CDB -CCARGS="-fPIC -fcommon -std=gnu17" +CCARGS="-fPIC -fcommon" %if 0%{?rhel} >= 9 AUXLIBS="" %else @@ -849,6 +849,11 @@ fi %endif %changelog +* Thu Apr 24 2025 Jaroslav Škarvada - 2:3.10.2-1 +- New version + Resolves: rhbz#2361704 +- Switched to the GCC default standard (now C23) + * Thu Mar 6 2025 Jaroslav Škarvada - 2:3.10.1-1 - New version Resolves: rhbz#2346039 diff --git a/sources b/sources index 9ebeb11..cb4f2a3 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (pflogsumm-1.1.5.tar.gz) = 994d660692dfea38a1dd9866d15f15035657e85131c1f5a2cd82baa5bd4ad987a00939cb5233f316d2090014c52ae68ef20db0c893f8634969484e0e74678f4d -SHA512 (postfix-3.10.1.tar.gz) = f977668a3475493c679884fb06e7b6aee33e082b2a828e63e1f67515907ded7b406468d2bb03685275b9cde50ac04c03415876119401d0ca45c5b28ca0277cfe +SHA512 (postfix-3.10.2.tar.gz) = 722a29613beae57caacbda1180c7882bfdfe7b948fd64acecbe704b0dbcd1989c59b73adfa6c686a51ad9d4c7a51650b7287b185515de2eaa1a6355127ca634f From 0fe7b8831828f5fe6b296fbb60d7af8efcc597b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Fri, 25 Apr 2025 00:57:47 +0200 Subject: [PATCH 45/55] Still used -std=gnu17 workaround MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jaroslav Škarvada --- postfix.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/postfix.spec b/postfix.spec index 6fa2cfd..5021270 100644 --- a/postfix.spec +++ b/postfix.spec @@ -302,7 +302,7 @@ done %build %set_build_flags unset AUXLIBS AUXLIBS_LDAP AUXLIBS_LMDB AUXLIBS_PCRE AUXLIBS_MYSQL AUXLIBS_PGSQL AUXLIBS_SQLITE AUXLIBS_CDB -CCARGS="-fPIC -fcommon" +CCARGS="-fPIC -fcommon -std=gnu17" %if 0%{?rhel} >= 9 AUXLIBS="" %else @@ -852,7 +852,6 @@ fi * Thu Apr 24 2025 Jaroslav Škarvada - 2:3.10.2-1 - New version Resolves: rhbz#2361704 -- Switched to the GCC default standard (now C23) * Thu Mar 6 2025 Jaroslav Škarvada - 2:3.10.1-1 - New version From 392ad127bde4494bc412e026ea9a87eea574a008 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 9 May 2025 16:12:25 +0200 Subject: [PATCH 46/55] Use modern option name for "follower" symlinks Also, drop full path from call to alternatives. The full path is not needed for anything. --- postfix.spec | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/postfix.spec b/postfix.spec index 5021270..aee389b 100644 --- a/postfix.spec +++ b/postfix.spec @@ -536,19 +536,19 @@ popd readme_directory=%{postfix_readme_dir} &> /dev/null ALTERNATIVES_DOCS="" -[ "%%{_excludedocs}" = 1 ] || ALTERNATIVES_DOCS='--slave %{_mandir}/man1/mailq.1.gz mta-mailqman %{_mandir}/man1/mailq.postfix.1.gz - --slave %{_mandir}/man1/newaliases.1.gz mta-newaliasesman %{_mandir}/man1/newaliases.postfix.1.gz - --slave %{_mandir}/man8/sendmail.8.gz mta-sendmailman %{_mandir}/man1/sendmail.postfix.1.gz - --slave %{_mandir}/man5/aliases.5.gz mta-aliasesman %{_mandir}/man5/aliases.postfix.5.gz - --slave %{_mandir}/man8/smtp.8.gz mta-smtpman %{_mandir}/man8/smtp.postfix.8.gz - --slave %{_mandir}/man8/smtpd.8.gz mta-smtpdman %{_mandir}/man8/smtpd.postfix.8.gz' +[ "%%{_excludedocs}" = 1 ] || ALTERNATIVES_DOCS='--follower %{_mandir}/man1/mailq.1.gz mta-mailqman %{_mandir}/man1/mailq.postfix.1.gz + --follower %{_mandir}/man1/newaliases.1.gz mta-newaliasesman %{_mandir}/man1/newaliases.postfix.1.gz + --follower %{_mandir}/man8/sendmail.8.gz mta-sendmailman %{_mandir}/man1/sendmail.postfix.1.gz + --follower %{_mandir}/man5/aliases.5.gz mta-aliasesman %{_mandir}/man5/aliases.postfix.5.gz + --follower %{_mandir}/man8/smtp.8.gz mta-smtpman %{_mandir}/man8/smtp.postfix.8.gz + --follower %{_mandir}/man8/smtpd.8.gz mta-smtpdman %{_mandir}/man8/smtpd.postfix.8.gz' -%{_sbindir}/alternatives --install %{postfix_command_dir}/sendmail mta %{postfix_command_dir}/sendmail.postfix 60 \ - --slave %{_bindir}/mailq mta-mailq %{_bindir}/mailq.postfix \ - --slave %{_bindir}/newaliases mta-newaliases %{_bindir}/newaliases.postfix \ - --slave %{_sysconfdir}/pam.d/smtp mta-pam %{_sysconfdir}/pam.d/smtp.postfix \ - --slave %{_bindir}/rmail mta-rmail %{_bindir}/rmail.postfix \ - --slave %{_prefix}/lib/sendmail mta-sendmail %{_prefix}/lib/sendmail.postfix \ +alternatives --install %{postfix_command_dir}/sendmail mta %{postfix_command_dir}/sendmail.postfix 60 \ + --follower %{_bindir}/mailq mta-mailq %{_bindir}/mailq.postfix \ + --follower %{_bindir}/newaliases mta-newaliases %{_bindir}/newaliases.postfix \ + --follower %{_sysconfdir}/pam.d/smtp mta-pam %{_sysconfdir}/pam.d/smtp.postfix \ + --follower %{_bindir}/rmail mta-rmail %{_bindir}/rmail.postfix \ + --follower %{_prefix}/lib/sendmail mta-sendmail %{_prefix}/lib/sendmail.postfix \ $ALTERNATIVES_DOCS \ --initscript postfix @@ -597,7 +597,7 @@ exit 0 %systemd_preun %{name}.service if [ "$1" = 0 ]; then - %{_sbindir}/alternatives --remove mta %{postfix_command_dir}/sendmail.postfix + alternatives --remove mta %{postfix_command_dir}/sendmail.postfix fi exit 0 From 65a051a0ae8633ae1b080eeb8b2953813e46510b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 9 May 2025 16:14:25 +0200 Subject: [PATCH 47/55] Make sure the /usr/sbin/sendmail symlink is created on unmerged systems --- postfix.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/postfix.spec b/postfix.spec index aee389b..5a9219c 100644 --- a/postfix.spec +++ b/postfix.spec @@ -57,7 +57,7 @@ Name: postfix Summary: Postfix Mail Transport Agent Version: 3.10.2 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC @@ -552,6 +552,11 @@ alternatives --install %{postfix_command_dir}/sendmail mta %{postfix_command_dir $ALTERNATIVES_DOCS \ --initscript postfix +# Make sure that /usr/sbin/sendmail is not missing, if /usr/sbin is a +# directory. The symlink will only be created if there is no symlink +# or file already. +test -h /usr/sbin || ln -s ../bin/sendmail /usr/sbin/sendmail 2>/dev/null || : + %if %{with sasl} # Move sasl config to new location if [ -f %{_libdir}/sasl2/smtpd.conf ]; then @@ -849,6 +854,10 @@ fi %endif %changelog +* Thu May 08 2025 Zbigniew Jędrzejewski-Szmek - 2:3.10.2-2 +- Make sure the /usr/sbin/sendmail symlink is created on unmerged systems + Resolves: rhbz#2360491 + * Thu Apr 24 2025 Jaroslav Škarvada - 2:3.10.2-1 - New version Resolves: rhbz#2361704 From 8d5320c3f5eb7e48f349119113878fc567b36473 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Thu, 5 Jun 2025 19:11:37 +0200 Subject: [PATCH 48/55] Updated pflogsumm to 1.1.6 Resolves: rhbz#2368396 --- pflogsumm-1.1.5-datecalc.patch | 15 ------------ pflogsumm-1.1.5-ipv6-warnings-fix.patch | 13 ----------- ...umm-1.1.6-syslog-name-underscore-fix.patch | 8 +++---- ...onfig.patch => postfix-3.10.2-config.patch | 6 ++--- postfix.spec | 23 +++++++++---------- sources | 2 +- 6 files changed, 19 insertions(+), 48 deletions(-) delete mode 100644 pflogsumm-1.1.5-datecalc.patch delete mode 100644 pflogsumm-1.1.5-ipv6-warnings-fix.patch rename pflogsumm-1.1.5-syslog-name-underscore-fix.patch => pflogsumm-1.1.6-syslog-name-underscore-fix.patch (65%) rename postfix-3.8.0-config.patch => postfix-3.10.2-config.patch (97%) diff --git a/pflogsumm-1.1.5-datecalc.patch b/pflogsumm-1.1.5-datecalc.patch deleted file mode 100644 index 77ca806..0000000 --- a/pflogsumm-1.1.5-datecalc.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git pflogsumm-1.1.5/pflogsumm.pl pflogsumm-1.1.5/pflogsumm.pl -index 31de5bd..36384dd 100755 ---- pflogsumm-1.1.5/pflogsumm.pl -+++ pflogsumm-1.1.5/pflogsumm.pl -@@ -398,8 +398,8 @@ Copyright (C) 1998-2010 by James S. Seymour, Release 1.1.5 - use strict; - use locale; - use Getopt::Long; --eval { require Date::Calc }; --my $hasDateCalc = $@ ? 0 : 1; -+require Date::Calc; -+my $hasDateCalc = 1; - - my $mailqCmd = "mailq"; - my $release = "1.1.5"; diff --git a/pflogsumm-1.1.5-ipv6-warnings-fix.patch b/pflogsumm-1.1.5-ipv6-warnings-fix.patch deleted file mode 100644 index 51e759e..0000000 --- a/pflogsumm-1.1.5-ipv6-warnings-fix.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git pflogsumm-1.1.5/pflogsumm.pl pflogsumm-1.1.5/pflogsumm.pl -index 36384dd..eb527d0 100755 ---- pflogsumm-1.1.5/pflogsumm.pl -+++ pflogsumm-1.1.5/pflogsumm.pl -@@ -1536,7 +1536,7 @@ sub gimme_domain { - # split domain/ipaddr into separates - # newer versions of Postfix have them "dom.ain[i.p.add.ress]" - # older versions of Postfix have them "dom.ain/i.p.add.ress" -- unless((($domain, $ipAddr) = /^([^\[]+)\[((?:\d{1,3}\.){3}\d{1,3})\]/) == 2 || -+ unless((($domain, $ipAddr) = /^([^\[]+)\[((?:\d{1,3}\.){3}\d{1,3}|[0-9a-f:]+)\]/) == 2 || - (($domain, $ipAddr) = /^([^\/]+)\/([0-9a-f.:]+)/i) == 2) { - # more exhaustive method - ($domain, $ipAddr) = /^([^\[\(\/]+)[\[\(\/]([^\]\)]+)[\]\)]?:?\s*$/; diff --git a/pflogsumm-1.1.5-syslog-name-underscore-fix.patch b/pflogsumm-1.1.6-syslog-name-underscore-fix.patch similarity index 65% rename from pflogsumm-1.1.5-syslog-name-underscore-fix.patch rename to pflogsumm-1.1.6-syslog-name-underscore-fix.patch index 9279bcc..d5e461d 100644 --- a/pflogsumm-1.1.5-syslog-name-underscore-fix.patch +++ b/pflogsumm-1.1.6-syslog-name-underscore-fix.patch @@ -1,7 +1,7 @@ -diff --git a/pflogsumm-1.1.5/pflogsumm.pl b/pflogsumm-1.1.5/pflogsumm.pl -index eb527d0..7e26206 100755 ---- a/pflogsumm-1.1.5/pflogsumm.pl -+++ b/pflogsumm-1.1.5/pflogsumm.pl +diff --git a/pflogsumm b/pflogsumm +index cb3b8a9..35309f0 100755 +--- a/pflogsumm ++++ b/pflogsumm @@ -503,7 +503,12 @@ $usageMsg = # Accept either "_"s or "-"s in --switches foreach (@ARGV) { diff --git a/postfix-3.8.0-config.patch b/postfix-3.10.2-config.patch similarity index 97% rename from postfix-3.8.0-config.patch rename to postfix-3.10.2-config.patch index f77cdc3..3658cd2 100644 --- a/postfix-3.8.0-config.patch +++ b/postfix-3.10.2-config.patch @@ -1,5 +1,5 @@ diff --git a/conf/main.cf b/conf/main.cf -index 2ee7996..336bd7b 100644 +index 1d2c8c2..1c6d5b8 100644 --- a/conf/main.cf +++ b/conf/main.cf @@ -136,6 +136,10 @@ mail_owner = postfix @@ -123,10 +123,10 @@ index 2ee7996..336bd7b 100644 +# +smtp_tls_security_level = may diff --git a/conf/master.cf b/conf/master.cf -index fd282dd..8d969c6 100644 +index 5abe06c..81ae929 100644 --- a/conf/master.cf +++ b/conf/master.cf -@@ -112,14 +112,14 @@ postlog unix-dgram n - n - 1 postlogd +@@ -116,14 +116,14 @@ postlog unix-dgram n - n - 1 postlogd # Also specify in main.cf: cyrus_destination_recipient_limit=1 # #cyrus unix - n n - - pipe diff --git a/postfix.spec b/postfix.spec index 5a9219c..dd207a9 100644 --- a/postfix.spec +++ b/postfix.spec @@ -57,7 +57,7 @@ Name: postfix Summary: Postfix Mail Transport Agent Version: 3.10.2 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC @@ -84,7 +84,7 @@ Source6: postfix.sysusers # Sources 50-99 are upstream [patch] contributions -%define pflogsumm_ver 1.1.5 +%define pflogsumm_ver 1.1.6 # Postfix Log Entry Summarizer: http://jimsun.linxnet.com/postfix_contrib.html Source53: http://jimsun.linxnet.com/downloads/pflogsumm-%{pflogsumm_ver}.tar.gz @@ -96,17 +96,14 @@ Source101: postfix-pam.conf # Patches -Patch1: postfix-3.8.0-config.patch +Patch1: postfix-3.10.2-config.patch Patch2: postfix-3.9.0-files.patch Patch3: postfix-3.9.0-alternatives.patch # probably rhbz#428996 Patch4: postfix-3.8.0-large-fs.patch -Patch9: pflogsumm-1.1.5-datecalc.patch -# rhbz#1384871, sent upstream -Patch10: pflogsumm-1.1.5-ipv6-warnings-fix.patch -Patch11: postfix-3.4.4-chroot-example-fix.patch # rhbz#1931403, sent upstream -Patch13: pflogsumm-1.1.5-syslog-name-underscore-fix.patch +Patch9: pflogsumm-1.1.6-syslog-name-underscore-fix.patch +Patch11: postfix-3.4.4-chroot-example-fix.patch # https://fedoraproject.org/wiki/Changes/OpensslDeprecateEngine Patch14: postfix-3.9.0-openssl-no-engine.patch @@ -274,12 +271,10 @@ src/global/mail_params.h %if %{with pflogsumm} gzip -dc %{SOURCE53} | tar xf - pushd pflogsumm-%{pflogsumm_ver} -%patch -P9 -p1 -b .datecalc -%patch -P10 -p1 -b .ipv6-warnings-fix +%patch -P9 -p1 -b .pflogsumm-1.1.6-syslog-name-underscore-fix popd %endif %patch -P11 -p1 -b .chroot-example-fix -%patch -P13 -p1 -b .pflogsumm-1.1.5-syslog-name-underscore-fix %patch -P14 -p1 -b .openssl-no-engine # Backport 3.8-20221006 fix for uname -r detection @@ -474,7 +469,7 @@ find $RPM_BUILD_ROOT%{postfix_doc_dir} -type d | xargs chmod 755 %if %{with pflogsumm} install -c -m 644 pflogsumm-%{pflogsumm_ver}/pflogsumm-faq.txt $RPM_BUILD_ROOT%{postfix_doc_dir}/pflogsumm-faq.txt install -c -m 644 pflogsumm-%{pflogsumm_ver}/pflogsumm.1 $RPM_BUILD_ROOT%{_mandir}/man1/pflogsumm.1 -install -c pflogsumm-%{pflogsumm_ver}/pflogsumm.pl $RPM_BUILD_ROOT%{postfix_command_dir}/pflogsumm +install -c pflogsumm-%{pflogsumm_ver}/pflogsumm $RPM_BUILD_ROOT%{postfix_command_dir}/pflogsumm %endif # install qshape @@ -854,6 +849,10 @@ fi %endif %changelog +* Thu Jun 5 2025 Jaroslav Škarvada - 2:3.10.2-3 +- Updated pflogsumm to 1.1.6 + Resolves: rhbz#2368396 + * Thu May 08 2025 Zbigniew Jędrzejewski-Szmek - 2:3.10.2-2 - Make sure the /usr/sbin/sendmail symlink is created on unmerged systems Resolves: rhbz#2360491 diff --git a/sources b/sources index cb4f2a3..eb5649d 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (pflogsumm-1.1.5.tar.gz) = 994d660692dfea38a1dd9866d15f15035657e85131c1f5a2cd82baa5bd4ad987a00939cb5233f316d2090014c52ae68ef20db0c893f8634969484e0e74678f4d +SHA512 (pflogsumm-1.1.6.tar.gz) = 4581d2120bc17cfb322fda8d293989a2754eb9fa2696e3a1cea9032e85ed6a566e75aea1f628a6c7bbc7b9d6bf47ffeb873f95d71d7cb7f0ee46e27e492cf630 SHA512 (postfix-3.10.2.tar.gz) = 722a29613beae57caacbda1180c7882bfdfe7b948fd64acecbe704b0dbcd1989c59b73adfa6c686a51ad9d4c7a51650b7287b185515de2eaa1a6355127ca634f From 7523aed70a4e7384b178c183a1d39aa9457dc45a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Thu, 10 Jul 2025 15:52:14 +0200 Subject: [PATCH 49/55] New version Resolves: rhbz#2379297 Updated cyrus-imapd comment in config to point to the correct location Related: RHEL-63089 --- ....10.2-config.patch => postfix-3.10.3-config.patch | 8 +++++--- postfix.spec | 12 +++++++++--- sources | 2 +- 3 files changed, 15 insertions(+), 7 deletions(-) rename postfix-3.10.2-config.patch => postfix-3.10.3-config.patch (95%) diff --git a/postfix-3.10.2-config.patch b/postfix-3.10.3-config.patch similarity index 95% rename from postfix-3.10.2-config.patch rename to postfix-3.10.3-config.patch index 3658cd2..dfdd06a 100644 --- a/postfix-3.10.2-config.patch +++ b/postfix-3.10.3-config.patch @@ -1,5 +1,5 @@ diff --git a/conf/main.cf b/conf/main.cf -index 1d2c8c2..1c6d5b8 100644 +index 1d2c8c2..7a91139 100644 --- a/conf/main.cf +++ b/conf/main.cf @@ -136,6 +136,10 @@ mail_owner = postfix @@ -40,11 +40,13 @@ index 1d2c8c2..1c6d5b8 100644 #alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases # ADDRESS EXTENSIONS (e.g., user+foo) -@@ -488,7 +492,27 @@ unknown_local_recipient_reject_code = 550 +@@ -487,8 +491,28 @@ unknown_local_recipient_reject_code = 550 + # non-UNIX accounts with "User unknown in local recipient table". # # Cyrus IMAP over LMTP. Specify ``lmtpunix cmd="lmtpd" - # listen="/var/imap/socket/lmtp" prefork=0'' in cyrus.conf. +-# listen="/var/imap/socket/lmtp" prefork=0'' in cyrus.conf. -#mailbox_transport = lmtp:unix:/var/imap/socket/lmtp ++# listen="/var/lib/imap/socket/lmtp" prefork=0'' in cyrus.conf. +#mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp + +# If using the cyrus-imapd IMAP server deliver local mail to the IMAP diff --git a/postfix.spec b/postfix.spec index dd207a9..343a41c 100644 --- a/postfix.spec +++ b/postfix.spec @@ -56,8 +56,8 @@ Name: postfix Summary: Postfix Mail Transport Agent -Version: 3.10.2 -Release: 3%{?dist} +Version: 3.10.3 +Release: 1%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC @@ -96,7 +96,7 @@ Source101: postfix-pam.conf # Patches -Patch1: postfix-3.10.2-config.patch +Patch1: postfix-3.10.3-config.patch Patch2: postfix-3.9.0-files.patch Patch3: postfix-3.9.0-alternatives.patch # probably rhbz#428996 @@ -849,6 +849,12 @@ fi %endif %changelog +* Thu Jul 10 2025 Jaroslav Škarvada - 2:3.10.3-1 +- New version + Resolves: rhbz#2379297 +- Updated cyrus-imapd comment in config to point to the correct location + Related: RHEL-63089 + * Thu Jun 5 2025 Jaroslav Škarvada - 2:3.10.2-3 - Updated pflogsumm to 1.1.6 Resolves: rhbz#2368396 diff --git a/sources b/sources index eb5649d..d19b631 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (pflogsumm-1.1.6.tar.gz) = 4581d2120bc17cfb322fda8d293989a2754eb9fa2696e3a1cea9032e85ed6a566e75aea1f628a6c7bbc7b9d6bf47ffeb873f95d71d7cb7f0ee46e27e492cf630 -SHA512 (postfix-3.10.2.tar.gz) = 722a29613beae57caacbda1180c7882bfdfe7b948fd64acecbe704b0dbcd1989c59b73adfa6c686a51ad9d4c7a51650b7287b185515de2eaa1a6355127ca634f +SHA512 (postfix-3.10.3.tar.gz) = 457f2d49c0845992b19601fb597422190f7506da5edd66eac1b0387e9adb339a65d3822205b1c4e9243d8f0a9a4108eb7cf11fba6b53f366934caf8cd489157c From 4e80d80dc3270e1ef50cdaeaec09305e5d115363 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 06:03:32 +0000 Subject: [PATCH 50/55] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- postfix.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/postfix.spec b/postfix.spec index 343a41c..1a2db05 100644 --- a/postfix.spec +++ b/postfix.spec @@ -57,7 +57,7 @@ Name: postfix Summary: Postfix Mail Transport Agent Version: 3.10.3 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC @@ -849,6 +849,9 @@ fi %endif %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 2:3.10.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Thu Jul 10 2025 Jaroslav Škarvada - 2:3.10.3-1 - New version Resolves: rhbz#2379297 From ad919ada0b8f5e6b3ae2c8eff01a184d257d0a75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= Date: Wed, 6 Aug 2025 09:56:59 +0200 Subject: [PATCH 51/55] Rebuilt for icu 77.1 --- postfix.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/postfix.spec b/postfix.spec index 1a2db05..d6d9a24 100644 --- a/postfix.spec +++ b/postfix.spec @@ -57,7 +57,7 @@ Name: postfix Summary: Postfix Mail Transport Agent Version: 3.10.3 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC @@ -849,6 +849,9 @@ fi %endif %changelog +* Wed Aug 06 2025 František Zatloukal - 2:3.10.3-3 +- Rebuilt for icu 77.1 + * Fri Jul 25 2025 Fedora Release Engineering - 2:3.10.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 1c1719b4aaf0c0c73d575fc2800a4813d6f597e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Mon, 25 Aug 2025 14:10:55 +0200 Subject: [PATCH 52/55] New version Resolves: rhbz#2389310 --- postfix-3.9.0-openssl-no-engine.patch | 15 --------------- postfix.spec | 11 ++++++----- sources | 2 +- 3 files changed, 7 insertions(+), 21 deletions(-) delete mode 100644 postfix-3.9.0-openssl-no-engine.patch diff --git a/postfix-3.9.0-openssl-no-engine.patch b/postfix-3.9.0-openssl-no-engine.patch deleted file mode 100644 index f19ae39..0000000 --- a/postfix-3.9.0-openssl-no-engine.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/src/posttls-finger/posttls-finger.c b/src/posttls-finger/posttls-finger.c -index b474a40..9f633f7 100644 ---- a/src/posttls-finger/posttls-finger.c -+++ b/src/posttls-finger/posttls-finger.c -@@ -414,7 +414,9 @@ - - #ifdef USE_TLS - #include --#include -+#include -+#include -+#include - #endif - - /* diff --git a/postfix.spec b/postfix.spec index d6d9a24..88c12f8 100644 --- a/postfix.spec +++ b/postfix.spec @@ -56,8 +56,8 @@ Name: postfix Summary: Postfix Mail Transport Agent -Version: 3.10.3 -Release: 3%{?dist} +Version: 3.10.4 +Release: 1%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC @@ -104,8 +104,6 @@ Patch4: postfix-3.8.0-large-fs.patch # rhbz#1931403, sent upstream Patch9: pflogsumm-1.1.6-syslog-name-underscore-fix.patch Patch11: postfix-3.4.4-chroot-example-fix.patch -# https://fedoraproject.org/wiki/Changes/OpensslDeprecateEngine -Patch14: postfix-3.9.0-openssl-no-engine.patch # Optional patches - set the appropriate environment variables to include # them when building the package/spec file @@ -275,7 +273,6 @@ pushd pflogsumm-%{pflogsumm_ver} popd %endif %patch -P11 -p1 -b .chroot-example-fix -%patch -P14 -p1 -b .openssl-no-engine # Backport 3.8-20221006 fix for uname -r detection sed -i makedefs -e '\@Linux\.@s|345|3456|' @@ -849,6 +846,10 @@ fi %endif %changelog +* Mon Aug 25 2025 Jaroslav Škarvada - 2:3.10.4-1 +- New version + Resolves: rhbz#2389310 + * Wed Aug 06 2025 František Zatloukal - 2:3.10.3-3 - Rebuilt for icu 77.1 diff --git a/sources b/sources index d19b631..e7f751d 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (pflogsumm-1.1.6.tar.gz) = 4581d2120bc17cfb322fda8d293989a2754eb9fa2696e3a1cea9032e85ed6a566e75aea1f628a6c7bbc7b9d6bf47ffeb873f95d71d7cb7f0ee46e27e492cf630 -SHA512 (postfix-3.10.3.tar.gz) = 457f2d49c0845992b19601fb597422190f7506da5edd66eac1b0387e9adb339a65d3822205b1c4e9243d8f0a9a4108eb7cf11fba6b53f366934caf8cd489157c +SHA512 (postfix-3.10.4.tar.gz) = da3a581551670ad4aa595ab50a8dd0bbe7d9e93ee354342c778ae1b461aa7bad9a640e4a55e27b025975c47c92f8238c8d281e1ca5bd1579a009d81ce06924d9 From 391874706816b18356aac7bb45359bd8ba58c46a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Thu, 30 Oct 2025 18:04:50 +0100 Subject: [PATCH 53/55] New version Resolves: rhbz#2406450 Changed protocol for downloading sources from FTP to HTTP (HTTPS isn't supported) --- postfix.spec | 9 +++++++-- sources | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/postfix.spec b/postfix.spec index 88c12f8..419e1fb 100644 --- a/postfix.spec +++ b/postfix.spec @@ -56,7 +56,7 @@ Name: postfix Summary: Postfix Mail Transport Agent -Version: 3.10.4 +Version: 3.10.5 Release: 1%{?dist} Epoch: 2 URL: http://www.postfix.org @@ -74,7 +74,7 @@ Requires: findutils Requires: policycoreutils Provides: MTA smtpd smtpdaemon server(smtp) -Source0: ftp://ftp.porcupine.org/mirrors/postfix-release/official/%{name}-%{version}.tar.gz +Source0: http://ftp.porcupine.org/mirrors/postfix-release/official/%{name}-%{version}.tar.gz Source1: postfix-etc-init.d-postfix Source2: postfix.service Source3: README-Postfix-SASL-RedHat.txt @@ -846,6 +846,11 @@ fi %endif %changelog +* Thu Oct 30 2025 Jaroslav Škarvada - 2:3.10.5-1 +- New version + Resolves: rhbz#2406450 +- Changed protocol for downloading sources from FTP to HTTP (HTTPS isn't supported) + * Mon Aug 25 2025 Jaroslav Škarvada - 2:3.10.4-1 - New version Resolves: rhbz#2389310 diff --git a/sources b/sources index e7f751d..178671d 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (pflogsumm-1.1.6.tar.gz) = 4581d2120bc17cfb322fda8d293989a2754eb9fa2696e3a1cea9032e85ed6a566e75aea1f628a6c7bbc7b9d6bf47ffeb873f95d71d7cb7f0ee46e27e492cf630 -SHA512 (postfix-3.10.4.tar.gz) = da3a581551670ad4aa595ab50a8dd0bbe7d9e93ee354342c778ae1b461aa7bad9a640e4a55e27b025975c47c92f8238c8d281e1ca5bd1579a009d81ce06924d9 +SHA512 (postfix-3.10.5.tar.gz) = 3bec6185f1311f9726c5dc3a902f7e7b9a2e80488bf544805118d212bc1e6496668b60414485331dd0fc807dc1714d0bda6a219e710cdd6c56270a33e1aacabc From f16c090bcbe0c1fa26897e1e99fec946b8f161a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Thu, 30 Oct 2025 18:35:38 +0100 Subject: [PATCH 54/55] Updated config patch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jaroslav Škarvada --- postfix-3.10.3-config.patch => postfix-3.10.5-config.patch | 6 ++++-- postfix.spec | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) rename postfix-3.10.3-config.patch => postfix-3.10.5-config.patch (97%) diff --git a/postfix-3.10.3-config.patch b/postfix-3.10.5-config.patch similarity index 97% rename from postfix-3.10.3-config.patch rename to postfix-3.10.5-config.patch index dfdd06a..c09a76d 100644 --- a/postfix-3.10.3-config.patch +++ b/postfix-3.10.5-config.patch @@ -1,5 +1,5 @@ diff --git a/conf/main.cf b/conf/main.cf -index 1d2c8c2..7a91139 100644 +index 3687c85..ae3af9e 100644 --- a/conf/main.cf +++ b/conf/main.cf @@ -136,6 +136,10 @@ mail_owner = postfix @@ -81,11 +81,13 @@ index 1d2c8c2..7a91139 100644 #fallback_transport = # The luser_relay parameter specifies an optional destination address -@@ -682,4 +705,41 @@ sample_directory = +@@ -682,6 +705,43 @@ sample_directory = # readme_directory: The location of the Postfix README files. # readme_directory = -inet_protocols = ipv4 + shlib_directory = /usr/lib/postfix/${mail_version} + meta_directory = /etc/postfix + +# TLS CONFIGURATION +# diff --git a/postfix.spec b/postfix.spec index 419e1fb..cb568c4 100644 --- a/postfix.spec +++ b/postfix.spec @@ -96,7 +96,7 @@ Source101: postfix-pam.conf # Patches -Patch1: postfix-3.10.3-config.patch +Patch1: postfix-3.10.5-config.patch Patch2: postfix-3.9.0-files.patch Patch3: postfix-3.9.0-alternatives.patch # probably rhbz#428996 From 2e824a6f4d3b449afc8e29f9633d100fba581d69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Fri, 2 Jan 2026 22:55:35 +0100 Subject: [PATCH 55/55] New version Resolves: rhbz#2417154 --- postfix.spec | 6 +++++- sources | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/postfix.spec b/postfix.spec index cb568c4..30811de 100644 --- a/postfix.spec +++ b/postfix.spec @@ -56,7 +56,7 @@ Name: postfix Summary: Postfix Mail Transport Agent -Version: 3.10.5 +Version: 3.10.7 Release: 1%{?dist} Epoch: 2 URL: http://www.postfix.org @@ -846,6 +846,10 @@ fi %endif %changelog +* Fri Jan 02 2026 Jaroslav Škarvada - 2:3.10.7-1 +- New version + Resolves: rhbz#2417154 + * Thu Oct 30 2025 Jaroslav Škarvada - 2:3.10.5-1 - New version Resolves: rhbz#2406450 diff --git a/sources b/sources index 178671d..195284e 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (pflogsumm-1.1.6.tar.gz) = 4581d2120bc17cfb322fda8d293989a2754eb9fa2696e3a1cea9032e85ed6a566e75aea1f628a6c7bbc7b9d6bf47ffeb873f95d71d7cb7f0ee46e27e492cf630 -SHA512 (postfix-3.10.5.tar.gz) = 3bec6185f1311f9726c5dc3a902f7e7b9a2e80488bf544805118d212bc1e6496668b60414485331dd0fc807dc1714d0bda6a219e710cdd6c56270a33e1aacabc +SHA512 (postfix-3.10.7.tar.gz) = 28d7c05bfd6fb15f906c67cca989c4b47640ec631b640943deb66d91e44a6684deb79af95f0d4ba4dd362d9ba59179e5ed268942384e5e35ba472c91cf366e4c