]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.9-20230517
authorWietse Venema <wietse@porcupine.org>
Wed, 17 May 2023 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <ietf-dane@dukhovni.org>
Sun, 28 May 2023 02:49:02 +0000 (22:49 -0400)
14 files changed:
postfix/HISTORY
postfix/README_FILES/MAILLOG_README
postfix/html/MAILLOG_README.html
postfix/html/master.8.html
postfix/html/postconf.5.html
postfix/html/postlog.1.html
postfix/html/postlogd.8.html
postfix/man/man1/postlog.1
postfix/man/man5/postconf.5
postfix/man/man8/master.8
postfix/man/man8/postlogd.8
postfix/src/global/mail_version.h
postfix/src/master/master.c
postfix/src/posttls-finger/posttls-finger.c

index 4766e17118ff935bb80886524a854f2c614a21b9..85119166a85e995cc654f651f5731eb9c648e5d8 100644 (file)
@@ -27172,3 +27172,11 @@ Apologies for any names omitted.
        master/master.c, postlog/postlog.c, postlogd/postlogd.c,
        util/logwriter.c, util/logwriter.h, util/Makefile.in,
        util/vstream.c.
+
+20230517
+
+       Bugfix (defect introduced: Postfix 3.8) the posttls-finger
+       command could access uninitialized memory when reconnecting.
+       This also fixes a warning message when a destination contains
+       ":service" information. Reported by Thomas Korbar. File:
+       posttls-finger/posttls-finger.c.
index 6f8fead72d038a5487948bfd57b46c968ec18c66..75fa4b5675ef3bded0f010bb76a9a43c6d7a43ce 100644 (file)
@@ -30,8 +30,14 @@ problems for systemd-based systems.
  2. Configure Postfix to write logging, to, for example, /var/log/postfix.log.
     See also the "Logfile rotation" section below for logfile management.
 
+    In the example below, specifying maillog_file_permissions is optional
+    (Postfix 3.9 and later). The default value is 0600, i.e., only the super-
+    user can access the file; the value 0644 also adds 'group' and 'other' read
+    access.
+
         # postfix stop
         # postconf maillog_file=/var/log/postfix.log
+        # postconf maillog_file_permissions=0644 # (Postfix 3.9 and later)
         # postfix start
 
     By default, the logfile name must start with "/var" or "/dev/stdout" (the
@@ -71,6 +77,10 @@ implements the following steps:
   * After a brief pause, compress the old logfile. The compression program is
     configured with the maillog_file_compressor parameter (default: gzip).
 
+  * The next time it logs an event, postlogd(8) will create a new logfile, with
+    permissions specified with the maillog_file_permissions parameter (default:
+    0600).
+
 Notes:
 
   * This command will not rotate a logfile with a pathname under the /dev
index be58e334f7b9380ffe0694a08b9850b1ca6ec416..ab751f4c66021b01ec08a43e145c6f28a5010f0b 100644 (file)
@@ -63,10 +63,16 @@ Postfix version. </p>
 /var/log/postfix.log. See also the "<a href="#logrotate">Logfile
 rotation</a>" section below for logfile management. </p>
 
+<p> In the example below, specifying <a href="postconf.5.html#maillog_file_permissions">maillog_file_permissions</a> is
+optional (Postfix 3.9 and later). The default value is 0600, i.e.,
+only the super-user can access the file; the value 0644 also
+adds 'group' and 'other' read access. </p>
+
 <blockquote>
 <pre>
 # postfix stop
 # postconf <a href="postconf.5.html#maillog_file">maillog_file</a>=/var/log/postfix.log
+# postconf <a href="postconf.5.html#maillog_file_permissions">maillog_file_permissions</a>=0644 # (Postfix 3.9 and later)
 # postfix start
 </pre>
 </blockquote>
@@ -124,6 +130,10 @@ old logfile. </p>
 program is configured with the <a href="postconf.5.html#maillog_file_compressor">maillog_file_compressor</a> parameter
 (default: gzip). </p>
 
+<li> <p> The next time it logs an event, <a href="postlogd.8.html">postlogd(8)</a> will create a
+new logfile, with permissions specified with the <a href="postconf.5.html#maillog_file_permissions">maillog_file_permissions</a>
+parameter (default: 0600). </p>
+
 </ul>
 
 <p> Notes: </p>
index cacc801306965cb20ced6619441c605c6b847e49..70e0063f6c9691397509f3e445ecc5b451dd6b4d 100644 (file)
@@ -148,15 +148,15 @@ MASTER(8)                                                            MASTER(8)
               invoked with the -D option.
 
        <b><a href="postconf.5.html#inet_interfaces">inet_interfaces</a> (all)</b>
-              The network interface addresses that this mail  system  receives
-              mail on.
+              The local network interface  addresses  that  this  mail  system
+              receives mail on.
 
        <b><a href="postconf.5.html#inet_protocols">inet_protocols</a> (see 'postconf -d output')</b>
               The  Internet  protocols Postfix will attempt to use when making
               or accepting connections.
 
        <b><a href="postconf.5.html#import_environment">import_environment</a> (see 'postconf -d' output)</b>
-              The list of environment parameters  that  a  privileged  Postfix
+              The list of environment  variables  that  a  privileged  Postfix
               process  will  import  from  a  non-Postfix  parent  process, or
               name=value environment overrides.
 
index 4426f727b9bcaac3eb03d2a61301a89728ea5bac..51ed8ed69819eaaee7c5dc18a634b9041a01f8fd 100644 (file)
@@ -6688,6 +6688,21 @@ first argument. </p>
 <p> This feature is available in Postfix 3.4 and later. </p>
 
 
+</DD>
+
+<DT><b><a name="maillog_file_permissions">maillog_file_permissions</a>
+(default: 0600)</b></DT><DD>
+
+<p> The file access permissions that will be set when the file
+$<a href="postconf.5.html#maillog_file">maillog_file</a> is created for the first time, or when the file is
+created after an existing file is rotated. Specify one of: <b>0600</b>
+(only super-user read/write access), <b>0640</b> (adds 'group' read
+access), or <b>0644</b> (also adds 'other' read access). The leading
+'0' is optional.  </p>
+
+<p> This feature is available in Postfix 3.9 and later. </p>
+
+
 </DD>
 
 <DT><b><a name="maillog_file_prefixes">maillog_file_prefixes</a>
index 587edbc1dda89ad01b5e1b3224285493a4b9c48b..617b78b0a878707a2bc0f0633ce145f15b54b7eb 100644 (file)
@@ -90,6 +90,13 @@ POSTLOG(1)                                                          POSTLOG(1)
        <b><a href="postconf.5.html#postlog_service_name">postlog_service_name</a> (postlog)</b>
               The name of the <a href="postlogd.8.html"><b>postlogd</b>(8)</a> service entry in <a href="master.5.html">master.cf</a>.
 
+       Available in Postfix 3.9 and later:
+
+       <b><a href="postconf.5.html#maillog_file_permissions">maillog_file_permissions</a> (0600)</b>
+              The file access permissions that  will  be  set  when  the  file
+              $<a href="postconf.5.html#maillog_file">maillog_file</a> is created for the first time, or when the file is
+              created after an existing file is rotated.
+
 <b>SEE ALSO</b>
        <a href="postconf.5.html">postconf(5)</a>, configuration parameters
        <a href="postlogd.8.html">postlogd(8)</a>, Postfix logging
index 58cdf017d048b608b55b7f087b71d22c13eee7e5..3ddbf66211dc2404cec92388d5cc5657cd403549 100644 (file)
@@ -68,6 +68,13 @@ POSTLOGD(8)                                                        POSTLOGD(8)
               How  much  time  a  <a href="postlogd.8.html"><b>postlogd</b>(8)</a>  process  may  take to process a
               request before it is terminated by a built-in watchdog timer.
 
+       Available in Postfix 3.9 and later:
+
+       <b><a href="postconf.5.html#maillog_file_permissions">maillog_file_permissions</a> (0600)</b>
+              The file access permissions that  will  be  set  when  the  file
+              $<a href="postconf.5.html#maillog_file">maillog_file</a> is created for the first time, or when the file is
+              created after an existing file is rotated.
+
 <b>SEE ALSO</b>
        <a href="postconf.5.html">postconf(5)</a>, configuration parameters
        syslogd(8), system logging
index 52bd815c328490c953a53be726bf91f3338aa146..d9723e7c4e31985d45bc8f67c532082c6ef1b6d6 100644 (file)
@@ -94,6 +94,12 @@ The name of an optional logfile that is written by the Postfix
 \fBpostlogd\fR(8) service.
 .IP "\fBpostlog_service_name (postlog)\fR"
 The name of the \fBpostlogd\fR(8) service entry in master.cf.
+.PP
+Available in Postfix 3.9 and later:
+.IP "\fBmaillog_file_permissions (0600)\fR"
+The file access permissions that will be set when the file
+$maillog_file is created for the first time, or when the file is
+created after an existing file is rotated.
 .SH "SEE ALSO"
 .na
 .nf
index bc0822bc011407f6a113106003cf3203ef8cc128..48cb498bc25bc202ef4a2f9b4c6657f359a9648a 100644 (file)
@@ -4150,6 +4150,15 @@ logrotate". The command is run with the rotated logfile name as its
 first argument.
 .PP
 This feature is available in Postfix 3.4 and later.
+.SH maillog_file_permissions (default: 0600)
+The file access permissions that will be set when the file
+$maillog_file is created for the first time, or when the file is
+created after an existing file is rotated. Specify one of: \fB0600\fR
+(only super\-user read/write access), \fB0640\fR (adds 'group' read
+access), or \fB0644\fR (also adds 'other' read access). The leading
+\&'0' is optional.
+.PP
+This feature is available in Postfix 3.9 and later.
 .SH maillog_file_prefixes (default: /var, /dev/stdout)
 A list of allowed prefixes for a maillog_file value. This is a
 safety feature to contain the damage from a single configuration
index 8c37de4e121068b5da1104bd13e0ec010234af8f..c6ed9ac533bbf0912b0df06112ec22a5afff6bf3 100644 (file)
@@ -151,13 +151,13 @@ The directory with Postfix support programs and daemon programs.
 The external command to execute when a Postfix daemon program is
 invoked with the \-D option.
 .IP "\fBinet_interfaces (all)\fR"
-The network interface addresses that this mail system receives
-mail on.
+The local network interface addresses that this mail system
+receives mail on.
 .IP "\fBinet_protocols (see 'postconf -d output')\fR"
 The Internet protocols Postfix will attempt to use when making
 or accepting connections.
 .IP "\fBimport_environment (see 'postconf -d' output)\fR"
-The list of environment parameters that a privileged Postfix
+The list of environment variables that a privileged Postfix
 process will import from a non\-Postfix parent process, or name=value
 environment overrides.
 .IP "\fBmail_owner (postfix)\fR"
index 9168a3429dd1306f295e548ac4f828d54ad1495c..df2f5c04d9bc213f8e171d568dc942a507c74ef8 100644 (file)
@@ -66,6 +66,12 @@ The master.cf service name of a Postfix daemon process.
 .IP "\fBpostlogd_watchdog_timeout (10s)\fR"
 How much time a \fBpostlogd\fR(8) process may take to process a request
 before it is terminated by a built\-in watchdog timer.
+.PP
+Available in Postfix 3.9 and later:
+.IP "\fBmaillog_file_permissions (0600)\fR"
+The file access permissions that will be set when the file
+$maillog_file is created for the first time, or when the file is
+created after an existing file is rotated.
 .SH "SEE ALSO"
 .na
 .nf
index 4704e0ba63e4bb8aaf4d412b675fe500e638a03d..fc2f3adc8b7561f777111d8b307a7118b4f6c6de 100644 (file)
@@ -20,7 +20,7 @@
   * Patches change both the patchlevel and the release date. Snapshots have no
   * patchlevel; they change the release date only.
   */
-#define MAIL_RELEASE_DATE      "20230516"
+#define MAIL_RELEASE_DATE      "20230517"
 #define MAIL_VERSION_NUMBER    "3.9"
 
 #ifdef SNAPSHOT
index f34df22e949df3ebab26ac745f8c52c755ba9acf..ec971ffa96d37f1c210eed066fcc77696d1b136d 100644 (file)
 /*     The external command to execute when a Postfix daemon program is
 /*     invoked with the -D option.
 /* .IP "\fBinet_interfaces (all)\fR"
-/*     The local network interface addresses that this mail system receives
-/*     mail on.
+/*     The local network interface addresses that this mail system
+/*     receives mail on.
 /* .IP "\fBinet_protocols (see 'postconf -d output')\fR"
 /*     The Internet protocols Postfix will attempt to use when making
 /*     or accepting connections.
index 2f3a58e8257abdf2c30bc6149ab3727f63367fe8..b9a46999d25c7cc47b49bc069a6435cb839f4531 100644 (file)
@@ -1590,12 +1590,13 @@ 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 +1623,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;
        }