newsmailfromd -- a general-purpose milter - News: Version 8.14

 
 
Show feedback again
Latest News
Version 9.0 posted by gray, Mon Jan 8 21:05:21 2024 - 0 replies
Version 8.17.1 posted by gray, Thu Jul 20 09:46:22 2023 - 0 replies
Version 8.17 posted by gray, Fri Jul 7 11:04:32 2023 - 0 replies
Version 8.16 posted by gray, Mon May 1 12:58:15 2023 - 0 replies
Version 8.15 posted by gray, Sun Dec 11 09:36:34 2022 - 0 replies
[Submit News]
[53 news in archive]

Version 8.14

Item posted by Sergey Poznyakoff <gray> on Sat Aug 13 09:30:40 2022.

Mailfromd version 8.14 is available for download.

New in this version:

Initialization of implicitly declared automatic variables

Implicitly declared automatic variables are initialized to null values, just like global ones. This means, in particular that
the following code is now valid:

Depending on the return value of bar(), this function will print either "ok" or an empty string. In previous versions, it would produce unspecified results.

Buffered I/O

The I/O operations can be buffered. Use of fully buffered streams can dramatically improve performance, especially for getline and getdelim calls.

The global variables io_buffering and io_buffer_size 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 status.mf module. E.g.:

Use the setbuf function to change the buffering mode and/or buffer size for an already opened stream, e.g.:

Changes in read and write functions

The read function tries to read as much data (up to the requested amount) as possible. It will return success if it succeeded to read less bytes than requested (in previous versions it would incorrectly signal the e_io exception in this case). Use the length() function to determine actual number of bytes read. The 'read' functions signals e_eof if it read 0 bytes and e_io if an error occurred.

The write function tries to write as much data (up to the requested amount) as possible. It will signal e_io in case of error and e_eof if 0 bytes were written.

dkim_sign and Sendmail

Sendmail silently modifies certain headers before sending the message in the SMTP transaction. It has been reported that on certain occasions this invalidates DKIM signatures created by dkim_sign(). To prevent this from happening, dkim_sign() now mimics the Sendmail behavior and reformats those headers before signing the message. The headers affected are: Apparently-To, Bcc, Cc, Disposition-Notification-To, Errors-To, From, Reply-To, Resent-Bcc, Resent-Cc, Resent-From, Resent-Reply-To, Resent-Sender, Resent-To, Sender, To.

This behavior is controlled by the global variable dkim_sendmail_commaize. Set it to 0 to disable it.

Support for rsa-sha1 in DKIM

Both dkim_sign and dkim_verify support rsa-sha1 for compatibility with older software. Upon return from dkim_verify the name of the algorithm used to sign the message is stored in the global variable dkim_signing_algorithm. The dkim_sign function takes additional optional argument that specifies the algorithm to use. Its declaration is now:

New DKIM explanation code: DKIM_EXPL_BAD_KEY_TYPE

This code is reported by dkim_verify if the k= tag of the public DKIM key contains a value other than "rsa".

Support for CNAME chains

CNAME chains are formed by DNS CNAME records pointing to another CNAME. Using CNAME chains in DNS is not considered a good practice and prior versions of mailfromd would refuse to resolve a CNAME pointing to CNAME. However, this interacted badly with certain DNS servers that publish otherwise valid RRs pointed to by 2 or 3 element CNAME chains. To cope with such server, mailfromd now allows for CNAME chains of length 2 by default. This can further be configured using the max-cname-chain statement in the resolver section of mailfromd configuration file (see below).

The "resolver" configuration statement

This new configuration statement configures certain aspects of the internal DNS resolver. The syntax is as follows:

The config statement defines the name of the resolver configuration file to use instead of the default /etc/resolv.conf.

The max-cname-chain statement defines the maximum length of a CNAME chain that will be followed. The default is 2.

Bugfixes

Fixed sorting in dns_query()*

  • Fixed a bug in message I/O functions
  • Fixed a bug in dkim_sign routine
  • Avoid dereferencing undefined optional arguments in built-ins
  • Fixed return value of hasmx function
  • Fixed header handling in send_text, create_dsn and send_dsn built-ins
  • Fixed compilation with flex >= 2.6.1
  • Remove unused configuration variables

Comments:

No messages in Version 8.14

 

Show feedback again

Back to the top


Powered by Savane 3.1-cleanup+gray