Global settings g_mirror

  1. Home
  2. Knowledge Base
  3. Installation
  4. Global settings g_mirror
  1. Home
  2. Knowledge Base
  3. Management
  4. Global settings g_mirror
  1. Home
  2. Knowledge Base
  3. Settings
  4. Global settings g_mirror

g_mirror_config – Mirror surgemail.ini

Syntax: g_mirror_config “true/false”

You put this on both machines and it will attempt to mirror the surgemail.ini. There will be some settings that you do not wish to mirror and these can be exempted by using:

g_mirror_config_except “setting,setting,setting”

Some settings are not mirrored by default these are: g_mirror_host, g_mirror_nwauth*, g_mirror_mode, g_authent_path, g_dlist_path, g_log_path, g_record_path, g_home, g_authent_process, g_mfilter_file, g_webmail_work, g_work, g_virus_cmd, g_atrn_port, g_imap_port, g_imap_secure_port, g_ldap_port, g_manager_port, g_manager_secure_port, g_monitor_port, g_pop_port, g_pop_secure_port, g_ppd_port, g_smtp_port, g_smtp_secure_port, g_webmail_port, g_webmail_secure_port, g_surgeplus_port, g_surgeplus_secure_port, g_surgeplus_web_port, g_bind_out, g_virus_avast, dmail_drop_path, dmail_bin_path, web_path, webmail_work

(it is possible we will update this list over time)
* g_mirror_nwauth is obsolete don’t use it.

Syntax: g_mirror_config bool

g_mirror_config_except – Mirror surgemail.ini

Syntax: g_mirror_config “setting,setting,setting”

This will tell the server not to import the specified settings from the other mirror.

Example:
g_mirror_except “g_spam_allow”

This will tell the server not to change this setting. This only affects the machine its on, if the other server does not have this set, it will continue to mirror the setting. This setting accepts wildcards. This setting accepts a special case value “address” that will prevent mirroring of existing domain ip addresses, allowing different ips on each mirror machine. There are a number of settings which are not mirrored by default these are specified above in g_mirror_config.

In addition the mailbox_path setting is not mirrored, unless, the existing setting is a sub directory of the g_mailbox_path and the new setting is a sub directory of the g_mailbox_path from the other server, in which case the mailbox_path is set to the same sub directory using the existing g_mailbox_path setting eg.

[recieving server]
g_mailbox_path “c:\surgemail\mbox”
mailbox_path “c:\surgemail\mbox\domain”

[sending server]
g_mailbox_path “d:\surgemail\mbox”
mailbox_path “c:\surgemail\mbox\domain_moved_here”

[result on recieving server]
g_mailbox_path “c:\surgemail\mbox”
mailbox_path “c:\surgemail\mbox\domain_moved_here”

Syntax: g_mirror_config_except string

g_mirror_debug – Log more info to mirror log.

Helps when tracking down fault with nwauth or mirroring, never leave turned on as it can lead to mutex crashing

Syntax: g_mirror_debug bool

g_mirror_email – Email manager list of fixes sent

This is a debug setting to spot issues with mirroring, it emails the manager a log of the files that were resynced, set G_MIRROR_PRUNE_AGE 1 as well to cut down on false positives.

Syntax: g_mirror_email bool

g_mirror_host – Mirror host 

This unique SurgeMail feature allows you to setup two identical mail servers across a local or widearea network. The waiting mail messages & folders etc are duplicated continuously between the two systems, so users can use either system. If either system fails for any hardware reason the other acts as an instant on line replacement without any interruption to the user. In addition when the faulty system is replaced the two automatically re-synchronize. 

See this page for Mirror overview

Syntax: g_mirror_host string

g_mirror_live – Mirror: Send incoming messages immediately

Enables a faster mirroring mechanism, strongly recomended, this setting will be the default in a future release

Syntax: g_mirror_live bool

g_mirror_live_max – Limit size of mirror_live default 60k

This prevents smtp delays when mirroring over a slowish link. The default is 60k

Syntax: g_mirror_live_max int

g_mirror_lock – Lock master during slave bursts

This setting has no further documentation currently available

Syntax: g_mirror_lock bool

g_mirror_max – Max items in one folder to mirror, default 160k currently

This setting has no further documentation currently available

Syntax: g_mirror_max int

g_mirror_mode – Master / slave mirror system

Certain actions may only be run on the mirror master system (such as expire processing) or are different in behaviour between the master and slave (such as NWAuth mirrorring and dlist mirorring). This setting must be set to MASTER on one system and SLAVE on the other system for correct operation. (Note basic mirrorring of delivered mail will happen if this setting is the same on both systems it is just some of the special mirrorring functionality that this is required for)

Syntax: g_mirror_mode string

g_mirror_nossl – Disable SSL for mirror protocol connection

This is best turned off unless your servers are talking over a wide area untrusted network. 

Syntax: g_mirror_nossl bool

g_mirror_nwauth – Mirror NWAuth data files (deprecated – for backward compatibility only)

This setting is no longer used (as of SurgeMail 1.7d), the g_mirror_mode setting is used instead to decide whether do mirror the NWAuth database.

Syntax: g_mirror_nwauth bool

g_mirror_nwauth_always – Mirror nwauth database files

Set this if you’re using multiauth to run nwauth and you want those files mirrored. Requires you to add -isslave2 to multiauth.ini nwauth command line. Requires the nwauth files to be located in the surgemail root/install directory.

Syntax: g_mirror_nwauth_always bool

g_mirror_others – BETA Other hosts, for 3,4 host mirrors,(DO NOT USE)

This setting has no further documentation currently available

Syntax: g_mirror_others string

g_mirror_prune_age – Mirror minimum age for items to be pruned during sync_prune

Mirror minimum age for items to be pruned during sync_prune, default 14 days. 

Syntax: g_mirror_prune_age int

g_mirror_repair – Run resync_prune once per month, only set on master, TURN OFF DURING FAILURES

This setting runs a nighly resync to keep the cluster in sync. Maybe be resource intensive on a large system! This should always be disabled during a failure as it could cause messages loss when the master is re connected.

Syntax: g_mirror_repair bool

g_mirror_resync_inbox – BETA Resync inbox for active users once a day

This setting has no further documentation currently available

Syntax: g_mirror_resync_inbox bool

g_mirror_secret – Mirror secret shared password

This password is required to prevent the mirroring mechanisms being abused. We recommend a random string of letters at least 10 characters long. e.g. “urcajfielsjfs” 

Syntax: g_mirror_secret string

g_mirror_threads – Max threads we can use during resync_fast, default 6

During resync fast four threads are used, this is usually sufficient, more may overload your system and result in failures, if your system is not under load you could set it as high as eight, but this would only be sensible if your disk array has more than 4 drives in it!

Syntax: g_mirror_threads int

g_mirror_trash – Normally on a resync the trash folder is ignored.

This can be useful when you want to compare results so you want everything even if it’s a bit pointless

Syntax: g_mirror_trash bool

Was this article helpful?

Related Articles