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

Show feedback again
Latest News
Mailfromd 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.15

Item posted by Sergey Poznyakoff <gray> on Sun Dec 11 09:36:34 2022.

Version 8.15 is available for download.

New in this release:

Default MFL source file suffix

The default suffix for MFL files is changed to '.mfl'. In particular, the master script file is now "mailfromd.mfl". This change is intended to avoid confusion with Metafont files, which have suffix '.mf'.

As of this version, the new suffix is recommended, but not obligatory: the legacy '.mf' suffix is still supported. If a file 'X.mfl' is not found, mailfromd will look for ''.

MFL module search path

MFL modules loaded using the "require" or "import" statements are looked up in module search path. Previously, they were searched for in include search path, which created confusion, since include search path is intended for use by preprocessor. To maintain backward compatibility, if mailfromd is unable to find a module in module search path, it will retry the search using include path. This behavior will be maintained during a transitional period (a couple of releases), after which searches in include search path will be

  • Preprocessor configuration

Use of preprocessor is configured by the following statement in the main configuration file:

If preprocessor.pass-includes is true, the preprocessor.command setting is augmented by zero or more -I options, thereby supplying it the mailfromd include path.

Furthermore, if preprocessor.pass-defines is set, zero or more -D options defining optional features are passed to it (e.g. -DWITH_DKIM) as well as any -D and -U options from the mailfromd command line.

Unless the value of preprocessor.setup-file begins with a slash, the file with this name is looked up in the current include search path. If found, its absolute name is passed to the preprocessor as first argument.

If the value begins with a slash, it is passed to the preprocessor as is.

New MFL operator: $@

The $@ operator can be used as the last argument in a call to variadic function from another variadic function. It passes all variable arguments supplied to the calling function on to the function being called. E.g.:

In this example, if "y" is called as y("text", 1, 2, 3) it will call "x" as x(1, 2, 3).

This operator can also be used with a numeric argument: $@(N). In this case, it will remove first N elements from the argument list and push remaining ones on stack. This is similar to the 'shift' operator in other programming languages, e.g.:

Data types in variadic function declaration

The ellipsis in a variadic function declaration can be preceded by the data type, e.g.:

For compatibility with previous versions, if the type is omitted, string is assumed.

The void() type cast

The void() type cast can be used around a function call to indicate that its return value is ignored deliberately.

mfmod: dynamically loaded modules

This new type of mailfromd modules uses dynamically loaded libraries to extend the program functionality without having to modify its code. For a detailed discussion see the manual, section 4.22, "Dynamically Loaded Modules".

Three mfmods exist at the time of this writing:

Syntax of special handler definitions

Special handlers ("begin" and "end", in particular) are now defined using
the standard "prog" keyword (similar to milter state handlers):

Old syntax is supported for backward compatibility, but causes a
deprecation warning. Application writers are advised to update their

New special handlers: startup and shutdown

These two handlers provide global initialization and cleanup routines. The "startup" handler is run by the master mailfromd process as part of the startup sequence, before the program starts to serve any milter requests. The "shutdown" handler is run when mailfromd is about to terminate.

Notice an important differences between "startup"/"shutdown" and "begin"/"end" special handlers. The latter are session specific: they are run at the start and end of a milter session. The former are global: they are run at the program startup and shutdown.

The "startup" handler is normally used by mfmod interface modules to load the corresponding shared library.

Use of STARTTLS in callout

If TLS is supported by libmailutils, the SMTP callout code will use STARTTLS when offered by the remote server. This is controlled by the smtp-starttls configuration statement. Its possible values are:

  • never

Never use STARTTLS.

  • always

Always use STARTTLS if offered by the server.

  • ondemand

Use STARTTLS only if MAIL FROM: command failed with the code
530 (Authorization required).

The default is "ondemand".

Qualified DBM file names in database configuration

Argument to database.file statement can be prefixed with "database scheme" to select alternative DBM implementation. For example:

See the manual, section 7.11 "Database Configuration" for details.

New command line option: --echo

The --echo option allows you to control where the output of the "echo" statement goes in "run" and "test" modes. When used without argument it directs the output to the standard output stream. If an argument is supplied (as in: --echo=FILE), the output goes to the named file. The file will be created if it doesn't exist. Notice, that in the latter case, the use of '=' is compulsory (--echo FILE won't work).

Deprecated configuration statements removed

Deprecated configuration statements `lock-retry-count' and `lock-retry-timeout' were removed in this version. Use the `locking' statement instead, e.g. instead of


Removed support for obsolete features: legacy GeoIP and DSPAM


No messages in Version 8.15


Show feedback again

Back to the top

Powered by Savane 3.1-cleanup+gray