Next: , Previous: , Up: Upgrading   [Contents][Index]

C.4 Upgrading from 8.13 to 8.14

No special actions are required. There are several important changes in version 8.14, most notable ones being improved dkim_sign function, DNS resolver tolerance for CNAME chains, and buffered I/O.


This change is important for those who use dkim_sign with Sendmail. See dkim_sign and sendmail, for a detailed discussion.

CNAME chains

Mailfromd dropped support for CNAME chains in version 8.3 (see 820-830). This change was forced by the behavior of the adns resolver library, which had apparently been grounded on somewhat rigorous reading of RFCs 103432 and 218133. Reportedly, many existing DNS servers still employ CNAME chains leading to TXT records (in particular, to DKIM TXT records), so this change made certain DKIM signatures unverifiable for mailfromd.

To fix this, starting from version 8.14 mailfromd implements a work-around that allows it to follow CNAME chains of limited length. The default length is 2 (which means CNAME pointing to a CNAME, pointing to a valid RR). It can be changed using the dns.max-cname-chain configuration statement (see conf-resolver).

I/O buffering

Buffered I/O can tremendously improve performance of getdelim and getline.

The global variables io_buffering and io_buffer_size (see io_buffering) define buffering mode and associated buffer size for file descriptors returned by the subsequent calls to open or spawn. Buffering mode of an already open file descriptor can be changed using the setbuf function.

The io_buffering variable defines the buffering mode. By default it is 0 (BUFFER_NONE), which disables buffering for backward compatibility with the previous versions. Another possible values are: 1 (BUFFER_FULL) and 2 (BUFFER_LINE).

When set to BUFFER_FULL, all I/O operations become fully buffered. The buffer size is defined by the io_buffer_size global variable.

BUFFER_LINE is similar to BUFFER_FILE when used for input. When used for the output, the data are accumulated in buffer and actually sent to the underlying transport stream when the newline character is seen. The io_buffer_size global variable sets the initial value for the buffer size in this mode. The actual size can grow as needed during the I/O.

The default value for io_buffer_size is the size of the system page.

The symbolic constants BUFFER_NONE, BUFFER_FULL and BUFFER_LINE are defined in the module. E.g.:

  require status

    io_buffering = BUFFER_FULL

will set up all the subsequent buffer-aware I/O functions for buffered reads and writes using the maximum buffer capacity.

The setbuf function (see setbuf) changes the buffering mode and/or buffer size for an already opened stream, e.g.:

  setbuf(fd, BUFFER_FULL, 4096)

For detailed discussion of various buffering modes and their effect on the I/O, see I/O functions.




Next: , Previous: , Up: Upgrading   [Contents][Index]