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


C.17 Upgrading from 3.1.x to 4.0

Before building this version, please re-read the chapter See Building, especially the section Using non-blocking syslog.

Starting from the version 4.0, MFL no longer uses the predefined symbolic names for exception codes (previous versions used the ‘&’ prefix to dereference them). Instead, it relies on constants defined in the include file status.mfh (see status.mf).

However, the script files from 3.1 series will still work, but the following warning messages will be displayed:

Warning: obsolete constant form used: &failure
Warning: remove leading '&' and include <status.mfh>

Warning: Using built-in exception codes is deprecated
Warning: Please include <status.mfh>

Another important difference is that pragmatic options ‘ehlo’ and ‘mailfromd’ are now deprecated, as well as their command line equivalents --ehlo and --domain. These options became superfluous after the introduction of mailfrom_address and ehlo_domain built-in variables. For compatibility with the previous versions, they are still supported by mailfromd 4.0, but a warning message is issued if they are used:

warning: `#pragma option ehlo' is deprecated,
 consider using `set ehlo_domain "domain.name"' instead

To update your startup scripts for the new version follow these steps:

  1. Change #pragma option mailfrom value to set mailfrom_address value. Refer to mailfrom_address, for a detailed discussion of this variable.
  2. Change #pragma option ehlo value to set ehlo_domain value. Refer to ehlo_domain, for a detailed discussion of this variable.
  3. Include status.mfh. Add the following line to the top of your startup file:
    #include_once <status.mfh>
    
  4. Remove all instances of ‘&’ in front of the constants. You can use the following sed expression: ‘s/&\([a-z]\)/\1/g’.
  5. If your code uses any of the following functions: hostname, resolve, hasmx or ismx, add the following line to the top of your script:
    #require dns
    

    See Modules, for a detailed description of the module system.

  6. Replace all occurrences of next with pass.
  7. If your code uses function match_cidr, add the following line to the top of your script:
    #require match_cidr
    

    See Modules, for a description of MFL module system.


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