20170206
- Bugfix (introduced: Postfix 3.0): when check_mumble_a_access
+ Bugfix (introduced: Postfix 3.0): check_mumble_a_access
did not handle [ipaddress], unlike check_mumble_mx_access.
When check_mumble_a_access was introduced, some condition
was not updated. Reported by James (postfix_tracker). File:
20170218
Cleanup: typofixes from klemens. The only change in compiled
- code is in one identical mysql error message that also
- appears in the pgsql client. Files: about 50.
+ code is in one mysql error message that also appears in the
+ pgsql client. Files: about 50.
+
+20170221
+
+ Compatibility fix (introduced: Postfix 3.1): some Milter
+ applications do not recognize macros sent as {name} when
+ macros have single-character names. Postfix now sends such
+ macros without {} as it has done historically. Viktor
+ Dukhovni. File: milter/milter.c.
+
+20170402
+
+ Bugfix (introduced: Postfix 3.2): restore the SMTP server
+ receive override options at the end of an SMTP session,
+ after the options may have been modified by an smtpd_milter_maps
+ setting of "DISABLE". Problem report by Christian Rößner,
+ root cause analysis by Viktor Dukhovni. File: smtpd/smtpd.c.
+
+20170430
+
+ Safety net: append a null byte to vstring buffers, so that
+ C-style string operations won't scribble past the end. File:
+ vstring.c.
+
+20170531
+
+ Bugfix (introduced: Postfix 3.2): after the table lookup
+ overhaul, the check_sender_access and check_recipient_access
+ features ignored the parent_domain_matches_subdomains
+ setting. Reported by Henrik Larsson. File: smtpd/smtpd_check.c.
+
+20170610
+
+ Workaround (introduced: Postfix 3.0 20140718): prevent MIME
+ downgrade of Postfix-generated message/delivery status.
+ It's supposed to be 7bit, therefore quoted-printable encoding
+ is not expected. Problem reported by Griff. File:
+ bounce/bounce_notify_util.c.
|_______________________________|_____________________________________________|
| |Specifies options for the postfix-install |
|POSTFIX_INSTALL_OPTS=-option...|command, separated by whitespace. Currently, |
-| |the only supported option is "-keep-new- |
+| |the only supported option is "-keep-build- |
| |mtime". |
|_______________________________|_____________________________________________|
| |Specifies non-default compiler options for |
|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
| |Specifies options for the postfix-install |
|POSTFIX_INSTALL_OPTS=-option...|command, separated by whitespace. Currently, |
-| |the only supported option is "-keep-new- |
+| |the only supported option is "-keep-build- |
| |mtime". |
|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
| |Specifies non-default compiler options for |
<tr> <td colspan="2"> POSTFIX_INSTALL_OPTS=-option... </td> <td>
Specifies options for the <tt>postfix-install</tt> command, separated
by whitespace. Currently, the only supported option is
-"<tt>-keep-new-mtime</tt>". </td> </tr>
+"<tt>-keep-build-mtime</tt>". </td> </tr>
<tr> <td colspan="2"> SHLIB_CFLAGS=flags </td> <td> Specifies
non-default compiler options for building Postfix dynamically-linked
<tr> <td colspan="2"> POSTFIX_INSTALL_OPTS=-option... </td> <td>
Specifies options for the <tt>postfix-install</tt> command, separated
by whitespace. Currently, the only supported option is
-"<tt>-keep-new-mtime</tt>". </td> </tr>
+"<tt>-keep-build-mtime</tt>". </td> </tr>
<tr> <td colspan="2"> SHLIB_CFLAGS=flags </td> <td> Specifies
non-default compiler options for building Postfix dynamically-linked
(bounce_info->smtputf8 & SMTPUTF8_FLAG_REQUESTED) ?
"global-" : "");
/* Fix 20140709: addresses may be 8bit. */
- if (NOT_7BIT_MIME(bounce_info))
+ if (NOT_7BIT_MIME(bounce_info)
+ /* BC Fix 20170610: prevent MIME downgrade of message/delivery-status. */
+ && (bounce_info->smtputf8 & SMTPUTF8_FLAG_REQUESTED))
post_mail_fprintf(bounce, "Content-Transfer-Encoding: %s",
bounce_info->mime_encoding);
* Patches change both the patchlevel and the release date. Snapshots have no
* patchlevel; they change the release date only.
*/
-#define MAIL_RELEASE_DATE "20170228"
-#define MAIL_VERSION_NUMBER "3.2.0"
+#define MAIL_RELEASE_DATE "20170610"
+#define MAIL_VERSION_NUMBER "3.2.1"
#ifdef SNAPSHOT
#define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE
VSTRING *canon_buf = vstring_alloc(20);
const char *value;
const char *name;
+ const char *cname;
while ((name = mystrtok(&cp, CHARS_COMMA_SP)) != 0) {
if (msg_verbose)
msg_info("%s: \"%s\"", myname, name);
if (*name != '{') /* } */
- name = STR(vstring_sprintf(canon_buf, "{%s}", name));
- if ((value = milters->mac_lookup(name, milters->mac_context)) != 0) {
+ cname = STR(vstring_sprintf(canon_buf, "{%s}", name));
+ else
+ cname = name;
+ if ((value = milters->mac_lookup(cname, milters->mac_context)) != 0) {
if (msg_verbose)
msg_info("%s: result \"%s\"", myname, value);
argv_add(argv, name, value, (char *) 0);
} else if (milters->macro_defaults != 0
- && (value = htable_find(milters->macro_defaults, name)) != 0) {
+ && (value = htable_find(milters->macro_defaults, cname)) != 0) {
if (msg_verbose)
msg_info("%s: using default \"%s\"", myname, value);
argv_add(argv, name, value, (char *) 0);
milter_free(state->milters);
state->milters = 0;
}
+ smtpd_input_transp_mask =
+ input_transp_mask(VAR_INPUT_TRANSP, var_input_transp);
}
const char *myname = "check_mail_access";
const RESOLVE_REPLY *reply;
const char *value;
+ int lookup_strategy;
int status;
MAPS *maps;
* Look up user+foo@domain if the address has an extension, user@domain
* otherwise.
*/
-#define LOOKUP_STRATEGY (MA_FIND_FULL | MA_FIND_NOEXT | MA_FIND_DOMAIN \
- | MA_FIND_PDMS | MA_FIND_LOCALPART_AT)
+ lookup_strategy = MA_FIND_FULL | MA_FIND_NOEXT | MA_FIND_DOMAIN
+ | MA_FIND_LOCALPART_AT
+ | (access_parent_style == MATCH_FLAG_PARENT ?
+ MA_FIND_PDMS : MA_FIND_PDDMDS);
if ((maps = (MAPS *) htable_find(map_command_table, table)) == 0) {
msg_warn("%s: unexpected dictionary: %s", myname, table);
def_acl));
}
if ((value = mail_addr_find_strategy(maps, CONST_STR(reply->recipient),
- (char **) 0, LOOKUP_STRATEGY)) != 0) {
+ (char **) 0, lookup_strategy)) != 0) {
*found = 1;
status = check_table_result(state, table, value,
CONST_STR(reply->recipient),
*/
if ((bp->flags & VSTRING_FLAG_EXACT) == 0 && bp->len > incr)
incr = bp->len;
- if (bp->len > SSIZE_T_MAX - incr)
+ if (bp->len > SSIZE_T_MAX - incr - 1)
msg_fatal("vstring_extend: length overflow");
new_len = bp->len + incr;
- bp->data = (unsigned char *) myrealloc((void *) bp->data, new_len);
+ bp->data = (unsigned char *) myrealloc((void *) bp->data, new_len + 1);
+ bp->data[new_len] = 0;
bp->len = new_len;
bp->ptr = bp->data + used;
bp->cnt = bp->len - used;
{
VSTRING *vp;
- if (len < 1)
+ if (len < 1 || len > SSIZE_T_MAX - 1)
msg_panic("vstring_alloc: bad length %ld", (long) len);
vp = (VSTRING *) mymalloc(sizeof(*vp));
vp->vbuf.flags = 0;
vp->vbuf.len = 0;
- vp->vbuf.data = (unsigned char *) mymalloc(len);
+ vp->vbuf.data = (unsigned char *) mymalloc(len + 1);
+ vp->vbuf.data[len] = 0;
vp->vbuf.len = len;
VSTRING_RESET(vp);
vp->vbuf.data[0] = 0;