YaST2 Developers Documentation: Configuration of mail aliases

Configuration of mail aliases

modules/Mail.ycp
Data for configuration of mail aliases, input and output functions.
  • Martin Vidner

This module has an unstable interface.

Representation of the configuration of mail aliases. Input and output routines. Separated from Mail.ycp because yast2-users need us. Virtusertable/virtual users are not included, arbitrarily.

Imports

  • MailTable

Global Variables

Global Functions

Local Variables

Local Functions

global aliases -> list<map>

List of maps: $[comment:, alias:, destinations:] (all are strings) Except root.

global root_alias -> string

Separated/joined with aliases by read/write/set/export

local root_alias_comment -> string

Separated/joined with aliases by read/write/set/export

Info:

Useful for autoinstall: the provided aliases will be (with higher priority) merged with existing ones (presumably system defaults).

global FilterRootAlias () -> void

Separates aliases into aliases, root_alias and root_alias_comment

global ReadAliases () -> boolean

Read the aliases table (and separate the root alias)

Return value:
success?
global MergeRootAlias (list<map> aliases) -> list<map>

Parameters:
aliases an alias table
Return value:
prepend root alias data to aliases, if set
local mergeTables (list<map> new, list<map> old) -> list<map>

Merges mail tables, which are order-preserving maps. First are the entries of the old map, with values updated from the new one, then the rest of the new map.

Parameters:
new new table
old old table
Return value:
merged table
global WriteAliases () -> boolean

Part of Write.

Return value:
success
See
SetRootAlias
global GetRootAlias () -> string

For use by the Users package. Does not rely on the internal state, first calls the agent.

Return value:
eg. "joe, \\root", "" if not defined
global SetRootAlias (string destinations) -> boolean

For use by the Users package. Does not use the internal state, just calls the agent. SuSEconfig or newaliases is NOT called! (TODO: what if it is called while the main module is running?) Errors are reported via Report::Error.

Parameters:
destinations The new alias. If "", it is removed.
Return value:
true on success