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

 
 
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.9

Item posted by Sergey Poznyakoff <gray> on Tue Dec 29 14:21:59 2020.

Mailfromd version 8.9 is available for download. Below is a summary of user-visible changes:

The sed function

The construct:

where each SEXPR is a sed-like `s' command: s/REGEXP/REPL/[FLAGS] matches VALUE against the REGEXP. If the match succeeds, the portion of VALUE which was matched is replaced with REPL. If the FLAGS value includes 'g' (global replace), this process continues until the entire VALUE has been scanned.

The resulting output serves as input for next SEXPR, if such is supplied. The process continues untill all arguments have been applied.

The function returns the output of the last SEXPR.

For example:

This removes optional angle quotes and converts the domain name part to lower case.

The qr function

The qr function quotes its first argument as a regular expression, by escaping with a backslash each character that has special meaning in regular expression (such as '*', '?', etc.) The set of special characters is controlled by the `#pragma regex' statement in effect.

The dns_query function

The dns_query function provides a generalized API for querying the Internet Domain Name System. Example usage:

On dns_getname, dns_getaddr, getns, and getmx

These used to be built-in functions. Starting from this release, they are implemented in pure MFL, in the module dns. Be sure to require this module if you are using these functions.

New geolocation functions (libmaxminddb)

The support for geolocation using the libmaxminddb library is added. It is enabled if the libmaxminddb is installed and can be located using pkg-config. The new configure option --with-geoip2 is available to expressly request it.

If enabled, the GeoIP2 support is indicated by the following line in the output of configure:

In the output of mailfromd --show-defaults, it is indicated by the word GeoIP2 in the list of optional features.

The preprocessor macro WITH_GEOIP2 is defined if the GeoIP2 support is compiled in.

The following new functions are available:

void geoip2_open (string FILENAME)

Opens the geolocation database file FILENAME.

string geoip2_dbname (void)

Returns the name of the geolocation database currently in use.

string geoip2_get (string IP, string PATH)

Looks up the ip address IP in the database and returns the data item identified by PATH. E.g. to retrieve the country code:

string geoip2_get_json (string IP; number INDENT)

Looks up IP in the database and returns entire data set, formatted as JSON object.

Legacy geolocation functions

Support for the legacy geolocation library libGeoIP is marked as deprecated. Users are advised to migrate to GeoIP2 instead.

Comments:

No messages in Version 8.9

 

Show feedback again

Back to the top


Powered by Savane 3.1-cleanup+gray