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


C.20 Upgrading from 1.x to 2.x

If you are upgrading from version 1.x to 2.0, you will have to do the following:

  1. Edit your script file and enclose the entire code section into:
    prog envfrom
    do
      …
    done
    

    See Handlers, for more information about the prog statement.

  2. If your code contained any rate statements, convert them to function calls (see rate), using the following scheme:
    Old statement: if rate key limit / expr
    New statement: if rate(key, interval("expr")) > limit
    

    For example,

       rate $f 180 / 1 hour 25 minutes
    

    should become

       rate($f, interval("1 hour 25 minutes")) > 180
    
  3. Rebuild your databases using the following command:
    mailfromd --compact --all   
    

    This is necessary since the format of mailfromd databases has changed in version 2.0: the key field now includes the trailing ‘NUL’ character, which is also reflected in its length. This allows for empty (zero-length) keys. See Database Maintenance, for more information about the database compaction.