Turns a Postfix configuration into a Sovite one, for
sovitectl migrate postfix.
migrate/3 reads the contents of main.cf and master.cf, and the
lookup tables they name through a read function, and returns:
config- asovite.toml, whichSovite.Core.Config.parse/1accepts. Values that need a look have a# check:comment.script- animport.shofsovitectlcommands that load the lookup tables (aliases, mailboxes, transports, access rules, ...) into Sovite's database. It can hold relay passwords.report- what was migrated, what was ignored because Sovite does it anyway or it does not apply, and what needs attention: settings Sovite has no equivalent for, and manual steps.
It also returns the report lines as entries, the commands of the
script as commands (argument lists, or {:stdin, password, args}),
and the problems Config.parse/1 found in config as errors, which
should be none.
Only the parameters main.cf sets are reported, apart from Postfix
defaults that change what Sovite does (such as mynetworks_style).
The files are untrusted input: no atoms are created from them.
Summary
Functions
Migrates main_cf and master_cf (nil when there is none).
Types
Functions
Migrates main_cf and master_cf (nil when there is none).
Options:
:read- reads a file Postfix names, such as a lookup table's source:(path -> {:ok, binary} | {:error, reason}). Default:File.read/1.:defaults- Postfix defaults that depend on the system, such as"myhostname". SeeSovite.Core.Postfix.MainCf.parse/2.:source- where the files came from, for the comments.:date- the date for the comments. Default: today.