Note: Most 'matching' settings take wild card lists as parameters, for example "fred*" will match "freddy" and "Fred@bob". And "1.2.*,2.3.*" will match 1.2.4.4 and 2.3.99.100.
This is not a setting itself but part of the vdomain setting. The vdomain setting is like a section heading, it divides the configuration file into sections, the global section comes first followed by any number of domain sections or vdomain blocks.
The address part of the vdomain setting is the IP number of this virtual domain. You will also need to configure your operating system and network to respond to this IP address. Doing this for specific operating systems is described on this page in more detail.
This is not a setting itself, but part of the vdomain setting. The vdomain setting is like a section heading it divides the configuration file into sections. The global section comes first followed by any number of domain sections or vdomain blocks.
This is the name of this virtual domain of the mail server. It is a domain name it accepts mail for. The mail server supports any number of virtual domains. See this page for a discussion on different types of virtual domains.
eg: if you are wanting to send mail to user@mydomain.com this setting should be "mydomain.com". But if you are wanting to send mail to user@mail.mydomain.com this setting should be "mail.mydomain.com"
This setting is seperate from your actual hostname of the system running your email server. These will often be the same but if they are not it is important that the url_host setting setting is set to correctly resolve your server. eg: You could have domain_name = mydomain.com and url_host = mail.mydomain.com if your mail server is separate from your web server and your main company web server is already hosted on mydomain.com.
The read/write fields should be a list of valid usergroups or * for all users
Syntax: abook name=string read=string write=string type=string
Specifies the default g_access_group to place users in this domain into.
Syntax: access_group_default string
This setting allows you to specify default access to certain SurgeMail features. It is specified in the same maner as the g_admin_access settings 'access' parameter. eg:
admin_access_default "all,!users,!reports"
Syntax: admin_access_default string
In addition each domain has it's own 'alias' file (domain.name/alias.dat). You can create alias files using the same syntax as used in UNIX systems /etc/aliases. The format is:
username: destination bob: fred@domain.com joe: joesmith
This file only exists for backward compatibility.
Syntax: alias_file string
Limits the ..total number of aliases allowed in this domain to the value specified.
Syntax: alias_max int
This setting effect the g_disable_smtp_after and g_delete_user_after settings which, by default, ignore users who have not logged in and have no created field.
Syntax: assume_created_epoch bool
This setting has no further documentation currently available
Syntax: blogs_max_per_user int
Example: blogs_max_per_user 10
See also: g_access_group, g_blogs_max_per_user, g_user_blogs
Customer specific feature
Syntax: broad_sync bool
Specifies accounts that can charge for incoming email.
Syntax: centipaid match=string acct=string pass=string https=string lang=string amount=int enabled=bool friends=bool smite=int
hidden
Syntax: class type=string from=string users=string groups=string name=string
This is a dummy setting that lets you store information in the ini file that will survive setting changes from the web admin tool.
Syntax: comment date=string name=string comment=string
Stops users from specific IP addresses from registering in this domain (assuming that you have allowed users to register themselves). Use this to stop known spammers from re-registering on your system.
Syntax: create_block string
This causes a delete to be actioned for a user before/as they are created. This ensures the new user does not end up with any files, on any mailing lists, with any aliases etc from a previous user of the same name/address. If you delete users from the authent database directly i.e. not using the surgemail web admin or calling 'tellmail delete_user' then this setting will cleanup the users files when their address is re-used.
Syntax: create_cleanup bool
Accounts disabled with create_disable_days remain until the specified number of days at which point they are deleted.
Syntax: create_delete_days int
See also: create_disable_days
New accounts when created are set to expire after the specified number of days. When this occurs they can no longer login or recieve email.
Syntax: create_disable_days int
See also: create_delete_days
This adds a verification image to the signup process. The user will be required to correctly enter the value shown in the image to signup
Syntax: create_image bool
This is the web url/link that the user creation process links to once it has created a new and active email account (active means it is ready for use, i.e. not disabled, verified my manager etc)
Syntax: create_linkto string
This setting stops spammers registering hundreds of accounts on your system before sending out a lot of spam. A setting of 2-3 is probably a good idea.
Syntax: create_max int
If true this will show a "Password Again" input in addition to the "Password" input on the user signup page. The user is required to type the password in twice and the passwords are compared to ensure they are identical.
Syntax: create_repass bool
A comma separated list of field names. Allowable field names are the "field" value(s) of the g_authent_info setting.
For example, if your setting is:
name,phone
then when a new user is created they will be forced to fill in the name and
phone fields in the registration form.
NOTE: A g_authent_info setting is required to make the field appear on the signup page, eg.
g_authent_info name="Phone" field="phone" access="user" default=""
the above setting causes a field for phone to appear on the signup page and in the user details page.
Syntax: create_reqd string
If true this allows users to create accounts with a unique subdomain i.e. firstname@lastname.domain. SurgeMail uses the domuser system to handle sub-doamin users. Wildcard MX records are required to ensure delivery to subdomain users.
Syntax: create_subdomain bool
The relative path from the web directory to the user creation and user self management pages, these pages are typically called na_*.htm and stored in the /web directory. If you want a different look and feel for a domain simply set this and copy the pages to a directory in /web then modify them.
For example, if your setting is:
otherdomain/
Then you would:
cd /surgemail/web
mkdir otherdomain
copy na_*.htm otherdomain
CD otherdomain
notepad na_login.htm
Syntax: create_tpl_dir string
Can be one of:
| Value | Description |
| open | Anyone can create an account immediately providing name and password. Be sure to set create_max "3" to prevent spammers creating dozens of accounts. |
| Anyone can create an account providing existing email address. | |
| manager | Manager approves account, user provides existing email address. |
| manager_new | Manager activates account, user proves name and password. |
| disabled | Users cannot signup, accounts are created by the Web Admin. |
In 'open' mode users account are created instantly. In 'email' mode they recieve an email and use a link to create their account. In 'manager' mode the manager recieves an email and via a link sends the user an email which they use to create their account. In 'manager_new' mode the account is created disable and the manager receives an email with a link to activate the account.
Syntax: create_user string
DO NOT USE THIS SETTING IN A MIRROR/CLUSTER SETUP
Number of days an account can remain unread before it is deleted. This setting cannot be used on an authent_domain FALSE domain unless it has a prefix setting.
Syntax: delete_user_after int
Specifies a number of days an account can remain 'unread' before it stops recieving new emails. This is intended to stop mail piling up for abandoned email accounts.
Syntax: disable_smtp_after int
Disable users from logging in using the SurgePlus Calendar and File Sharing client. See SurgePlus
Syntax: disable_surgeplus bool
See also: g_disable_surgeplus
Path for DMail style bin files to automatically convert. This allows you to import delivered but unpopped mail from DMail bin and mailbox files. While this is set a check is done whether this import needs to be done each time a user logs on. Any mail is converted on the fly and added to the users SurgeMail inbox.
Syntax: dmail_bin_path string
This setting has no further documentation currently available
Syntax: dmail_deliver bool
Path for DMail / sendmail style drop files to automatically convert. This allows you to import delivered but unpopped mail from standard drop files. While this is set a check is done whether a drop file needs to be imported each time a user logs on. Any mail is converted on the fly and added to the users SurgeMail inbox.
Syntax: dmail_drop_path string
Prefix on dmail drop files for dmail_drop_path conversion.
Syntax: dmail_drop_prefix bool
DMail style hashing scheme used by dmail_drop_path and dmail_bin_path.
Syntax: dmail_hash string
This setting is usually not needed
Syntax: dmail_skip_imap bool
Per user limit
Syntax: encrypt_limit int
Disables the automatic confirm reading message
Syntax: encrypt_noconfirm bool
If this rule matches then the message will be encrypted before it is sent to the user. method=server or inline, we recommend 'server' mode as it's much simpler.
Syntax: encrypt_rule header=string contains=string from=string to=string noconfirm=bool method=string
Not for general use
Syntax: encrypt_smart bool
Not yet implemented
Syntax: encrypt_subject string
Not for general use
Syntax: encrypt_token bool
Users can set an email address to send a notify to when they get an email. This setting sets the 'from' header for such messages.
Syntax: enotify_from string
See also: g_enotify_from
Use this to trim messages that are left in the INBOX, this means messages that are unread and messages which are read but not moved to another folder. The deleted messages are replaced with a single message explaining which items have been deleted (with from, subject and date of each message deleted). You should define both age and size to enable expiration.
Currently expire ONLY affects 'newmail' ie: mail that is waiting to be read not mail stored in IMAP folders.
Syntax: expire_age int
These rules let you specify and expire rule for any folder. The folder match is not case sensitive
e.g. to delete all spam message
over 30 days old and larger than 3k and to empty the trash can each day.
expire_rule folder="Spam"
age="30" size="3k"
expire_rule folder="Trash"
age="1"
You can use wild cards, e.g. Delete all messages over 90 days old larger than 10k unless in the new or archive* folders.
expire_rule folder="*,!new,!archive*" age="90" size="10k"
Syntax: expire_rule folder=string age=int size=int
Use this to trim messages that are not read by users. The deleted messages are replaced with a single message explaining which items have been deleted (with from, subject and date of each message deleted so that anything really important can be recovered). You should define both age and size to enable expiration.
Syntax: expire_size int
Specifies a default account to deliver Email to. This is sent to a non existent account. If not defined the Email will be bounced. Setting fallback to "/dev/null" will drop messages (both UNIX and Windows).
Syntax: fallback string
This setting can be used when bringing up a new system if you want to be able to backout. It is not recommended
Syntax: fallback_always bool
Check if user exists on fallback relay host before accepting it.
Syntax: fallback_check bool
Specifies a default host to send messages to that are not found in the local user database. This allows you to transition between two mail systems, as new accounts are created the emails will be delivered to SurgeMail, and ones that don't exist will be sent on to the old system automatically. There are several options to make this work using servers that only accept mail if they can do a reverse lookup.
Syntax: fallback_relay string
Useful to remove load from backend server as it doesn't have to be checked for non existent users, the file can contain user@domain or just usernames
Syntax: fallback_users string
Footer file for all plain text messages 'from' this domain based on from address.
Syntax: footer_file string
Footer file for all HTML messages 'from' this domain based on from address.
Syntax: footer_html string
Syntax: g_forward_illegal to="address" apply="user type "
This setting allows you to specify some addresses as being illegal for certain users. This stops users setting up forwarding rules to these addresses. They can still send mail to these addresses manually with their email client. These rules _ONLY_ apply to non local domains.
Some examples:
If you want to stop your users setting up forward rules that redirect to aol.com.
g_forward_illegal to="*@aol.com" apply="user"
If you want to stop your users setting a forward to all domains except aol.com
g_forward_illegal to="*,!*@aol.com" apply="user"
Stop domain admins sending to aol.com
g_forward_illegal to="*@aol.com" apply="domadmin"
Stop admins sending to netwinsite.com
g_forward_illegal to="*@netwinsite.com" apply="admin"
Syntax: forward_illegal to=string apply=string
This setting is automatically added/removed by the web admin when domain level friends defaults are configured. It allows us to check friends at rcpt stage without paying a disk access cost for non-friends users.
Syntax: friends_at_rcpt bool
This shouldn't be changed unless this feature has not been used before as it will confuse your users as they will have the old imap folder too. Ensure you have enabled this feature with g_imap_friends setting
Syntax: friends_pending_name string
See also: friends_at_rcpt, friends_url, g_friends_only, g_friends_bounce_rej, g_friends_bounce_friend, g_friends_daemon_ok, g_friends_name, g_friends_pending_name, g_friends_silent, g_friends_ignore, g_friends_skip_ip, g_friends_confirm_subject, g_friends_default_mode, g_friends_default_autoadd, g_friends_msg, g_friends_msg_link, g_friends_latest_headers, g_friends_lang_auto, g_friends_pending_keep, g_friends_pending_max, g_friends_pending_vanish, g_friends_at_rcpt, g_friends_allow_spf, g_friends_spf_fail_bounce, g_friends_check_spf, g_friends_safer, g_friends_always, g_friends_add_trusted, g_friends_global_add, g_friends_global_exclude, g_friends_confirm_debug, g_friends_rotate, g_friends_long, g_friends_ignore_trusted, g_friends_url, g_friends_byemail, g_friends_bounce_second, g_friends_old_status_email, g_friends_spam_score, g_friends_status_sort, g_friends_release_wash, g_friends_debug1, g_imap_friends, g_quota_friends, g_spam_probe_friends, g_user_friends_domain_log_disable, g_user_friends_log_disable
Normally the default will work.
Syntax: friends_url string
Checks that the from header perfectly matches the authenticated user
Syntax: from_exact bool
Useful when migrating if you want email to go to another server while users can still login and read existing email on this server, the messages will be sent even if the user does not exist locally
Syntax: gateway_to string
Adds headers, the headers are added based on the 'from' domain of the message.
Syntax: header_add string
See also: user_status_send, user_send_max, send_helo, g_encrypt_reset_sender, g_from_rewrite_sender, g_footer_send, g_footer_sendonly, g_responder_sender, g_send_first_retry, g_send_helo, g_send_helo_from, g_send_helo_in, g_send_backoff, g_send_lines, g_send_nopoll, g_send_lowpriority, g_send_max, g_send_max_perchan, g_send_max_perdom, g_send_max_rcpt, g_send_nolimit, g_send_no_domain, g_send_onpopfetch, g_send_retry_552, g_send_rewrite, g_send_noskipslow, g_send_speed, g_send_conspeed, g_send_delay, g_send_timeout, g_send_tolimit, g_send_open_timeout, g_send_body_noretry, g_send_body_end_retry, g_send_body_once, g_send_store_disable, g_user_status_send, g_user_send_max, g_user_send_rule, g_user_send_warning, g_user_send_ip, g_user_send_white
When a user sends to 'bob@xx.your.domain.name' or 'bob@yy.your.domain.name' you need to have the alias host names 'xx.your.domain.name' etc, defined or the mail server will reject the message. Wild card's can be used for this setting. Example: host_alias "*.your.domain.name" This can also be used to accept mail directly to the servers ip address eg 'bob@123.4.5.'
Syntax: host_alias string
This setting allows folders to be shared between users. See g_imap_acl, Requires surgemail 3.9d or later!. e.g. imap_public name="INBOX" alias="lances_inbox" user="lance" users="*"
Syntax: imap_public name=string alias=string user=string subfolder=bool users=string group=string readonly=bool
Example: Share IMAP folders between users
See also: dmail_skip_imap, imap_public_show, old_imaphost, old_imaphost_always, old_imaphost_createuser_disable, old_imaphost_nodomain, old_imaphost_nodelete, old_imaphost_prefix, old_imaphost_file, old_imaphost_user, old_imaphost_pass, old_imaphost_lowercase, old_imaphost_skip, g_autologin_imap_disable, g_debug_imap, g_fix_imap_lf, g_imap_acl, g_imap_auto_create, g_imap_blacklist, g_imap_cram_enable, g_imap_capa, g_imap_capa_strip, g_imap_debug, g_imap_idle_free, g_imap_log_protocol, g_imap_log_flush, g_imap_log_copy, g_imap_log_header, g_imap_log_body, g_imap_port, g_imap_delay, g_imap_secure_port, g_imap_search_noattach, g_imap_spam_train, g_imap_status_cache, g_imap_no_internal_date, g_imap_throttle, g_imap_timezone, g_imap_timeout, g_imap_uidl_nofix, g_imap_unsub_auto, g_imap_size_fetch, g_imap_idle_nsf, g_imap_testing, g_imap_old, g_imap_old_ip, g_imap_pop_burst, g_imap_friends, g_imap_user_flags, g_imap_max_messages, g_safe_imap, g_old_imap_headbody, g_ssl_allow_imap, g_ssl_require_imap, g_stack_imap
This setting has no further documentation currently available
Syntax: imap_public_show bool
If the user has not yet selected a language then this language is used as a default. If the language specified here does not exist in the language files, or nothing is specified here then English is used as the default language.
Syntax: language_default string
By default users forwarding rules are applied before friends, spam and user filter rules. By default users can tick and option on their forwarding page to perform 'late' forwarding, that is forwarding that occurs after friends, spam and filtering. This option overrides the user option and causes domain users forwarding rules to be applied after friends, spam and filtering.
Syntax: late_forward bool
If ldap is enabled for the system (g_ldap_port) then this lets users of this domain lookup users in any domain not just this domain.
Syntax: ldap_anydomain bool
See also: ldap_disable, g_ldap_port, g_ldap_forward, g_ldap_outlook_browse_max
If ldap is enabled for this system, then this setting disables it for this specific domain
Syntax: ldap_disable bool
See also: ldap_anydomain, g_ldap_port, g_ldap_forward, g_ldap_outlook_browse_max
This setting has no further documentation currently available
Syntax: legal_archive_disable bool
This setting has no further documentation currently available
Syntax: legal_archive_hide bool
default is g_legal_archive_keep
Syntax: legal_archive_keep int
When set to "TRUE" this disables mailing list creation for this domain.
Syntax: list_disable bool
Set this to the maximum number of mailing lists to allow for this domain.
Syntax: list_max int
This is a quota of users/members for all lists in this domain. The maximum number of members in each list in this domain must total to less or equal to this setting.
eg:
list_max_users "100"
list_max "2"
In this scenario, 100 users could be used in 2 lists. So one list might have 80 users the other 20, but the combined total must be less than or equal to 100 users.
Syntax: list_max_users int
Disconnect user after this many bad password guesses.
Syntax: loginfails int
Looks up local authenticated smtp from addresses to check for relay is allowed flag (relay="true").
Syntax: lookup_relay_on_from bool
Specifies the root directory for users in this domain for their incoming mail messages and mail folders (for IMAP), maildir structure is used and hashing will also be applied so if you specify d:\spool, then 'bob's Email will appear in d:\spool\xx\yy\bob\mdir... where 'xx' and 'yy' are hashing numbers for that user. (Hashing is required to keep directory performance at a high level when you have millions of users).
Syntax: mailbox_path string
This is the manager's Email address for this domain. When users register themselves, if you have set create_user to the 'manager' method, an Email will be sent to this Email address to await confirmation of the user creation.
Syntax: manager_email string
Specifies the local users which have manager rights for this domain. These users can login to the user self management interface and will recieve special domain manager options. If you specify an account without the @domain part i.e. 'admin' it assumes admin@
Syntax: manager_username string
Sets the size of messages for this domain, note that this may affect the ehlo response but only for 'address' based virtual domains, so you must ensure your g_msg_max setting is sufficiently large. Also since this figure may be shown before the msg_max_out value is determined you must also make it larger than the msg_max_out value. We don't recommend using this setting unless it is totally necessary. It is better to choose a g_msg_max setting that all domains can live with.
Syntax: msg_max_in int
Sets the size of messages for this domain, as the email client may have already seen the value of g_msg_max or msg_max_in it may not help setting this value 'larger' than those other values. We do not recommend using this setting, it is best to choose a g_msg_max value that all domains can live with.
Syntax: msg_max_out int
The old_pophost settings will create a local account and download many mail in your inbox. However in the event that your old server also was an IMAP server you will be able to migrate your stored message folders using the old_imaphost setting. This download is only ever attempted once and does so asynchronously. A 300MB mailbox with 15000 messages will would be expected to take around 20 minutes. While IMAP folders are bing downloaded the mailbox can already be used. Note: the mail on the old server gets deleted.
Upon IMAP login an old_pophost check is also performed if defined. This is specifically so that WebMail accessing SurgeMail using IMAP (recommended configuration) will allow the retrieval of mail from old POP servers.
Syntax: old_imaphost string
This setting will force the download
of mail and folders from the old server upon each IMAP login. Note: that this
should only be used if specifically required as this will happen for example
each time that a WebMail change made.
Note: This will obviously stop
retrieving mail if the user changes their password in SurgeMail but not on
the old server.
Syntax: old_imaphost_always bool
If you have already got your users in your authentication database and do not wish to add new users logging in using intercept mode this setting can be used to prevent user creation upon first login to SurgeMail using POP.
Syntax: old_imaphost_createuser_disable bool
Specialist setting for one specific system, not for general use.
Syntax: old_imaphost_file string
Lowercase all migrated folders.
Syntax: old_imaphost_lowercase bool
This setting will leave mail on the old server just in case there are problems with the migration. Note: the use of this setting will disable the use of old_imaphost_always.
Syntax: old_imaphost_nodelete bool
This can be used if you are migrating from a server that uses username only (without domain) logins.
Syntax: old_imaphost_nodomain bool
Specialist fileIMAP migration based on file settings.
Syntax: old_imaphost_pass string
IMAP prefix for old imap server. eg. mail/.
Syntax: old_imaphost_prefix string
Comma seperate wild card list of migrate folders to skip past.
Syntax: old_imaphost_skip string
Specialist setting for one specific system, not for general use.
Syntax: old_imaphost_user string
This may create duplicates, you should only use it when the old server keeps the imap and pop inboxes as sepereate entities.
Syntax: old_inbox_both bool
Specifies an old POP host that can be used when migrating users from an old mailserver to a new mailserver. This will create a local accounts with a identical username/passwords and retrieve all mail from the old server for the old account when the user logs into SurgeMail for the first time and they are not yet in the SurgeMail user database. Mail on the old server is deleted.
The use of old_pophost adds an additional check (based on partial rcpt delivery - see g_badfrom_check) to user account self creation to prevent user creating accounts that clash with existing accounts that have not been popped on SurgeMail. This means that the old server should only accept delivery to actual accounts or all user account self creation will be disabled.
Syntax: old_pophost string
Suck mail from old_pophost on each
login (account information is not set at each login). This allows the user
to be using the new mail server and still retrieve mail from the old server
if mail is delivered there. This is useful in two cases:
1) if the user is already using SurgeMail but some mail is still delivered
to the old server due to delays in MX record propagation.
2) To allow incremental migration. Some users can be using the SurgeMail and
some users can be using the old server. Users still on the old server sending
mail to users on SurgeMail would deliver to the old server. When a user on
SurgeMail logs into SurgeMail any such mail is retrieved from the old server.
Note: This will obviously stop
retrieving mail if the user changes their password in SurgeMail but not on
the old server.
Syntax: old_pophost_always bool
This binds to the specified local port during a migration
Syntax: old_pophost_bind string
If you have already got your user in your authentication database and do not wish to setup this setting can be used to prevent user creation upon first login to SurgeMail using POP.
Syntax: old_pophost_createuser_disable bool
This skips the imap migration of the inbox, IF the user logs in via POP, and instead uses pop to migrate the inbox. This means it can maintain the uidl's correctly
Syntax: old_pophost_inbox bool
This setting will leave mail on the old server just in case there are problems with the migration. Note: the use of this setting will disable the use of old_pophost_always.
Syntax: old_pophost_nodelete bool
This can be used if you are migrating from a server that uses username only (without domain) logins.
Syntax: old_pophost_nodomain bool
Seperater, default is '@'. e.g. some systems use %
Note: The old_pophost_iffirst and old_pophost_makeuser have now been replaced by the more consistent old_pophost_createuser_disable setting.
Syntax: old_pophost_sep string
SMTP host to check for existing users (when creating new accounts).
Syntax: old_smtphost string
Who to skip old_smtphost checks for. Valid values are "admin" and "domadmin".
Syntax: old_smtphost_skip string
Only valid if the old server is also running surgemail. And requires old_pophost settings to work
Syntax: old_xfile bool
This setting confuses some clients, and results in the user having to login again. The error is not always shown to the end user by some dumb email clients
Syntax: pop_min_time int
This is the string displayed to the user when they connect to this domain before they login. The same string is also used in IMAP response. See also smtp_welcome.
Syntax: pop_welcome string
This prefix is used in the user database to distinguish these virtual domain users. This setting is for backward compatibility and not generally recommended. It is better to store user@domain.name in the userdatabase rather than just 'username'.
Syntax: prefix string
This setting causes the domain name to be stripped from user login names when talking to the proxy POP host. This does not apply to surgewall, see surgewall_options for details
Syntax: proxy_pop_nodomain bool