Configuration of mail |
modules/Mail.ycp |
Data for configuration of mail, input and output functions. | |
|
|
This module has an unstable interface. |
Representation of the configuration of mail.
Input and output routines.
Imports
Global Variables
Global Functions
Local VariablesLocal Functions |
Required packages
`sendmail, `postfix or `other Initialized by ReadMta
If true, don't run SuSEconfig or restart the services. Autoinstall uses this to do all in one place.
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?
`permanent, `dialup or `none
If false, port 25 will listen only for localhost
Use a virus scanner (AMaViS). amavisd-new (mta-independent) must be installed. It will be installed if amavis_allowed and it is not installed.
Is amavis available on the installation media?
Domains for locally delivered mail. (ahost.acompany.com is a domain)
A relay server for outgoing mail. May be enclosed in [brackets] to prevent MX lookups.
Do the MTA use TLS for sending the email.
Mail will appear to come from this domain. Applies also for the envelope. Does not apply for mail from root.
If empty, from_header will be applied to mails coming from local_domains, otherwise from these domains. (Remember: mail domains)
User specific sender masquerading. List of maps: $[comment:, user:, address:] (all are strings)
sysconfig/postfix:POSTFIX_MDA #26052
When should fetchmail run:
- "manual"
- "daemon"
-
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 -> booleanSysconfig 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 -> stringThe 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 -> booleanHas the configuration been changed? Can be used as an argument to Popup::ReallyAbort
global Touch (boolean really) -> voidA 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 -> booleanOf 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 cron_file -> stringThe cron file name for the queue checking.
global check_interval -> integerThe cron interval for the queue checking.
global ProbePackages () -> stringDetect 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 () -> voidDetect the MTA installed
local RunFetchmailGlobally () -> boolean- Return value:
-
Whether rcfetchmail should run
global Read (block<boolean> abort) -> booleanRead 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 ReadWithoutCallback () -> booleanWrapper for global Read function, without the callback argument
global Fake () -> voidMake up data for screnshots
global WriteGeneral () -> booleanPart of Write.
- Return value:
-
success
global WriteMasquerading () -> booleanPart of Write.
- Return value:
-
success
global WriteDownloading () -> booleanPart of Write.
- Return value:
-
success
global WriteAliasesAndVirtual () -> booleanPart of Write.
- Return value:
-
success
global WriteSmtpAuth () -> booleanPart of Write.
- Return value:
-
success
global WriteFlush () -> booleanPart of Write.
- Return value:
-
success
global WriteSuSEconfig () -> booleanPart of Write.
- Return value:
-
success
global WriteServices () -> booleanPart of Write.
- Return value:
-
success
global Write (block<boolean> abort) -> booleanUpdate 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 WriteWithoutCallback () -> booleanWrapper for global Write function, without the callback argument
global Import (map Settings) -> booleanGet 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 () -> mapDump 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) -> stringSummarizes 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 () -> stringSummary
- Return value:
-
with summary of configuration
global AutoPackages () -> mapReturn required packages for auto-installation
- Return value:
-
of packages to be installed and to be removed