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


C.18 Upgrading from 3.0.x to 3.1

  1. The mailfromd binary no longer supports --config-file (-c) option. To use an alternative script file, give it as an argument, i.e. instead of:
    $ mailfromd --config-file file.rc
    

    write:

    $ mailfromd file.rc
    

    For backward compatibility, the old style invocation still works but produces a warning message. However, if mailfromd encounters the -c option it will print a diagnostic message and exit immediately. This is because the semantics of this option will change in the future releases.

  2. If a variable is declared implicitly within a function, it is created as automatic. This differs from the previous versions, where all variables were global. It is a common practice to use global variables to pass additional information between handlers (See HELO Domain, for an example of this approach). If your filter uses it, make sure the variable is declared as global. For example, this code:
    prog helo
    do
      # Save the host name for further use    
      set helohost $s
    done
    

    Figure C.1: Implicit declaration, old style

    has to be rewritten as follows:

    set helohost ""
    
    prog helo
    do
      # Save the host name for further use    
      set helohost $s
    done
    

    Figure C.2: Implicit declaration, new style

  3. Starting from version 3.1 the function dbmap takes an optional third argument indicating whether or not to count the terminating null character in key (see dbmap). If your startup script contained any calls to dbmap, change them as follows:
    in 3.0.xin 3.1
    dbmap(db, key)dbmap(db, key, 1)

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