YaST2 Developers Documentation: Configuration of mail

Configuration of mail

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

This module has an unstable interface.

Representation of the configuration of mail. Input and output routines.

Imports

  • MailAliases
  • MailTable
  • Mode
  • Package
  • PackageSystem
  • Progress
  • Report
  • Service
  • SuSEFirewall
  • Summary

Global Variables

Global Functions

Local Variables

Local Functions

global required_packages -> list

Required packages

global mta -> symbol

`sendmail, `postfix or `other Initialized by ReadMta

global write_only -> boolean

If true, don't run SuSEconfig or restart the services. Autoinstall uses this to do all in one place.

global CreateConfig () -> boolean

If MAIL_CREATE_CONFIG is not yes, the user does not want SuSEconfig to modify sendmail.cf/main.cf. So we will warn him before setting it to yes.

Return value:
Is it yes?
global connection_type -> symbol

`permanent, `dialup or `none

global listen_remote -> boolean

If false, port 25 will listen only for localhost

global use_amavis -> boolean

Use a virus scanner (AMaViS). amavisd-new (mta-independent) must be installed. It will be installed if amavis_allowed and it is not installed.

global amavis_allowed -> boolean

Is amavis available on the installation media?

global local_domains -> list<string>

Domains for locally delivered mail. (ahost.acompany.com is a domain)

global outgoing_mail_server -> string

A relay server for outgoing mail. May be enclosed in [brackets] to prevent MX lookups.

global smtp_use_TLS -> boolean

Do the MTA use TLS for sending the email.

global from_header -> string

Mail will appear to come from this domain. Applies also for the envelope. Does not apply for mail from root.

global masquerade_other_domains -> list<string>

If empty, from_header will be applied to mails coming from local_domains, otherwise from these domains. (Remember: mail domains)

global masquerade_users -> list<map>

User specific sender masquerading. List of maps: $[comment:, user:, address:] (all are strings)

global postfix_mda -> symbol

sysconfig/postfix:POSTFIX_MDA #26052

global fetchmail_mode -> symbol

When should fetchmail run:

`manual
`ppp
for a ppp conection, /etc/ppp/ip-{up,down}.d
`network
for any network connection, /etc/sysconfig/network/if-{up,down}.d
#22903 Unused yet! #37139, just enable rcfetchmail.

global fetchmail -> list<map>

List of maps: $[server:, protocol:, remote_user:, local_user:, password:, enabled:(bool), other_(server|client)_options: ]

global virtual_users -> list<map>

Domain-specific aliases. List of maps: $[comment:, alias:, destinations:] (all are strings)

global smtp_auth -> list<map>

SMTP AUTH (#23000) list of maps: The ui only handles the first list item, the rest is for autoyast $[server: string, user: string, password: string(plain text)] There are other map keys that must be preserved on editing.

local enable_smtp_auth -> boolean

Sysconfig setting that enables the feature. For postfix, it is a simple yes/no which we set to (size(smtp_auth)>0) For sendmail, it is a list of methods which we set to empty or all but we don't touch it if it was something in between, marked as nil. Must default to non-nil.

local sendmail_all_mechanisms -> string

The full set of authentication mechanisms for sendmail

global protocol_choices -> list<string>

Fetchmail protocols, as defined in rcfile_l.l Probably not all of them are compatible with our simplified scheme but it does not hurt to include them. Must check for validity: the agent matches [[:alnum:]]+, lowercase names are valid too.

global touched -> boolean

Has the configuration been changed? Can be used as an argument to Popup::ReallyAbort

global Touch (boolean really) -> void

A convenient shortcut for setting touched.

Parameters:
really if true, set Mail::touched
Example
 Mail::Touch (Mail::var != ui_var);
global install_packages -> list<string>

Read only, set by ProbePackages. Use as an argument to Package::DoInstallAndRemove

global remove_packages -> list<string>

Read only, set by ProbePackages. Use as an argument to Package::DoInstallAndRemove

local amavis_service -> boolean

Of the four available amavis packages, amavis-postfix does not need a service running, others do. Update: only one package, amavisd-new, but let's keep the variable, just in case. We query rpm in WriteGeneral (so that it works for autoinst too). This is only used if use_amavis is on, of course.

global ProbePackages () -> string

Detect which packages have to be installed and return a descriptive string for a plain text pop-up.

Return value:
"" or "Foo will be installed.\nBar will be installed.\n"
local ReadMta () -> void

Detect the MTA installed

local RunFetchmailGlobally () -> boolean

Return value:
Whether rcfetchmail should run
global Read (block<boolean> abort) -> boolean

Read all mail settings from the SCR

Parameters:
abort A block that can be called by Read to find out whether abort is requested. Returns true if abort was pressed.
Return value:
True on success
global Fake () -> void

Make up data for screnshots

local WriteGeneral () -> boolean

Part of Write.

Return value:
success
local WriteMasquerading () -> boolean

Part of Write.

Return value:
success
local WriteDownloading () -> boolean

Part of Write.

Return value:
success
local WriteAliasesAndVirtual () -> boolean

Part of Write.

Return value:
success
local WriteSmtpAuth () -> boolean

Part of Write.

Return value:
success
local WriteFlush () -> boolean

Part of Write.

Return value:
success
local WriteSuSEconfig () -> boolean

Part of Write.

Return value:
success
local WriteServices () -> boolean

Part of Write.

Return value:
success
global Write (block<boolean> abort) -> boolean

Update the SCR according to mail settings

Parameters:
abort A block that can be called by Write to find out whether abort is requested. Returns true if abort was pressed.
Return value:
True on success
global Import (map Settings) -> boolean

Get all mail settings from the first parameter (For use by autoinstallation.)

Parameters:
Settings The YCP structure to be imported.
Return value:
True on success
global Export () -> map

Dump the mail settings to a single map (For use by autoinstallation.)

Return value:
Dumped settings (later acceptable by Import ())
local ListItem (string title, any value, any index) -> string

Summarizes a list of data

Parameters:
title passed to Summary::AddHeader
value a list (of scalars, lists or maps)
index if the entries are not scalars, use this index to get a scalar
Return value:
Summary-formatted description
global Summary () -> string

Summary

Return value:
with summary of configuration
global AutoPackages () -> map

Return required packages for auto-installation

Return value:
of packages to be installed and to be removed