<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Settings Archives - SurgeMail</title>
	<atom:link href="https://surgemail.com/article-categories/settings/feed/" rel="self" type="application/rss+xml" />
	<link>https://surgemail.com/article-categories/settings/</link>
	<description>Windows/Linux Mail Server Software</description>
	<lastBuildDate>Wed, 08 Feb 2023 02:34:54 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.4</generator>

<image>
	<url>https://surgemail.com/wp-content/uploads/2019/11/cropped-robot_80-32x32.png</url>
	<title>Settings Archives - SurgeMail</title>
	<link>https://surgemail.com/article-categories/settings/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Back Scatter (Backscatter)</title>
		<link>https://surgemail.com/knowledge-base/back-scatter/</link>
		
		<dc:creator><![CDATA[chrisp]]></dc:creator>
		<pubDate>Sun, 04 Jul 2021 23:53:12 +0000</pubDate>
				<guid isPermaLink="false">https://surgemail.com/?post_type=ht_kb&#038;p=4586</guid>

					<description><![CDATA[<p>There are many situations where apparently harmless back scatter (bounces from incoming email) can cause your server to be blacklisted. To minimize the chances of this please do the following Use the config checker and apply the recommended settings Make sure you have g_friends_safer "true" Make sure you ahve g_responder_safer "true" In addition you should<br /><a class="moretag" href="https://surgemail.com/knowledge-base/back-scatter/">+ Read More</a></p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/back-scatter/">Back Scatter (Backscatter)</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>There are many situations where apparently harmless back scatter (bounces from incoming email) can cause your server to be blacklisted. To minimize the chances of this please do the following</p>



<ol class="wp-block-list" id="block-7e4615d9-ad21-4d34-8bfe-1fb9705c31d3"><li>Use the config checker and apply the recommended settings</li><li>Make sure you have g_friends_safer "true"</li><li>Make sure you ahve g_responder_safer "true"</li></ol>



<p id="block-f2d99052-f204-4149-9c79-9ed46468c722">In addition you should consider banning forwarding settings to problem domains, e.g.<br>forward_illegal to="*@gmail.com" apply="user"</p>



<p id="block-11d07494-830e-429f-a1cf-502a04b67611">This rule prevents users adding a forwarding rule to a gmail account. You might do this if gmail is seeing incoming forwarded spam from your server and blacklisting it.</p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/back-scatter/">Back Scatter (Backscatter)</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Domain defaults</title>
		<link>https://surgemail.com/knowledge-base/domain-defaults/</link>
		
		<dc:creator><![CDATA[chrisp]]></dc:creator>
		<pubDate>Mon, 17 May 2021 21:55:02 +0000</pubDate>
				<guid isPermaLink="false">https://surgemail.com/?post_type=ht_kb&#038;p=4272</guid>

					<description><![CDATA[<p>When you create a new domain the defaults are taken from a config file domain_defaults.txt which must be in the 'web' folder. This file contains only basic settings in the form: &#60;setting_name>&#60;space>&#60;setting_value> e.g. quota_default 100mbssl_require_login true</p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/domain-defaults/">Domain defaults</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>When you create a new domain the defaults are taken from a config file domain_defaults.txt which must be in the 'web' folder.</p>



<p>This file contains only basic settings in the form:</p>



<p>&lt;setting_name>&lt;space>&lt;setting_value></p>



<p>e.g.</p>



<p>quota_default 100mb<br>ssl_require_login true</p>



<p></p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/domain-defaults/">Domain defaults</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Oauth 2.0 support</title>
		<link>https://surgemail.com/knowledge-base/oauth/</link>
		
		<dc:creator><![CDATA[chrisp]]></dc:creator>
		<pubDate>Thu, 13 May 2021 22:18:12 +0000</pubDate>
				<guid isPermaLink="false">https://surgemail.com/?post_type=ht_kb&#038;p=4265</guid>

					<description><![CDATA[<p>You will need the following settings: g_oauth_client_id "idcode" g_oauth_client_secret "secretcode" g_oauth_trim "true" - Trim @domain.name from user before lookup g_oauth_url "http://your.oauth.endpoint/oauth.php" g_authent_lookup "true" - If set then oauth is used as password check as well as account existence. With the above settings surgemail will use nwauth to store most details about user accounts, but will<br /><a class="moretag" href="https://surgemail.com/knowledge-base/oauth/">+ Read More</a></p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/oauth/">Oauth 2.0 support</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>You will need the following settings: </p>



<p>g_oauth_client_id "idcode" </p>



<p>g_oauth_client_secret "secretcode" </p>



<p>g_oauth_trim "true"  - Trim @domain.name from user before lookup</p>



<p>g_oauth_url "http://your.oauth.endpoint/oauth.php" 
</p>



<p>g_authent_lookup "true"  - If set then oauth is used as password check as well as account existence.  </p>



<p>With the above settings surgemail will use nwauth to store most details about user accounts, but will check for existence, and passwords with the oauth server.</p>



<p></p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/oauth/">Oauth 2.0 support</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SMS Twilio Gateway</title>
		<link>https://surgemail.com/knowledge-base/sms/</link>
		
		<dc:creator><![CDATA[chrisp]]></dc:creator>
		<pubDate>Fri, 23 Apr 2021 01:55:56 +0000</pubDate>
				<guid isPermaLink="false">https://surgemail.com/?post_type=ht_kb&#038;p=4094</guid>

					<description><![CDATA[<p>By simply creating a Twilio account and adding the necessary details into surgemail.ini you can instantly get SMS Notification and Password recovery features. This lets users send themselves notification's based on incoming email messages that match certain criteria. And use SMS for password recovery if they forget their login details. A free Twilio trial account<br /><a class="moretag" href="https://surgemail.com/knowledge-base/sms/">+ Read More</a></p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/sms/">SMS Twilio Gateway</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>By simply creating a Twilio account and adding the necessary details into surgemail.ini you can instantly get SMS Notification and Password recovery features. This lets users send themselves notification's based on incoming email messages that match certain criteria.  And use SMS for password recovery if they forget their login details. A free Twilio trial account can even be used to test this with.  </p>



<h3 class="wp-block-heading">Create a Twilio account</h3>



<p class="has-text-align-center"><a href="http://www.twilio.com/referral/IyV7Sz" data-type="URL" data-id="www.twilio.com/referral/IyV7Sz">https://www.twilio.com/try-twilio</a></p>



<p>(Note the above link is a referral link).</p>



<h3 class="wp-block-heading">Copy your SID, Token and Phone number.</h3>



<p>Login to your Twilio console, on the dashboard you will find:</p>



<div class="wp-block-group has-pale-cyan-blue-background-color has-background"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<p>Account SID:  xxxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>



<p>Auth Token: xxxxxxxxxxxxxxxxxxxxxxxxxx</p>
</div></div>



<p>And if you go to the phone numbers tab, you should have a phone number, if not you will need to add one:</p>



<div class="wp-block-group has-pale-cyan-blue-background-color has-background"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<p>Phone Number +1xxxxxxxxxx</p>
</div></div>



<p>Copy these three things into your surgemail.ini settings:</p>



<div class="wp-block-group has-vivid-green-cyan-background-color has-background"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<pre class="wp-block-preformatted"><code>g_twilio_from "+13xxxxxxx"</code>
<code>g_twilio_sid "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"</code>
<code>g_twilio_token "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"</code></pre>



<p></p>
</div></div>



<h3 class="wp-block-heading">Test the SMS gateway is working</h3>



<p>tellmail sms_test +1nnnnnnnnn (your cell phone number)</p>



<p>Within 30 seconds you should get a test message.  </p>



<h3 class="wp-block-heading">Configure your personal phone number</h3>



<p>Lookup your account, click on 'password' and configure your SMS number, or in the admin console just fill in the 'sms_to' setting, be sure to specify your full phone number including + and international code, e.g. for U.S. numbers +1.... for New Zealand it would be +64....</p>



<p class="has-text-align-center">https//your.server/cgi/user.cgi</p>



<h3 class="wp-block-heading">Test the SurgeWeb forgot link</h3>



<p>Now if you go to surgeweb login and press 'forgot' you should be able to use an SMS confirmation to reset your password:</p>



<p class="has-text-align-center">http://your.server/surgeweb</p>



<h3 class="wp-block-heading">Add SMS notification rules</h3>



<p>First add user_sms "true" to each domain:</p>



<p class="has-text-align-center"><strong>user_sms "true"</strong></p>



<p>Lookup your account, go to the 'sms' config page, and add a rule.</p>



<p class="has-text-align-center"><strong>if Subject contains Urgent </strong></p>



<p>Now send yourself an email with the subject "Urgent issue". It should arrive on your phone. </p>



<h3 class="wp-block-heading">Configure a quota rule</h3>



<p>Add a default number of messages per user per day, this is a domain level setting so will need to be added to each domain:</p>



<p class="has-text-align-center"><strong>user_sms_quota initial="10" period="24"</strong></p>



<p>Typically SMS messages cost about 1 cent, so factor this into your cost structure to decide what sort of limits you need.  This limit only applies to the notify feature.  Password resets do not count against the users SMS quota.</p>



<p></p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/sms/">SMS Twilio Gateway</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>All Domain Settings</title>
		<link>https://surgemail.com/knowledge-base/alldomain/</link>
		
		<dc:creator><![CDATA[chrisp]]></dc:creator>
		<pubDate>Mon, 12 Apr 2021 03:26:21 +0000</pubDate>
				<guid isPermaLink="false">https://surgemail.com/?post_type=ht_kb&#038;p=4007</guid>

					<description><![CDATA[<p>class Define class of user for following commands to apply to hidden Syntax: class type=string from=string users=string groups=string name=string comment Management notes and comments about the domain 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<br /><a class="moretag" href="https://surgemail.com/knowledge-base/alldomain/">+ Read More</a></p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/alldomain/">All Domain Settings</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading" id="class">class</h3>



<p><strong>Define class of user for following commands to apply to</strong></p>



<p>hidden</p>



<p>Syntax: class type=string from=string users=string groups=string name=string</p>



<h3 class="wp-block-heading" id="comment">comment</h3>



<p><strong>Management notes and comments about the domain</strong></p>



<p>This is a dummy setting that lets you store information in the ini file that will survive setting changes from the web admin tool.</p>



<p>Syntax: comment date=string name=string comment=string</p>



<h3 class="wp-block-heading" id="abook">abook</h3>



<p><strong>Define surgeweb shared address books for this domain</strong></p>



<p>The read/write fields should be a list of valid usergroups or * for all users</p>



<p>Syntax: abook name=string read=string write=string type=string</p>



<h3 class="wp-block-heading" id="alias_file">alias_file</h3>



<p><strong>Alias file</strong></p>



<p>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:</p>



<pre class="wp-block-preformatted">username:&nbsp;&nbsp; destination
bob:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fred@domain.com
joe:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; joesmith</pre>



<p>This file only exists for backward compatibility.</p>



<p>Syntax: alias_file string</p>



<h3 class="wp-block-heading" id="alias_max">alias_max</h3>



<p><strong>Maximum number of aliases for this domain</strong></p>



<p>Limits the ..total number of aliases allowed in this domain to the value specified.</p>



<p>Syntax: alias_max int</p>



<h3 class="wp-block-heading" id="access_group_default">access_group_default</h3>



<p><strong>Default group to place users in</strong></p>



<p>Specifies the default g_access_group to place users in this domain into.</p>



<p>Syntax: access_group_default string</p>



<h3 class="wp-block-heading" id="admin_access_default">admin_access_default</h3>



<p><strong>Default features granted to domain admins in this domain</strong></p>



<p>This setting allows you to specify default access to certain SurgeMail features. It is specified in the same maner as the&nbsp;<a href="global.htm#g_admin_access">g_admin_access</a>&nbsp;settings ‘access’ parameter. eg:</p>



<p>admin_access_default “all,!users,!reports”</p>



<p>Syntax: admin_access_default string</p>



<h3 class="wp-block-heading" id="assume_created_epoch">assume_created_epoch</h3>



<p><strong>If user has no ‘created’ field assume they were created an arbitrarily large time in the past</strong></p>



<p>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.</p>



<p>Syntax: assume_created_epoch bool</p>



<h3 class="wp-block-heading" id="blogs_max_per_user">blogs_max_per_user</h3>



<p><strong>Number of blogs each account can create</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: blogs_max_per_user int</p>



<p>Example: blogs_max_per_user 10</p>



<h3 class="wp-block-heading" id="broad_sync">broad_sync</h3>



<p><strong>Broadsoft Sync Enable</strong></p>



<p>Customer specific feature</p>



<p>Syntax: broad_sync bool</p>



<h3 class="wp-block-heading" id="encrypt_rule">encrypt_rule</h3>



<p><strong>Default if no domain level rule</strong></p>



<p>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.</p>



<p>Syntax: encrypt_rule header=string contains=string from=string to=string noconfirm=bool method=string</p>



<h3 class="wp-block-heading" id="encrypt_subject">encrypt_subject</h3>



<p><strong>Subject when encrypted message sent – default is original subject</strong></p>



<p>Not yet implemented</p>



<p>Syntax: encrypt_subject string</p>



<h3 class="wp-block-heading" id="encrypt_limit">encrypt_limit</h3>



<p><strong>Max encrypted msgs per user per day</strong></p>



<p>Per user limit per day, (used to be per hour)</p>



<p>Syntax: encrypt_limit int</p>



<h3 class="wp-block-heading" id="encrypt_limitsz">encrypt_limitsz</h3>



<p><strong>Max size of encrypted msgs per user per day</strong></p>



<p>Per user dayly limit, e.g. 10mb</p>



<p>Syntax: encrypt_limitsz int</p>



<h3 class="wp-block-heading" id="encrypt_token">encrypt_token</h3>



<p><strong>This setting is not used, instead use smart and ifnew settings</strong></p>



<p>This feature is not controlled by this setting, it’s part of the smart features and controlled by the surgeweb options if enabled, instead set encrypt_ifnew and encrypt_smart</p>



<p>Syntax: encrypt_token bool</p>



<h3 class="wp-block-heading" id="encrypt_smart">encrypt_smart</h3>



<p><strong>Encrypt smart features enabled for this domain</strong></p>



<p>Not for general use</p>



<p>Syntax: encrypt_smart bool</p>



<h3 class="wp-block-heading" id="encrypt_noconfirm">encrypt_noconfirm</h3>



<p><strong>Disable confirmation for encrypted messages</strong></p>



<p>Disables the automatic confirm reading message</p>



<p>Syntax: encrypt_noconfirm bool</p>



<h3 class="wp-block-heading" id="encrypt_ifnew">encrypt_ifnew</h3>



<p><strong>Allow surgeweb ifnew options</strong></p>



<p>Not for general use</p>



<p>Syntax: encrypt_ifnew bool</p>



<h3 class="wp-block-heading" id="encrypt_surgeweb_hide">encrypt_surgeweb_hide</h3>



<p><strong>Hide lock icon on surgeweb</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: encrypt_surgeweb_hide bool</p>



<h3 class="wp-block-heading" id="fallback">fallback</h3>



<p><strong>Fallback Email address or account</strong></p>



<p>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).</p>



<p>Syntax: fallback string</p>



<h3 class="wp-block-heading" id="fallback_relay">fallback_relay</h3>



<p><strong>Fallback host to relay non existent accounts to</strong></p>



<p>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&nbsp;<a href="migration.htm#parallel">several options</a>&nbsp;to make this work using servers that only accept mail if they can do a reverse lookup.</p>



<p>Syntax: fallback_relay string</p>



<h3 class="wp-block-heading" id="fallback_mx">fallback_mx</h3>



<p><strong>Use mx lookup to find ip address for fallback_relay setting</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: fallback_mx bool</p>



<h3 class="wp-block-heading" id="fallback_users">fallback_users</h3>



<p><strong>Path to file listing all users to user fallback_relay for</strong></p>



<p>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</p>



<p>Syntax: fallback_users string</p>



<h3 class="wp-block-heading" id="fallback_check">fallback_check</h3>



<p><strong>Fallback check</strong></p>



<p>Check if user exists on fallback relay host before accepting it.</p>



<p>Syntax: fallback_check bool</p>



<h3 class="wp-block-heading" id="fallback_always">fallback_always</h3>



<p><strong>Also relay to old system even if user does exist – not recommended</strong></p>



<p>This setting can be used when bringing up a new system if you want to be able to backout. It is not recommended</p>



<p>Syntax: fallback_always bool</p>



<h3 class="wp-block-heading" id="fallback_force">fallback_force</h3>



<p><strong>Use fallback even if user does exist as migration not started yet</strong></p>



<p>Use fallback address even if user does exist. Useful before migration occurs.</p>



<p>Syntax: fallback_force bool</p>



<h3 class="wp-block-heading" id="fallback_domain">fallback_domain</h3>



<p><strong>Fallback domain, rcpt is rewritten @ this domain name</strong></p>



<p>Use fallback address even if user does exist. Useful before migration occurs.</p>



<p>Syntax: fallback_domain string</p>



<h3 class="wp-block-heading" id="friends_at_rcpt">friends_at_rcpt</h3>



<p><strong>Whether to check users friends list at rcpt stage</strong></p>



<p>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.</p>



<p>Syntax: friends_at_rcpt bool</p>



<h3 class="wp-block-heading" id="friends_pending_name">friends_pending_name</h3>



<p><strong>The imap name of the friends_pending folder default is ‘Friends Pending’</strong></p>



<p>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</p>



<p>Syntax: friends_pending_name string</p>



<h3 class="wp-block-heading" id="friends_url">friends_url</h3>



<p><strong>Specify full url for friends release http://domain.name:port domain specific setting</strong></p>



<p>Normally the default will work.</p>



<p>Syntax: friends_url string</p>



<h3 class="wp-block-heading" id="status_url">status_url</h3>



<p><strong>Specify full url for status message e.g. http://domain.name:port domain specific setting</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: status_url string</p>



<h3 class="wp-block-heading" id="from_exact">from_exact</h3>



<p><strong>Check from matches authenticated user</strong></p>



<p>Checks that the from header perfectly matches the authenticated user</p>



<p>Syntax: from_exact bool</p>



<h3 class="wp-block-heading" id="centipaid">centipaid</h3>



<p><strong>see&nbsp;</strong></p>



<p>Specifies accounts that can charge for incoming email.</p>



<p>Syntax: centipaid match=string acct=string pass=string https=string lang=string amount=int enabled=bool friends=bool smite=int</p>



<h3 class="wp-block-heading" id="create_block">create_block</h3>



<p><strong>Block new users from this IP</strong></p>



<p>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.&nbsp;</p>



<p>Syntax: create_block string</p>



<h3 class="wp-block-heading" id="create_user">create_user</h3>



<p><strong>Method for adding new users</strong></p>



<p>Can be one of:</p>



<figure class="wp-block-table"><table><tbody><tr><td><strong>Value</strong></td><td><strong>Description</strong></td></tr><tr><td>open</td><td>Anyone can create an account immediately providing name and password. Be sure to set create_max “3” to prevent spammers creating dozens of accounts.</td></tr><tr><td>email</td><td>Anyone can create an account providing existing email address.</td></tr><tr><td>manager</td><td>Manager approves account, user provides existing email address.</td></tr><tr><td>manager_new</td><td>Manager activates account, user proves name and password.</td></tr><tr><td>disabled</td><td>Users cannot signup, accounts are created by the Web Admin.</td></tr></tbody></table></figure>



<p>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.</p>



<p>Syntax: create_user string</p>



<h3 class="wp-block-heading" id="create_cleanup">create_cleanup</h3>



<p><strong>Cleanup existing data before adding a user</strong></p>



<p>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.</p>



<p>Syntax: create_cleanup bool</p>



<h3 class="wp-block-heading" id="create_max">create_max</h3>



<p><strong>Maximum signups from one IP in a day</strong></p>



<p>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.&nbsp;</p>



<p>Syntax: create_max int</p>



<h3 class="wp-block-heading" id="create_subdomain">create_subdomain</h3>



<p><strong>Allows users to create an account that belongs to it’s own unique domain.</strong></p>



<p>If true this allows users to create accounts with a unique subdomain i.e. firstname@lastname.domain. SurgeMail uses the&nbsp;<a href="domains.htm#domuser">domuser system</a>&nbsp;to handle sub-doamin users. Wildcard&nbsp;<a href="domains.htm#dns">MX records</a>&nbsp;are required to ensure delivery to subdomain users.</p>



<p>Syntax: create_subdomain bool</p>



<h3 class="wp-block-heading" id="create_reqd">create_reqd</h3>



<p><strong>Required fields for new users</strong></p>



<p>A comma separated list of field names. Allowable field names are the “field” value(s) of the g_authent_info setting.</p>



<p>For example, if your setting is:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name,phone<br>then when a new user is created they will be forced to fill in the name and phone fields in the registration form.</p>



<p><strong>NOTE:&nbsp;</strong>A g_authent_info setting is required to make the field appear on the signup page, eg.</p>



<p>g_authent_info name=”Phone” field=”phone” access=”user” default=””</p>



<p>the above setting causes a field for phone to appear on the signup page and in the user details page.</p>



<p>Syntax: create_reqd string</p>



<h3 class="wp-block-heading" id="create_tpl_dir">create_tpl_dir</h3>



<p><strong>Relative path to user create pages</strong></p>



<p>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.</p>



<p>For example, if your setting is:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; otherdomain/</p>



<p>Then you would:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cd /surgemail/web<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mkdir otherdomain<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; copy na_*.htm otherdomain<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CD otherdomain<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; notepad na_login.htm</p>



<p>Syntax: create_tpl_dir string</p>



<h3 class="wp-block-heading" id="create_repass">create_repass</h3>



<p><strong>User enters password twice on creation</strong></p>



<p>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.</p>



<p>Syntax: create_repass bool</p>



<h3 class="wp-block-heading" id="create_disable_days">create_disable_days</h3>



<p><strong>Number of days new accounts remain active for</strong></p>



<p>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.</p>



<p>Syntax: create_disable_days int</p>



<h3 class="wp-block-heading" id="create_delete_days">create_delete_days</h3>



<p><strong>Number of days a disabled new account remains before deletion</strong></p>



<p>Accounts disabled with create_disable_days remain until the specified number of days at which point they are deleted.</p>



<p>Syntax: create_delete_days int</p>



<h3 class="wp-block-heading" id="create_linkto">create_linkto</h3>



<p><strong>Link to redirect to after successful live account creation</strong></p>



<p>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)</p>



<p>Syntax: create_linkto string</p>



<h3 class="wp-block-heading" id="create_image">create_image</h3>



<p><strong>Use verification image on signups</strong></p>



<p>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</p>



<p>Syntax: create_image bool</p>



<h3 class="wp-block-heading" id="dmail_deliver">dmail_deliver</h3>



<p><strong>Deliver messages into dmail drop directories (not supported)</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: dmail_deliver bool</p>



<h3 class="wp-block-heading" id="dmail_drop_path">dmail_drop_path</h3>



<p><strong>Path for drop files to automatically convert</strong></p>



<p>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.</p>



<p>Syntax: dmail_drop_path string</p>



<h3 class="wp-block-heading" id="dmail_drop_prefix">dmail_drop_prefix</h3>



<p><strong>Whether prefix is used on dmail drop files</strong></p>



<p>Prefix on dmail drop files for dmail_drop_path conversion.</p>



<p>Syntax: dmail_drop_prefix bool</p>



<h3 class="wp-block-heading" id="dmail_bin_path">dmail_bin_path</h3>



<p><strong>Path for DMail bin files to automatically convert</strong></p>



<p>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.</p>



<p>Syntax: dmail_bin_path string</p>



<h3 class="wp-block-heading" id="dmail_hash">dmail_hash</h3>



<p><strong>Hashing scheme used by dmail_drop_path and dmail_bin_path</strong></p>



<p>DMail style hashing scheme used by dmail_drop_path and dmail_bin_path.</p>



<p>Syntax: dmail_hash string</p>



<h3 class="wp-block-heading" id="dmail_skip_imap">dmail_skip_imap</h3>



<p><strong>Skip conversion of old imap *.mbx folders</strong></p>



<p>This setting is usually not needed</p>



<p>Syntax: dmail_skip_imap bool</p>



<h3 class="wp-block-heading" id="disable_smtp_after">disable_smtp_after</h3>



<p><strong>Number of days an account can remain unread before delivery is disabled</strong></p>



<p>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.</p>



<p>Syntax: disable_smtp_after int</p>



<h3 class="wp-block-heading" id="delete_user_after">delete_user_after</h3>



<p><strong>Number of days an account can remain unread before it is deleted</strong></p>



<p>DO NOT USE THIS SETTING IN A MIRROR/CLUSTER SETUP</p>



<p>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&nbsp;<a href="#prefix">prefix</a>&nbsp;setting.</p>



<p>Syntax: delete_user_after int</p>



<h3 class="wp-block-heading" id="enotify_from">enotify_from</h3>



<p><strong>From address to use in email notification messages</strong></p>



<p>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.</p>



<p>Syntax: enotify_from string</p>



<h3 class="wp-block-heading" id="expire_age">expire_age</h3>



<p><strong>Expire undeleted mail older than specified age left in INBOX</strong></p>



<p>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.&nbsp;</p>



<p>Currently expire ONLY affects ‘newmail’ ie: mail that is waiting to be read not mail stored in IMAP folders.</p>



<p>Syntax: expire_age int</p>



<h3 class="wp-block-heading" id="expire_size">expire_size</h3>



<p><strong>Expire undeleted mail larger than specified size (units=bytes)</strong></p>



<p>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.</p>



<p>Syntax: expire_size int</p>



<h3 class="wp-block-heading" id="expire_rule">expire_rule</h3>



<p><strong>Expire rules for specific folders</strong></p>



<p>These rules let you specify and expire rule for any folder. The folder match is not case sensitive</p>



<p>e.g. to delete all spam message over 30 days old and larger than 3k and to empty the trash can each day.</p>



<p>expire_rule folder=”Spam” age=”30″ size=”3k”<br>expire_rule folder=”Trash” age=”1″</p>



<p>You can use wild cards, e.g. Delete all messages over 90 days old larger than 10k unless in the new or archive* folders.</p>



<p>expire_rule folder=”*,!new,!archive*” age=”90″ size=”10k”&nbsp;</p>



<p>Syntax: expire_rule folder=string age=int size=int alert=bool</p>



<h3 class="wp-block-heading" id="footer_file">footer_file</h3>



<p><strong>Footer file for plain text messages</strong></p>



<p>Footer file for all plain text messages ‘from’ this domain based on from address.</p>



<p>Syntax: footer_file string</p>



<h3 class="wp-block-heading" id="footer_html">footer_html</h3>



<p><strong>Text footer file</strong></p>



<p>Footer file for all HTML messages ‘from’ this domain based on from address.</p>



<p>Syntax: footer_html string</p>



<h3 class="wp-block-heading" id="forward_illegal">forward_illegal</h3>



<p><strong>Prevents users setting forward rules to certain addresses</strong></p>



<p>Syntax: g_forward_illegal to=”address” apply=”user type “</p>



<p>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.&nbsp;These rules _ONLY_ apply to non local domains.</p>



<p>Some examples:</p>



<p>If you want to stop your users setting up forward rules that redirect to aol.com.<br>g_forward_illegal to=”*@aol.com” apply=”user”</p>



<p>If you want to stop your users setting a forward to all domains except aol.com<br>g_forward_illegal to=”*,!*@aol.com” apply=”user”</p>



<p>Stop domain admins sending to aol.com<br>g_forward_illegal to=”*@aol.com” apply=”domadmin”</p>



<p>Stop admins sending to netwinsite.com<br>g_forward_illegal to=”*@netwinsite.com” apply=”admin”</p>



<p>Syntax: forward_illegal to=string apply=string</p>



<h3 class="wp-block-heading" id="gateway_to">gateway_to</h3>



<p><strong>Send all email to another server</strong></p>



<p>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</p>



<p>Syntax: gateway_to string</p>



<h3 class="wp-block-heading" id="header_add">header_add</h3>



<p><strong>Add header to posts ‘from’ this domain</strong></p>



<p>Adds headers, the headers are added based on the ‘from’ domain of the message.</p>



<p>Syntax: header_add string</p>



<h3 class="wp-block-heading" id="host_alias">host_alias</h3>



<p><strong>Alias name(s) for this virtual domain</strong></p>



<p>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”&nbsp; This can also be used to accept mail directly to the servers ip address eg ‘bob@123.4.5.’</p>



<p>Syntax: host_alias string</p>



<h3 class="wp-block-heading" id="ssl_wildcard">ssl_wildcard</h3>



<p><strong>Use if your ssl certificate accepts wildcards, e.g. *.my.domain</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: ssl_wildcard string</p>



<h3 class="wp-block-heading" id="imap_public">imap_public</h3>



<p><strong>Share IMAP folders between users</strong></p>



<p>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=”*”</p>



<p>Syntax: imap_public name=string alias=string user=string subfolder=bool users=string group=string readonly=bool</p>



<p>Also the global setting g_imap_acl must be enabled “True”</p>



<h3 class="wp-block-heading" id="imap_public_show">imap_public_show</h3>



<p><strong>Auto subscribe public folders</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: imap_public_show bool</p>



<h3 class="wp-block-heading" id="imap_max_sync">imap_max_sync</h3>



<p><strong>Limit remote imap sync to this many items (not recommended)</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: imap_max_sync int</p>



<h3 class="wp-block-heading" id="inbox_archive">inbox_archive</h3>



<p><strong>Archive old messages to Archives/yyyy/INBOX folder, age in days</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: inbox_archive int</p>



<h3 class="wp-block-heading" id="sent_archive">sent_archive</h3>



<p><strong>Archive old messages to Archives/yyyy/Sent folder, age in days</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: sent_archive int</p>



<h3 class="wp-block-heading" id="late_forward">late_forward</h3>



<p><strong>Apply domain users forwarding rules after friends, spam, and filtering</strong></p>



<p>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.</p>



<p>Syntax: late_forward bool</p>



<h3 class="wp-block-heading" id="ldap_disable">ldap_disable</h3>



<p><strong>Stops ldap logins by users of this domain</strong></p>



<p>If ldap is enabled for this system, then this setting disables it for this specific domain</p>



<p>Syntax: ldap_disable bool</p>



<h3 class="wp-block-heading" id="ldap_anydomain">ldap_anydomain</h3>



<p><strong>Lets users search other than their own domain in ldap</strong></p>



<p>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.</p>



<p>Syntax: ldap_anydomain bool</p>



<h3 class="wp-block-heading" id="loginfails">loginfails</h3>



<p><strong>Disconnect after failed logins</strong></p>



<p>Disconnect user after this many bad password guesses.</p>



<p>Syntax: loginfails int</p>



<h3 class="wp-block-heading" id="lookup_relay_on_from">lookup_relay_on_from</h3>



<p><strong>Lookup from addresses for relay allowed</strong></p>



<p>Looks up local authenticated smtp from addresses to check for relay is allowed flag (relay=”true”).</p>



<p>Syntax: lookup_relay_on_from bool</p>



<h3 class="wp-block-heading" id="list_max">list_max</h3>



<p><strong>Maximum number of mailing lists for this domain</strong></p>



<p>Set this to the maximum number of mailing lists to allow for this domain.</p>



<p>Syntax: list_max int</p>



<h3 class="wp-block-heading" id="list_disable">list_disable</h3>



<p><strong>Disables creation of mailing lists</strong></p>



<p>When set to “TRUE” this disables mailing list creation for this domain.</p>



<p>Syntax: list_disable bool</p>



<h3 class="wp-block-heading" id="list_max_users">list_max_users</h3>



<p><strong>Maximum number of users allowed in all lists in this domain</strong></p>



<p>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.</p>



<p>eg:<br>list_max_users “100”<br>list_max “2”</p>



<p>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.</p>



<p>Syntax: list_max_users int</p>



<h3 class="wp-block-heading" id="language_default">language_default</h3>



<p><strong>Default language for user web interface</strong></p>



<p>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.</p>



<p>Syntax: language_default string</p>



<h3 class="wp-block-heading" id="manager_email">manager_email</h3>



<p><strong>Managers Email</strong></p>



<p>This is the manager’s Email address for this domain.&nbsp; 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.</p>



<p>Syntax: manager_email string</p>



<h3 class="wp-block-heading" id="manager_username">manager_username</h3>



<p><strong>Domain managers username (for web based domain administration)</strong></p>



<p>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@.</p>



<p>Syntax: manager_username string</p>



<h3 class="wp-block-heading" id="manager_anyuser">manager_anyuser</h3>



<p><strong>Allow first domain admin to login to any users account</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: manager_anyuser bool</p>



<h3 class="wp-block-heading" id="mailbox_path">mailbox_path</h3>



<p><strong>Path to mailbox maildir (inbox) files</strong></p>



<p>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).&nbsp;</p>



<p>Syntax: mailbox_path string</p>



<h3 class="wp-block-heading" id="legal_archive_disable">legal_archive_disable</h3>



<p><strong>Disable legal archive for this domain (experimental)</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: legal_archive_disable bool</p>



<h3 class="wp-block-heading" id="legal_archive_hide">legal_archive_hide</h3>



<p><strong>Hide legal archive for this domain (experimental)</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: legal_archive_hide bool</p>



<h3 class="wp-block-heading" id="legal_archive_keep">legal_archive_keep</h3>



<p><strong>Days to keep legal archive, units=days unless you specify years or months</strong></p>



<p>default is g_legal_archive_keep</p>



<p>Syntax: legal_archive_keep int</p>



<h3 class="wp-block-heading" id="legal_archive_admin">legal_archive_admin</h3>



<p><strong>Enable archive searching for domain admins</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: legal_archive_admin bool</p>



<h3 class="wp-block-heading" id="old_pophost">old_pophost</h3>



<p><strong>Old pop host for pop intercept mode based migration</strong></p>



<p>Specifies an old POP host that can be used when&nbsp;<a href="migration.htm">migrating</a>&nbsp;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.</p>



<p>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.</p>



<p>Syntax: old_pophost string</p>



<h3 class="wp-block-heading" id="old_pophost_always">old_pophost_always</h3>



<p><strong>Always attempt to suck mail on each login</strong></p>



<p>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:<br>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.<br>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.</p>



<p>Note: This will obviously stop retrieving mail if the user changes their password in SurgeMail but not on the old server.</p>



<p>Syntax: old_pophost_always bool</p>



<h3 class="wp-block-heading" id="old_pophost_createuser_disable">old_pophost_createuser_disable</h3>



<p><strong>Disable user creation in database on login</strong></p>



<p>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.</p>



<p>Syntax: old_pophost_createuser_disable bool</p>



<h3 class="wp-block-heading" id="old_pophost_nodomain">old_pophost_nodomain</h3>



<p><strong>Strip domain when logging in to old_pophost</strong></p>



<p>This can be used if you are migrating from a server that uses username only (without domain) logins.</p>



<p>Syntax: old_pophost_nodomain bool</p>



<h3 class="wp-block-heading" id="old_pophost_nodelete">old_pophost_nodelete</h3>



<p><strong>Leave mail on the old server</strong></p>



<p>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.</p>



<p>Syntax: old_pophost_nodelete bool</p>



<h3 class="wp-block-heading" id="old_pophost_sep">old_pophost_sep</h3>



<p><strong>Login separator</strong></p>



<p>Seperater, default is ‘@’. e.g. some systems use %</p>



<p><strong>Note:</strong>&nbsp;The old_pophost_iffirst and old_pophost_makeuser have now been replaced by the more consistent old_pophost_createuser_disable setting.</p>



<p>Syntax: old_pophost_sep string</p>



<h3 class="wp-block-heading" id="old_pophost_bind">old_pophost_bind</h3>



<p><strong>Bind outgoing connection during pop migration</strong></p>



<p>This binds to the specified local port during a migration</p>



<p>Syntax: old_pophost_bind string</p>



<h3 class="wp-block-heading" id="old_pophost_inbox">old_pophost_inbox</h3>



<p><strong>Use pop to migrate the inbox and maintain uidls</strong></p>



<p>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</p>



<p>Syntax: old_pophost_inbox bool</p>



<h3 class="wp-block-heading" id="old_pophost_nofetch">old_pophost_nofetch</h3>



<p><strong>Disable fetching messages from pop host</strong></p>



<p>Useful if you want to migrate the account user/password, but not the messages</p>



<p>Syntax: old_pophost_nofetch bool</p>



<h3 class="wp-block-heading" id="old_inbox_both">old_inbox_both</h3>



<p><strong>Use pop &amp; imap to migrate the inbox</strong></p>



<p>This may create duplicates, you should only use it when the old server keeps the imap and pop inboxes as sepereate entities.</p>



<p>Syntax: old_inbox_both bool</p>



<h3 class="wp-block-heading" id="old_imaphost">old_imaphost</h3>



<p><strong>Intercept mode migration for IMAP folders servers</strong></p>



<p>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.</p>



<p>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.</p>



<p>Syntax: old_imaphost string</p>



<h3 class="wp-block-heading" id="old_imaphost_always">old_imaphost_always</h3>



<p><strong>Always attempt to suck mail on each IMAP login (slow)</strong></p>



<p>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.</p>



<p>Note: This will obviously stop retrieving mail if the user changes their password in SurgeMail but not on the old server.</p>



<p>Syntax: old_imaphost_always bool</p>



<h3 class="wp-block-heading" id="old_imaphost_createuser_disable">old_imaphost_createuser_disable</h3>



<p><strong>Disable user creation in database on login</strong></p>



<p>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.</p>



<p>Syntax: old_imaphost_createuser_disable bool</p>



<h3 class="wp-block-heading" id="old_imaphost_nodomain">old_imaphost_nodomain</h3>



<p><strong>Strip domain when logging in to old_imaphost</strong></p>



<p>This can be used if you are migrating from a server that uses username only (without domain) logins.</p>



<p>Syntax: old_imaphost_nodomain bool</p>



<h3 class="wp-block-heading" id="old_imaphost_nodelete">old_imaphost_nodelete</h3>



<p><strong>Leave mail on the old server</strong></p>



<p>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.</p>



<p>Syntax: old_imaphost_nodelete bool</p>



<h3 class="wp-block-heading" id="old_imaphost_prefix">old_imaphost_prefix</h3>



<p><strong>Mail prefix for old imap server when using old_imaphost</strong></p>



<p>IMAP prefix for old imap server. eg. mail/.</p>



<p>Syntax: old_imaphost_prefix string</p>



<h3 class="wp-block-heading" id="old_imaphost_file">old_imaphost_file</h3>



<p><strong>Migration based on file</strong></p>



<p>Specialist setting for one specific system, not for general use.</p>



<p>Syntax: old_imaphost_file string</p>



<h3 class="wp-block-heading" id="old_imaphost_user">old_imaphost_user</h3>



<p><strong>Migration based on file – user field</strong></p>



<p>Specialist setting for one specific system, not for general use.</p>



<p>Syntax: old_imaphost_user string</p>



<h3 class="wp-block-heading" id="old_imaphost_lowercase">old_imaphost_lowercase</h3>



<p><strong>Lowercase all migrated folders</strong></p>



<p>Lowercase all migrated folders.</p>



<p>Syntax: old_imaphost_lowercase bool</p>



<h3 class="wp-block-heading" id="old_imaphost_skip">old_imaphost_skip</h3>



<p><strong>Skip folders</strong></p>



<p>Comma seperate wild card list of migrate folders to skip past.</p>



<p>Syntax: old_imaphost_skip string</p>



<h3 class="wp-block-heading" id="old_imaphost_dom">old_imaphost_dom</h3>



<p><strong>Migration – Alternative domain on old server for login, also set fallback_domain.</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: old_imaphost_dom string</p>



<h3 class="wp-block-heading" id="old_smtphost">old_smtphost</h3>



<p><strong>Old smtp host</strong></p>



<p>SMTP host to check for existing users (when creating new accounts).</p>



<p>Syntax: old_smtphost string</p>



<h3 class="wp-block-heading" id="old_smtphost_skip">old_smtphost_skip</h3>



<p><strong>Skip old_smtphost checks for administrators</strong></p>



<p>Who to skip old_smtphost checks for. Valid values are “admin” and “domadmin”.</p>



<p>Syntax: old_smtphost_skip string</p>



<h3 class="wp-block-heading" id="old_xfile">old_xfile</h3>



<p><strong>Migration – Copy xfile data across</strong></p>



<p>Only valid if the old server is also running surgemail. And requires old_pophost settings to work</p>



<p>Syntax: old_xfile bool</p>



<h3 class="wp-block-heading" id="pop_welcome">pop_welcome</h3>



<p><strong>Welcome message for POP/IMAP</strong></p>



<p>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.&nbsp;</p>



<p>Syntax: pop_welcome string</p>



<h3 class="wp-block-heading" id="pop_min_time">pop_min_time</h3>



<p><strong>Min seconds between pop logins (see warning)</strong></p>



<p>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</p>



<p>Syntax: pop_min_time int</p>



<h3 class="wp-block-heading" id="prefix">prefix</h3>



<p><strong>Prefix for usernames in database</strong></p>



<p>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’.&nbsp;</p>



<p>Syntax: prefix string</p>



<h3 class="wp-block-heading" id="proxy_pop_nodomain">proxy_pop_nodomain</h3>



<p><strong>Strip domain when talking to proxy POP host</strong></p>



<p>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&nbsp;<a href="#surgewall">surgewall</a>, see&nbsp;<a href="#surgewall_options">surgewall_options</a>&nbsp;for details</p>



<p>Syntax: proxy_pop_nodomain bool</p>



<h3 class="wp-block-heading" id="quota_default">quota_default</h3>



<p><strong>Default Email quota for users</strong></p>



<p>This setting allows you to limit disk usage of each user a setting of 100mb to 1000mb is typical. </p>



<p>Syntax: quota_default string</p>



<h3 class="wp-block-heading" id="quota_domain">quota_domain</h3>



<p><strong>Total quota for the domain, e.g. 300mb, 2gig</strong></p>



<p>Limits the total usage (used quota) for the entire domain. Note that the command tellmail quota_rebuild_domain domain.name may be used to reset these figures.</p>



<p>Syntax: quota_domain string</p>



<h3 class="wp-block-heading" id="rcpt_msg">rcpt_msg</h3>



<p><strong>Response given for invalid recipient errors, message is prefixed by email address.</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: rcpt_msg string</p>



<h3 class="wp-block-heading" id="redirect">redirect</h3>



<p><strong>Redirect Email to another account</strong></p>



<p>This redirects mail from one user to another. The destination can be a full Email address with another domain name.&nbsp;</p>



<p>Syntax: redirect was=string to=string</p>



<h3 class="wp-block-heading" id="redirect_max">redirect_max</h3>



<p><strong>Limits the number of redirect rules</strong></p>



<p>This setting applies a limit to the number of redirect rules which are allowed in this domain (only applies to domain admins)</p>



<p>Syntax: redirect_max int</p>



<h3 class="wp-block-heading" id="redirect_cc">redirect_cc</h3>



<p><strong>CC &amp; Redirect Email to another account</strong></p>



<p>This carbon copy redirects a message so the original user receives it as well as the new user you have specified. This is good for keeping a record of incoming emails for a particular account.&nbsp;</p>



<p>Syntax: redirect_cc was=string to=string</p>



<h3 class="wp-block-heading" id="redirect_hash">redirect_hash</h3>



<p><strong>Share incoming message evenly between several accounts</strong></p>



<p>The sharing is done based on a hash of the ‘from’ address so that the same ‘from’ address will always go to the same recipient, if windows specified then it is random after that many seconds</p>



<p>Syntax: redirect_hash was=string to=string window=int sequential=bool</p>



<h3 class="wp-block-heading" id="msg_max_out">msg_max_out</h3>



<p><strong>Max size of outgoing messages for smtp authenticated users</strong></p>



<p>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.&nbsp;<strong>We do not recommend using this setting</strong>, it is best to choose a g_msg_max value that all domains can live with.</p>



<p>Syntax: msg_max_out int</p>



<h3 class="wp-block-heading" id="msg_max_in">msg_max_in</h3>



<p><strong>Max size of incoming messages for this domain.</strong></p>



<p>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.</p>



<p>Syntax: msg_max_in int</p>



<h3 class="wp-block-heading" id="security_suffix">security_suffix</h3>



<p><strong>Suffix for smtp/imap/pop login</strong></p>



<p>This setting stops the username matching the email address by requiring a different suffix for logging in, so user@xyz.mail.server instead of user@mail.server. This is like an alias for the domain that only works for logging in.</p>



<p>Syntax: security_suffix string</p>



<h3 class="wp-block-heading" id="sent_store">sent_store</h3>



<p><strong>Store users message in named folder automatically, e.g. Sent</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: sent_store string</p>



<h3 class="wp-block-heading" id="smtp_auth_off">smtp_auth_off</h3>



<p><strong>Disable SMTP AUTH from unknown ip addresses</strong></p>



<p>This prevents a hacker sending out spam by cracking a users account details, users must login from an address specified in g_smtp_auth_ip or g_relay_allow_ip</p>



<p>Syntax: smtp_auth_off bool</p>



<h3 class="wp-block-heading" id="smtp_welcome">smtp_welcome</h3>



<p><strong>Welcome message for SMTP</strong></p>



<p>This is the string displayed to the user when they connect to this domain, before they login. See also pop_welcome&nbsp;</p>



<p>Syntax: smtp_welcome string</p>



<h3 class="wp-block-heading" id="smtp_welcome_name">smtp_welcome_name</h3>



<p><strong>SMTP welcome connection hostname</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: smtp_welcome_name string</p>



<h3 class="wp-block-heading" id="smtp_from_ip">smtp_from_ip</h3>



<p><strong>Require incoming email from matching ip</strong></p>



<p>This is used to ensure all incoming email comes direct from a filter system and not from the internet, only authenticated email will bypass this (and g_spam_allow)</p>



<p>Syntax: smtp_from_ip string</p>



<h3 class="wp-block-heading" id="spam_strip">spam_strip</h3>



<p><strong>Strip spam headers for this domain</strong></p>



<p>Strip spamdetect headers for this domain.&nbsp;</p>



<p>Syntax: spam_strip bool</p>



<h3 class="wp-block-heading" id="spam_block">spam_block</h3>



<p><strong>Default for this domain to block spf etc failures</strong></p>



<p>This setting sets the default behavior for this domain, if g_spam_block is not set, then this setting can turn on blocking as the default for this entire domain. Individual users can still set their own settings to block or not block for spf.</p>



<p>Syntax: spam_block bool</p>



<h3 class="wp-block-heading" id="spam_noblock">spam_noblock</h3>



<p><strong>Disable spf blocking for this domain</strong></p>



<p>This is the opposite of spam_block, this can be used if g_spam_block is true and you wish to disable spf blocking for one domain.</p>



<p>Syntax: spam_noblock bool</p>



<h3 class="wp-block-heading" id="ssl_pop_domain">ssl_pop_domain</h3>



<p><strong>Domain to use for ssl certificates for POP and IMAP</strong></p>



<p>If you have multiple aliases for this domain then this setting lets you choose which one to use for the SSL certificate</p>



<p>Syntax: ssl_pop_domain string</p>



<h3 class="wp-block-heading" id="ssl_allow">ssl_allow</h3>



<p><strong>IP Wild card list to allow SSL encryption from</strong></p>



<p>This setting remove the capability so clients won’t attempt ssl, it is only really functional for ip based virtual domains</p>



<p>Syntax: ssl_allow string</p>



<h3 class="wp-block-heading" id="ssl_require_login">ssl_require_login</h3>



<p><strong>Require ssl for this domain</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: ssl_require_login string</p>



<h3 class="wp-block-heading" id="ssl_require_web">ssl_require_web</h3>



<p><strong>Require https for most web features (excluding blogs file sharing and surgeplus)</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: ssl_require_web bool</p>



<h3 class="wp-block-heading" id="ssl_hsts">ssl_hsts</h3>



<p><strong>Send HSTS header to prevent accidental http access for this domain, also rejects self signed certificates</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: ssl_hsts bool</p>



<h3 class="wp-block-heading" id="surgewall">surgewall</h3>



<p><strong>gewall-surgewall-mailproxy-feature-version-1-4a-or-greater-required" &gt;</strong></p>



<p>This allows SurgeMail to be placed as a “filter” in front of an existing mailserver to apply friends rules, spam filtering and/or virus scanning. All you need to do is set this to the existing server address. POP3 will be routed through to the existing server and users can login to the SurgeMail web interface to configure their friends, spam and virus options eg:</p>



<p>surgewall “1.2.3.4”</p>



<p>This setting should be an IP address not an IP and port. Use surgewall_options if you need to specify non-standard ports or a different IP for POP, SMTP and/or IMAP. You may specify a comma seperated list of IP addresses. SurgeWall will connect to each in turn until it gets a successful login. To modify this behaviour see the proxy_failover option of the&nbsp;<a href="#surgewall_options">surgewall_options</a>&nbsp;setting.</p>



<p>See&nbsp;<a href="surgewall.htm">here</a>&nbsp;for more details.</p>



<p>Syntax: surgewall string</p>



<h3 class="wp-block-heading" id="surgewall_auth">surgewall_auth</h3>



<p><strong>SurgeWall SMTP authentication</strong></p>



<p>Defines the username and password to use for SMTP authentication when sending to SurgeWall’ed server.</p>



<p>Syntax: surgewall_auth user=string pass=string</p>



<h3 class="wp-block-heading" id="surgewall_local_too">surgewall_local_too</h3>



<p><strong>For web domain admin try local database too</strong></p>



<p>Allows local user accounts to be created for domain admin</p>



<p>Syntax: surgewall_local_too bool</p>



<h3 class="wp-block-heading" id="surgewall_options">surgewall_options</h3>



<p><strong>SurgeWall miscellaneous options (Version 1.4c or greater required)</strong></p>



<p>This setting controls the SurgeWall miscellaneous configuration options it has several parameters:</p>



<figure class="wp-block-table"><table><tbody><tr><td>strip_domain</td><td>TRUE/FALSE strips the domain name from the username when sending to the original server.</td></tr><tr><td>proxy_failover</td><td>TRUE/FALSE failover mode for several addresses, only use next address if previous one fails to respond.</td></tr><tr><td>auth_local</td><td>TRUE/FALSE requires that users exist locally, no authentication is done via the original server.</td></tr><tr><td>pop</td><td>Comma seperated list of IP addresses and port of the original POP3 server.</td></tr><tr><td>imap</td><td>Comma seperated list of IP addresses and port of the original IMAP server.</td></tr><tr><td>smtp</td><td>Comma seperated list of IP addresses and port of the original SMTP server.</td></tr><tr><td>usercgi</td><td>pop/imap which protocol to use when authenticating logins to the web interface.</td></tr></tbody></table></figure>



<p>The POP, SMTP and IMAP options allow you to configure SurgeWall to connect to different IPs and/or ports for each interface that it proxies. So for example you can run SurgeWall on the same machine as the old mail server provided the old mail server is configured to run on non-standard ports. eg:</p>



<p>surgewall_options strip_domain=”TRUE” pop=”127.0.0.1:111″ smtp=”127.0.0.1:26″ imap=”127.0.0.1:144″</p>



<p>or perhaps you have the pop, smtp and imap components of the server running on several machines, eg.</p>



<p>surgewall_options strip_domain=”TRUE” pop=”1.2.3.4:111″ smtp=”2.3.4.5:26″ imap=”3.4.5.6:144″</p>



<p>You may specify several different IPs in a comma seperated list in the POP, SMTP and IMAP options if you do this SurgeWall will connect to each in turn until it gets a successful login. The same is true for the&nbsp;<a href="#surgewall">SurgeWall</a>&nbsp;setting.</p>



<p>To modify this behaviour you can set proxy_failover to TRUE this causes SurgeWall to only use the next address if it fails to connect to the preceeding address, meaning it will use each server specified only if the previous server is not responding.</p>



<p>Syntax: surgewall_options strip_domain=bool proxy_failover=bool auth_local=bool pop=string smtp=string imap=string usercgi=string</p>



<h3 class="wp-block-heading" id="surgewall_capa_local">surgewall_capa_local</h3>



<p><strong>Just return local imap capa response rather than remote</strong></p>



<p>Note that it can only guess the right imap host if you are using ip based virtual domains.</p>



<p>Syntax: surgewall_capa_local bool</p>



<h3 class="wp-block-heading" id="surgewall_saveusers">surgewall_saveusers</h3>



<p><strong>Save users in the local database as they login</strong></p>



<p>This can be used with auth_local=true option to create the local accounts…</p>



<p>Syntax: surgewall_saveusers bool</p>



<h3 class="wp-block-heading" id="suspend">suspend</h3>



<p><strong>Disable logins for entire domain</strong></p>



<p>Use this where a domain is not being paid for and you want to suspend all users in the domain. This prevents users checking mail NOT users sending mail or other domains sending to this domain</p>



<p>Syntax: suspend bool</p>



<h3 class="wp-block-heading" id="suspend_incoming">suspend_incoming</h3>



<p><strong>Disable delivery and give 450 retry message</strong></p>



<p>Useful to temporarily disable a domain while moving it</p>



<p>Syntax: suspend_incoming bool</p>



<h3 class="wp-block-heading" id="user_alias">user_alias</h3>



<p><strong>Number of aliases accounts can create</strong></p>



<p>This setting specifies the maximum number of account aliases an account in this domain is allowed to create. The format of these aliases is specified in the file specified by the&nbsp;<a href="global.htm#g_user_alias_file%20">g_user_alias_file</a>&nbsp;setting.</p>



<p>Default is disabled (0) which disables the alias creation interface in the user.cgi pages.</p>



<p>Syntax: user_alias int</p>



<h3 class="wp-block-heading" id="user_auto_pass">user_auto_pass</h3>



<p><strong>Auto create users with this password on message delivery</strong></p>



<p>Exceedingly dangerous setting only intended for closed systems not open to internet! Accounts are created on message delivery if they don’t exist with the specified password. Broadsoft Extentsion account autoprovisioning (Broadsoft feature)</p>



<p>Syntax: user_auto_pass string</p>



<h3 class="wp-block-heading" id="user_auto">user_auto</h3>



<p><strong>Auto create users when a login attempt occurs</strong></p>



<p>Exceedingly dangerous setting only intended for closed systems not open to internet! Accounts are created when someone tries to login via imap/pop etc… If the account already exists it is not modified unless it is currently set with the password defined in user_auto_pass (broadsoft feature)</p>



<p>Syntax: user_auto bool</p>



<h3 class="wp-block-heading" id="user_auto_always">user_auto_always</h3>



<p><strong>Auto create users when a login attempt occurs and always accept any password</strong></p>



<p>Exceedingly dangerous setting only intended for closed systems not open to internet! Account is created and then allowed to login with any password (used in closed broadsoft setup)</p>



<p>Syntax: user_auto_always bool</p>



<h3 class="wp-block-heading" id="user_sms">user_sms</h3>



<p><strong>Enable users to setup SMS notifications</strong></p>



<p>This setting allows users to setup an SMS notification of email whose subject matches the user defined keyword.</p>



<p>Syntax: user_sms bool</p>



<h3 class="wp-block-heading" id="user_sms_quota">user_sms_quota</h3>



<p><strong>Number of sms messages per account</strong></p>



<p>This setting allows you to configure either a quota or a ‘number of credits’ system for SMS messages. This setting has 2 parameters ‘initial’ and ‘period’.</p>



<p>If you set ‘period’ to 0 then ‘initial’ is the number of credits a user will begin with they are decremented when they send an SMS and not increased unless you increase them manually.</p>



<p>If you set ‘period’ to any value other than 0, then ‘initial’ is the users quota, which is re-set after the time period specified by ‘period’. Valid ‘period’ values are a number of hours, or suffix the value with d, w or y to indicate a number of days, weeks or years respectively, eg: 5w equals 5 weeks.</p>



<p>Syntax: user_sms_quota initial=int period=string</p>



<h3 class="wp-block-heading" id="user_centipaid">user_centipaid</h3>



<p><strong>see&nbsp;</strong></p>



<p>Specifies the various CentiPaid options a user is allowed to configure for themselves.</p>



<p>Syntax: user_centipaid string</p>



<h3 class="wp-block-heading" id="user_max">user_max</h3>



<p><strong>Maximum user allowed in this domain</strong></p>



<p>This setting specifies the maximum number of users in this domain. Domain admins and users are blocked from adding more users than specified in this setting. The admin can still add users.</p>



<p>Syntax: user_max int</p>



<h3 class="wp-block-heading" id="user_status_send">user_status_send</h3>



<p><strong>How often to send user status messages (0 = never)</strong></p>



<p>When the user enables friends then this setting will send them a regular report on what is pending and what filter rules have done. Files status_html.eml</p>



<p>Syntax: user_status_send int</p>



<h3 class="wp-block-heading" id="user_send_max">user_send_max</h3>



<p><strong>ser@domain&gt;</strong></p>



<p>Reports the number of emails the user has sent in the last 24 hour period.</p>



<h3 class="wp-block-heading" id="user_list_quota">user_list_quota</h3>



<p><strong>Number of mailing lists users can create</strong></p>



<p>This setting configures the number of mailing lists a user of this domain can create. See also g_user_list_quota which can set quota globally or by user group. Also the list_quota authent field can set quota per user.</p>



<p>Syntax: user_list_quota int</p>



<h3 class="wp-block-heading" id="user_hide_security">user_hide_security</h3>



<p><strong>Hide security logs from users</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: user_hide_security bool</p>



<h3 class="wp-block-heading" id="user_report">user_report</h3>



<p><strong>Daily,Weekly,Monthly, emailed to manager</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: user_report string</p>



<h3 class="wp-block-heading" id="url_host">url_host</h3>



<p><strong>Mail host A Record name (if different from MX Record name)</strong></p>



<p>This name is used in URLs to this domain. It is important that the hostname specified here will resolve to this physical host running SurgeMail at all times.</p>



<p>It is used by WebMail in the email sent to user upon signup. The email sent to the manager when a user signs up and is the host passed to WebMail when auto-logging a user in. If your auto-logins are failing because of a “cannot connect error” then you may need to set this to the correct host.</p>



<p>Syntax: url_host string</p>



<h3 class="wp-block-heading" id="ssl_alias">ssl_alias</h3>



<p><strong>Alternate ssl host names, e.g. mail.xyz.com,pop.xyz.com,smtp.xyz.com</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: ssl_alias string</p>



<h3 class="wp-block-heading" id="send_helo">send_helo</h3>



<p><strong>Mail host A Record name used when sending helo to other servers – requires g_send_helo_from true</strong></p>



<p>This is only used if g_send_helo_from is also true</p>



<p>Syntax: send_helo string</p>



<h3 class="wp-block-heading" id="url_blogs">url_blogs</h3>



<p><strong>BLOGS host A Record name (if different from MX Record name – eg. blogs.mydomain.com)</strong></p>



<p>This is used when generating the ‘view’ link, if you don’t specify a port (:nnn) then it will use the first webmail port by default, by default the url_host setting will be used, failing that the domain name is used</p>



<p>Syntax: url_blogs string</p>



<h3 class="wp-block-heading" id="url_alias">url_alias</h3>



<p><strong>Allows translation from one URL to another</strong></p>



<p>Allows translation from one URL or beginning of a URL to another. eg:</p>



<p>url_alias from=”/cgi-bin/” to=”/scripts/”</p>



<p>will cause the URL http://localhost:7025/cgi-bin/fred.cgi to reference the same file as http://localhost:7025/scripts/fred.cgi would have, the fred.cgi in the SurgeMail ‘scripts’ directory. These settings are checked before the&nbsp;<a href="global.htm#g_url_alias">g_url_alias</a>&nbsp;settings, the first matching rule is used, settings are checked in the order specified.</p>



<p>Syntax: url_alias from=string to=string ports=string</p>



<h3 class="wp-block-heading" id="user_access_default">user_access_default</h3>



<p><strong>Default user features granted to users in this domain</strong></p>



<p>This setting allows you to specify default access to certain SurgeMail features. It is specified in the same maner as the&nbsp;<a href="global.htm#g_user_access">g_user_access</a>&nbsp;settings ‘access’ parameter. eg:</p>



<p>user_access_default “all,!spam,!virus”</p>



<p>Syntax: user_access_default string</p>



<h3 class="wp-block-heading" id="webmail_url">webmail_url</h3>



<p><strong>Url to the WebMail cgi</strong></p>



<p>If WebMail is not in the default place and/or is not on the SurgeMail machine then this setting tells SurgeMail where it is so links to WebMail from SurgeMail function correctly.</p>



<p>Syntax: webmail_url string</p>



<h3 class="wp-block-heading" id="webmail_urladd">webmail_urladd</h3>



<p><strong>Url data to append to WebMail auto-login link</strong></p>



<p>This setting allows you to specify additional information and settings which are passed to WebMail when SurgeMail links to it. Example: Different colors to use for this domain.</p>



<p>Syntax: webmail_urladd string</p>



<h3 class="wp-block-heading" id="webmail_workarea">webmail_workarea</h3>



<p><strong>Path to WebMail workarea</strong></p>



<p>If WebMail is not installed in the default location on this SurgeMail machine this setting tells SurgeMail where to find it.</p>



<p>Syntax: webmail_workarea string</p>



<h3 class="wp-block-heading" id="webmail_host">webmail_host</h3>



<p><strong>The IP address of the mail server</strong></p>



<p>SurgeMail sets the imaphost/smtphost address in surgehost.ini for WebMail. First it checks for a virtual domain ip, then it checks for a specifically bound ip address in the imap/smtp port settings, if neither are specified it defaults to 127.0.0.1. The webmail_host will override this process and assign a value directly. You require this when using a Smart Router or Load Balancer, please read&nbsp;<a href="load_balance.htm">this</a>.</p>



<p>Syntax: webmail_host string</p>



<h3 class="wp-block-heading" id="web_path">web_path</h3>



<p><strong>Path to web admin pages</strong></p>



<p>Path to web admin and user self management pages. This setting allows you to give each domain a different set of pages and thus a different look and feel. To enable this, copy the entire ‘web’ directory then set web_path to the path of the copied files. Lastly modify the copied files to have the new look and feel you desire.</p>



<p>Syntax: web_path string</p>



<h3 class="wp-block-heading" id="web_url_path">web_url_path</h3>



<p><strong>Url to path translation with access specifier</strong></p>



<p>This lets you set up aliases and translations of urls partly based on the access rights of the user.</p>



<p>Syntax: web_url_path url=string path=string access=string</p>



<h3 class="wp-block-heading" id="web_access_ip">web_access_ip</h3>



<p><strong>Restrict access to web ports based on ip</strong></p>



<p>Specifies a list of ports and a wildcard list of valid ip addresses who can connect to those ports.</p>



<p>Syntax: web_access_ip ports=string ip=string</p>



<h3 class="wp-block-heading" id="webdav_quota">webdav_quota</h3>



<p><strong>Webdav quota per user in this domain, e.g. 100mb</strong></p>



<p>Limits the webdav storage area for this user, default is the users email quota</p>



<p>Syntax: webdav_quota string</p>



<h3 class="wp-block-heading" id="surgeweb_backend_server">surgeweb_backend_server</h3>



<p><strong>Backend server to connect to</strong></p>



<p>This specifies the backend machine where Surgeweb connects for email and to store user settings. Surgeweb will cache data here but store the master copy of anything on the backend machine.</p>



<p>Syntax: surgeweb_backend_server string</p>



<h3 class="wp-block-heading" id="surgeweb_backend_smtp">surgeweb_backend_smtp</h3>



<p><strong>Backend smtp access (if non default)</strong></p>



<p>per default connects to 127.0.0.1:25</p>



<p>Syntax: surgeweb_backend_smtp string</p>



<h3 class="wp-block-heading" id="surgeweb_backend_web">surgeweb_backend_web</h3>



<p><strong>Backend web access – for usercgi /surgeplus (if non default)</strong></p>



<p>If no backendserver specified is ‘/’, default with backend is ‘http://backend_server/’. For non default port / machine specify say: ‘server.name:7080’</p>



<p>Syntax: surgeweb_backend_web string</p>



<h3 class="wp-block-heading" id="surgeweb_custom">surgeweb_custom</h3>



<p><strong>Surgeweb customisation level</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: surgeweb_custom string</p>



<h3 class="wp-block-heading" id="xfile_url">xfile_url</h3>



<p><strong>Url to xfile files (see surgeplus utility)</strong></p>



<p>Use to override the url that users are told they can access their shared SurgePlus files at via a web browser. The default location is on the port specified by the webmail_port setting.</p>



<p>Syntax: xfile_url string</p>



<p>Example: https://your.domain.name:7443</p>



<h3 class="wp-block-heading" id="disable_surgeplus">disable_surgeplus</h3>



<p><strong>Disable SurgePlus Calendar and File Sharing client</strong></p>



<p>Disable users from logging in using the SurgePlus Calendar and File Sharing client. See&nbsp;<a href="surgeplus.htm">SurgePlus</a></p>



<p>Syntax: disable_surgeplus bool</p>



<h3 class="wp-block-heading" id="surgeplus_pop_server_name">surgeplus_pop_server_name</h3>



<p><strong>Default POP server for SurgePlus clients</strong></p>



<p>New installs of the SurgePlus client will be automatically configured to use this specified POP server. If you don’t specify a value for this setting, then the POP server will default to what you have specified by the url_host setting, or the domain name if you don’t specify a url_host setting. You will need to do a ‘tellmail surgeplus rebuild’ command after changing this setting and if you are downloading the new build via your web browser be aware that web browsers sometimes cache the old download.</p>



<p>Syntax: surgeplus_pop_server_name string</p>



<p>Example: pop.your.domain.name</p>



<h3 class="wp-block-heading" id="surgeplus_smtp_server_name">surgeplus_smtp_server_name</h3>



<p><strong>Default SMTP server for SurgePlus clients</strong></p>



<p>New installs of the SurgePlus client will be automatically configured to use this specified SMTP server. If you don’t specify a value for this setting, then the POP server will default to what you have specified by the url_host setting, or the domain name if you don’t specify a url_host setting. You will need to do a ‘tellmail surgeplus rebuild’ command after changing this setting and if you are downloading the new build via your web browser be aware that web browsers sometimes cache the old download.</p>



<p>Syntax: surgeplus_smtp_server_name string</p>



<p>Example: pop.your.domain.name</p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/alldomain/">All Domain Settings</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>All Global Settings</title>
		<link>https://surgemail.com/knowledge-base/allglobal/</link>
		
		<dc:creator><![CDATA[chrisp]]></dc:creator>
		<pubDate>Mon, 12 Apr 2021 03:21:36 +0000</pubDate>
				<guid isPermaLink="false">https://surgemail.com/?post_type=ht_kb&#038;p=4005</guid>

					<description><![CDATA[<p>g_access_group Access groups Access rules defining groups of IP addresses with certain POP, IMAP and SMTP privileges. When a user is authenticated access is checked against group membership defined in the “mailaccess” field in the authentication database. See&#160;accounts&#160;for more information. eg. this could allow you to charge webmail users for pop access privileges:g_access_group group=paid_user access_pop=*<br /><a class="moretag" href="https://surgemail.com/knowledge-base/allglobal/">+ Read More</a></p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/allglobal/">All Global Settings</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading" id="g_access_group">g_access_group</h3>



<p><strong>Access groups</strong></p>



<p>Access rules defining groups of IP addresses with certain POP, IMAP and SMTP privileges. When a user is authenticated access is checked against group membership defined in the “mailaccess” field in the authentication database. See&nbsp;<a href="accounts.htm">accounts</a>&nbsp;for more information.</p>



<p>eg. this could allow you to charge webmail users for pop access privileges:<br>g_access_group group=paid_user access_pop=* access_imap=* access_smtp=*&nbsp;<br>g_access_group group=free_user access_pop=webmail.svr.ip access_imap=webmail.svr.ip access_smtp=webmail.svr.ip&nbsp;</p>



<p>with “Access type” set to “free_user” on accounts page or equivalently in nwauth authentication database:<br>marijn@mydomain.com:{ssha}tVANQo…:created=”1060034937″ mailaccess=”free_user” …</p>



<p><strong>To prevent webmail access for some users you would do this:</strong></p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>g_access_group_default “normal”<br>g_access_group group=”normal” access_pop=”*” access_imap=*” access_smtp=”*”<br>g_access_group group=”nowebmail” access_pop=”*,!webmail.ip” access_imap=”*,!webmail.ip” access_smtp=”*”</p>



<p>And put the users you want to limit in a group called ‘nowebmail’ e.g.<br><br>lookup fred@domain<br>+OK fred@domaing config 0 mailaccess=”nowebmail”</p>
</blockquote>



<p>Syntax: g_access_group group=string access_pop=string access_imap=string access_smtp=string access_incoming=string</p>



<h3 class="wp-block-heading" id="g_access_group_default">g_access_group_default</h3>



<p><strong>Access group defaults</strong></p>



<p>Access group defaults for users with no access groups set. (must be used in conjunction with g_access_group)</p>



<p>Syntax: g_access_group_default string</p>



<h3 class="wp-block-heading" id="g_access_webonly">g_access_webonly</h3>



<p><strong>Users in this group can only use web not imap or pop</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_access_webonly string</p>



<h3 class="wp-block-heading" id="g_access_surgeweb">g_access_surgeweb</h3>



<p><strong>Apply g_access_group rules to surgeweb sessions based on client’s address</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_access_surgeweb bool</p>



<h3 class="wp-block-heading" id="g_acctlog_sum_inactive">g_acctlog_sum_inactive</h3>



<p><strong>Summarise local accounts that have not logged in yet as not_loggedin_yet@domain.com</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_acctlog_sum_inactive bool</p>



<h3 class="wp-block-heading" id="g_admin_readonly">g_admin_readonly</h3>



<p><strong>System admins with readonly access to the management interface</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_admin_readonly string</p>



<h3 class="wp-block-heading" id="g_admin_ip">g_admin_ip</h3>



<p><strong>Admin IP access</strong></p>



<p>Mask of valid IP addresses for admin users (default *), this is a security setting you can use to restrict remote web admin access to trusted IP addresses. One is always allowed to use manage SurgeMail using 127.0.0.1 regardless of whether this is explicitly specified.</p>



<p>eg. To restrict to local network as per net mask<br>g_admin_ip “10.0.0.*,10.1.2.*”&nbsp;</p>



<p>Syntax: g_admin_ip string</p>



<h3 class="wp-block-heading" id="g_admin_localhost">g_admin_localhost</h3>



<p><strong>Allow localhost web admin without user/pass</strong></p>



<p>Allows a localhost connection to access the web admin port without using the administrator username / password. This is good if you keep forgetting the admin password like I do.</p>



<p>Syntax: g_admin_localhost bool</p>



<h3 class="wp-block-heading" id="g_admin_guesses">g_admin_guesses</h3>



<p><strong>Number of guesses allowed for admin.</strong></p>



<p>Syntax: g_admin_guesses “number”</p>



<p>This sets the number of guesses allowed for the admin username/password. Once this has been reached the ip is banned.</p>



<p>Syntax: g_admin_guesses int</p>



<h3 class="wp-block-heading" id="g_alias_login_disable">g_alias_login_disable</h3>



<p><strong>Disable user login as alias</strong></p>



<p>Stops the user login to pop or imap as the alias account</p>



<p>Syntax: g_alias_login_disable bool</p>



<h3 class="wp-block-heading" id="g_apple_bug1">g_apple_bug1</h3>



<p><strong>Apple bug allow content-length headers</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_apple_bug1 bool</p>



<h3 class="wp-block-heading" id="g_apple_bug2">g_apple_bug2</h3>



<p><strong>Apple bug2 don’t try and return bad if looping</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_apple_bug2 bool</p>



<h3 class="wp-block-heading" id="g_archive">g_archive</h3>



<p><strong>rchive-on-delete-off-disables-archive-and-instead-deletes-the-files-immediately" &gt;</strong></p>



<p>Purged monthly or by tellmail purge_deleted_users</p>



<p>Syntax: g_archive_on_delete_off bool</p>



<h3 class="wp-block-heading" id="g_archive_tcpip">g_archive_tcpip</h3>



<p><strong>Rules for TCPIP archive process</strong></p>



<p>Contact netwin for more details of this mechanism if you wish to use it.</p>



<p>Syntax: g_archive_tcpip to=string from=string path=string dom=string</p>



<h3 class="wp-block-heading" id="g_archive_tcpip_host">g_archive_tcpip_host</h3>



<p><strong>Host to send archive data too</strong></p>



<p>When using an archive server this defines the host that is running the archive server. Contact netwin if you need more info on this feature.</p>



<p>Syntax: g_archive_tcpip_host string</p>



<h3 class="wp-block-heading" id="g_archive_bucketsize">g_archive_bucketsize</h3>



<p><strong>Size for archive bucket files. Default is 1mb</strong></p>



<p>Sets the size of the archive buckets used by the circular archives. If set too large then editing the buckets manually is awkward.</p>



<p>Syntax: g_archive_bucketsize int</p>



<h3 class="wp-block-heading" id="g_archive_early">g_archive_early</h3>



<p><strong>Apply all archive rules before content filtering is applied (obsolete)</strong></p>



<p>This will apply the archive rules before content filtering is applied. This can be user to capture the source message if it is getting stored or bounced unnecessarily by any of the SurgeMail filters. The early flag on individual archive rules should be used instead of this setting.</p>



<p>Syntax: g_archive_early bool</p>



<h3 class="wp-block-heading" id="g_archive_on_delete_off">g_archive_on_delete_off</h3>



<p><strong>Disables archive and instead deletes the files immediately</strong></p>



<p>Purged monthly or by tellmail purge_deleted_users</p>



<p>Syntax: g_archive_on_delete_off bool</p>



<h3 class="wp-block-heading" id="g_archive_on_delete_dir">g_archive_on_delete_dir</h3>



<p><strong>Directory to archive user files to on delete</strong></p>



<p>Directory to archive deleted users files to. Defaults to ‘archive_deleted’ in the SurgeMail installation folder.</p>



<p>Syntax: g_archive_on_delete_dir string</p>



<h3 class="wp-block-heading" id="g_archive_files">g_archive_files</h3>



<p><strong>Archive attachments to a directory</strong></p>



<p>Each message to the named account will have it’s attachments removed and placed in the named directory. The path can contain the symbols $month$ $year$ $day$ $second$. The ‘second’ is only within this day. Together these variables can be used to ensure a unique path is used for each file if the names might conflict. Use g_redirect_cc to archive email going to an existing account because if you set ‘to’ equal to a real account then the real account will stop receiving messages!</p>



<p>Syntax: g_archive_files path=string to=string files=string</p>



<h3 class="wp-block-heading" id="g_atrest_all">g_atrest_all</h3>



<p><strong>Auto encrypt all msgs when users next login</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_atrest_all bool</p>



<h3 class="wp-block-heading" id="g_atrest_enable">g_atrest_enable</h3>



<p><strong>At rest encryption. Unwise usually!</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_atrest_enable bool</p>



<h3 class="wp-block-heading" id="g_atrest_crazy">g_atrest_crazy</h3>



<p><strong>No recovery admin password needed</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_atrest_crazy bool</p>



<h3 class="wp-block-heading" id="g_atrest_api">g_atrest_api</h3>



<p><strong>Enabe api for enabling atrest encryption – not needed</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_atrest_api bool</p>



<h3 class="wp-block-heading" id="g_attach_convert">g_attach_convert</h3>



<p><strong>Process matching attachments with specified command. Passed two files names</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_attach_convert to=string from=string subject=string files=string output=string command=str</p>



<h3 class="wp-block-heading" id="g_atrn_server">g_atrn_server</h3>



<p><strong>On Demand Mail Relay settings to define user/pass for clients to fetch mail</strong></p>



<p>This allows a client on a dynamic IP to connect and request mail for a specific domain after authenticating by using the ATRN command. Typically this is done on the special port 366</p>



<p>Syntax: g_atrn_server domain=string user=string pass=string</p>



<h3 class="wp-block-heading" id="g_atrn_client">g_atrn_client</h3>



<p><strong>Define a rule for fetching email using ATRN protocol</strong></p>



<p>This is the setting for clients to define to fetch mail from an upstream server. Typically this is done on the special port 366, to specify another port use host:port in the host setting. E.g. host=”smtp.upstream.com:25″</p>



<p>Syntax: g_atrn_client domain=string user=string pass=string host=string</p>



<h3 class="wp-block-heading" id="g_atrn_port">g_atrn_port</h3>



<p><strong>Port to listen for ‘atrn’ (On Demand Relay) requests</strong></p>



<p>See g_atrn_server for more details, the default is port 366, atrn is not obeyed on port 25</p>



<p>Syntax: g_atrn_port string</p>



<h3 class="wp-block-heading" id="g_assume_created_epoch">g_assume_created_epoch</h3>



<p><strong>If user has no ‘created’ field assume they were created an arbitrarily large time in the past</strong></p>



<p>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.</p>



<p>Syntax: g_assume_created_epoch bool</p>



<h3 class="wp-block-heading" id="g_backtrace_disable">g_backtrace_disable</h3>



<p><strong>Backtrace Disable</strong></p>



<p>Disable backtrace information for unix systems.</p>



<p>Syntax: g_backtrace_disable bool</p>



<h3 class="wp-block-heading" id="g_bad_login_mins">g_bad_login_mins</h3>



<p><strong>Minutes to block login for, if consecutive bad ones received</strong></p>



<p>Minutes to block login for, if consecutive g_badlogin_allow or g_badlogin_ip_allow bad logins received=.</p>



<p>Syntax: g_bad_login_mins int</p>



<h3 class="wp-block-heading" id="g_bad_login_allow">g_bad_login_allow</h3>



<p><strong>Number of consecutive bad logins for a user before blocking that user</strong></p>



<p>Number of consecutive bad logins for a user before blocking that user.</p>



<p>Syntax: g_bad_login_allow int</p>



<h3 class="wp-block-heading" id="g_bad_login_ip_allow">g_bad_login_ip_allow</h3>



<p><strong>Number of bad logins from an IP before blocking that IP</strong></p>



<p>Number of bad logins from a single IP before blocking that IP.</p>



<p>Syntax: g_bad_login_ip_allow int</p>



<h3 class="wp-block-heading" id="g_bad_login_ip_ignore">g_bad_login_ip_ignore</h3>



<p><strong>IP address(es) to allow any number of bad logins from</strong></p>



<p>Use for webmail system or other local gateway to stop bad login counter from locking out all users.</p>



<p>Syntax: g_bad_login_ip_ignore string</p>



<h3 class="wp-block-heading" id="g_bad_login_dumb">g_bad_login_dumb</h3>



<p><strong>Give login failures even if known address</strong></p>



<p>This disables the smart feature so this setting will probably catch real users <img src="https://s.w.org/images/core/emoji/15.0.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<p>Syntax: g_bad_login_dumb bool</p>



<h3 class="wp-block-heading" id="g_bad_login_lockout">g_bad_login_lockout</h3>



<p><strong>Lockout addresses permenantly – use if DOS attack</strong></p>



<p>This can reduce load during DOS attack.</p>



<p>Syntax: g_bad_login_lockout bool</p>



<h3 class="wp-block-heading" id="g_bank_url">g_bank_url</h3>



<p><strong>URL to charge a credit card (experimental)</strong></p>



<p>This allows automated monthly charging of users</p>



<p>Syntax: g_bank_url string</p>



<h3 class="wp-block-heading" id="g_bank_user">g_bank_user</h3>



<p><strong>Username for authenticated web request to banks system</strong></p>



<p>See g_bank_url for details</p>



<p>Syntax: g_bank_user string</p>



<h3 class="wp-block-heading" id="g_bank_pass">g_bank_pass</h3>



<p><strong>Password for authenticated web request to banks system</strong></p>



<p>See g_bank_url for details</p>



<p>Syntax: g_bank_pass string</p>



<h3 class="wp-block-heading" id="g_bank_ok">g_bank_ok</h3>



<p><strong>Find this in response, if found then charge was successful</strong></p>



<p>See g_bank_url for details</p>



<p>Syntax: g_bank_ok string</p>



<h3 class="wp-block-heading" id="g_bank_reason">g_bank_reason</h3>



<p><strong>This line is returned to user if it is found</strong></p>



<p>See g_bank_url for details</p>



<p>Syntax: g_bank_reason string</p>



<h3 class="wp-block-heading" id="g_bank_log">g_bank_log</h3>



<p><strong>Log lines matching this in response.</strong></p>



<p>See g_bank_url for details</p>



<p>Syntax: g_bank_log string</p>



<h3 class="wp-block-heading" id="g_bank_debug">g_bank_debug</h3>



<p><strong>Log request to bank server</strong></p>



<p>Use when trying to debug the g_bank_url post/response</p>



<p>Syntax: g_bank_debug bool</p>



<h3 class="wp-block-heading" id="g_bank_group">g_bank_group</h3>



<p><strong>Create price groups with descriptions</strong></p>



<p>See g_bank_url for details</p>



<p>Syntax: g_bank_group group=string price=string desc=string</p>



<h3 class="wp-block-heading" id="g_block_wild">g_block_wild</h3>



<p><strong>Block wildcards in usernames</strong></p>



<p>Block the ‘*’ wildcard character in usernames.</p>



<p>Syntax: g_block_wild bool</p>



<h3 class="wp-block-heading" id="g_body_filter">g_body_filter</h3>



<p><strong>Enable user email body filtering</strong></p>



<p>Allows the user to configure filters which filter the body of incoming messages</p>



<p>Syntax: g_body_filter bool</p>



<h3 class="wp-block-heading" id="g_broad_url">g_broad_url</h3>



<p><strong>URL to this server</strong></p>



<p>Customer specific feature</p>



<p>Syntax: g_broad_url string</p>



<h3 class="wp-block-heading" id="g_broad_server">g_broad_server</h3>



<p><strong>URL to BroadSoft server</strong></p>



<p>Customer specific feature</p>



<p>Syntax: g_broad_server string</p>



<h3 class="wp-block-heading" id="g_broad_user">g_broad_user</h3>



<p><strong>BroadSoft user</strong></p>



<p>Customer specific feature</p>



<p>Syntax: g_broad_user string</p>



<h3 class="wp-block-heading" id="g_broad_pass">g_broad_pass</h3>



<p><strong>BroadSoft pass</strong></p>



<p>Customer specific feature</p>



<p>Syntax: g_broad_pass string</p>



<h3 class="wp-block-heading" id="g_broad_port">g_broad_port</h3>



<p><strong>BroadSoft port</strong></p>



<p>Customer specific feature</p>



<p>Syntax: g_broad_port string</p>



<h3 class="wp-block-heading" id="g_broad_noadd">g_broad_noadd</h3>



<p><strong>Disable buttons on message</strong></p>



<p>Disables the added buttons for voice messages</p>



<p>Syntax: g_broad_noadd bool</p>



<h3 class="wp-block-heading" id="g_bull_rule">g_bull_rule</h3>



<p><strong>Post bulletins to this domain</strong></p>



<p>Senders must be authenticated user that matches the sender, domain can be blank to send to all domains, the to field is the address you will send posts to, typically something like: bulletins@your.domain.name</p>



<p>Syntax: g_bull_rule to=string domain=string sender=string</p>



<h3 class="wp-block-heading" id="g_no_bull">g_no_bull</h3>



<p><strong>Special accounts that should not get bulletins</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_no_bull string</p>



<h3 class="wp-block-heading" id="g_calendar_version">g_calendar_version</h3>



<p><strong>CalDAV / SabreDAV calendaring configuration version number</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_calendar_version int</p>



<h3 class="wp-block-heading" id="g_comment">g_comment</h3>



<p><strong>Management notes and comments about the server</strong></p>



<p>This is a dummy setting that lets you store information in the ini file that will survive setting changes from the web admin tool.</p>



<p>Syntax: g_comment date=string name=string comment=string</p>



<h3 class="wp-block-heading" id="g_centipaid">g_centipaid</h3>



<p><strong>see&nbsp;</strong></p>



<p>Authentication server and port for CentiPaid.</p>



<p>Syntax: g_centipaid string</p>



<h3 class="wp-block-heading" id="g_country_ip">g_country_ip</h3>



<p><strong>Tag messages with country of origin</strong></p>



<p>Downloads a ip to country database and then adds a header based on that to each message to show where it came from. This file iptocountry2.csv.enc should appear in your surgemail home directory after enabling this setting (restart surgemail too), if the file doesn’t appear you can download it via http://updates.netwinsite.com/updates/iptocountry2.csv.enc , tellmail aspam_update may trigger the download!</p>



<p>Syntax: g_country_ip bool</p>



<h3 class="wp-block-heading" id="g_country_login">g_country_login</h3>



<p><strong>List of countries to allow logins from, 2 letter codes</strong></p>



<p>Make sure g_country_ip is enabled</p>



<p>Be aware that country based rules are only 99% reliable as the database for converting ip addresses to countries is never perfect</p>



<p>Syntax: g_country_login string</p>



<h3 class="wp-block-heading" id="g_country_allow">g_country_allow</h3>



<p><strong>user@domain list to bypass country_login rule</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_country_allow string</p>



<h3 class="wp-block-heading" id="g_country_allowip">g_country_allowip</h3>



<p><strong>Ip addresses to bypass country_login rule</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_country_allowip string</p>



<h3 class="wp-block-heading" id="g_cpu_slow">g_cpu_slow</h3>



<p><strong>Email warning if no cpu for this many seconds</strong></p>



<p>Default is 10 seconds, helps detect system lockups and alert the manager</p>



<p>Syntax: g_cpu_slow int</p>



<h3 class="wp-block-heading" id="g_create_apply">g_create_apply</h3>



<p><strong>List of user groups to apply create_* settings for.</strong></p>



<p>This setting allows you to apply create_* settings to domain admin accounts. Specify g_access_group names and domain admins in these groups will have create_* settings applied to them when adding users in the domain admin interface.</p>



<p>Syntax: g_create_apply string</p>



<h3 class="wp-block-heading" id="g_create_apply_admin">g_create_apply_admin</h3>



<p><strong>Apply allow* rules to the administrator</strong></p>



<p>Without this setting the admin can create usernames that contain any characters pretty much</p>



<p>Syntax: g_create_apply_admin bool</p>



<h3 class="wp-block-heading" id="g_create_allow">g_create_allow</h3>



<p><strong>List of characters allowed in usernames/passwords</strong></p>



<p>Defaults to A-Za-z0-9\-_. meaning usernames/password may contain letters, numbers, -, _ and . and nothing else.</p>



<p>Syntax: g_create_allow string</p>



<h3 class="wp-block-heading" id="g_create_cleanup">g_create_cleanup</h3>



<p><strong>Cleanup existing data before adding a user</strong></p>



<p>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.</p>



<p>Syntax: g_create_cleanup bool</p>



<h3 class="wp-block-heading" id="g_create_allow_pass">g_create_allow_pass</h3>



<p><strong>List of characters allowed in passwords</strong></p>



<p>Settting overriding g_create_allow just for passwords.</p>



<p>Syntax: g_create_allow_pass string</p>



<h3 class="wp-block-heading" id="g_create_strict">g_create_strict</h3>



<p><strong>Whether to apply strict rules to usernames/passwords</strong></p>



<p>Checking this causes surgemail to check passwords do not contain words longer than 4 characters from g_create_dictionary as well as requiring the password to be 6+ characters, and usernames/passwords to contain more than 1 character.</p>



<p>Syntax: g_create_strict bool</p>



<h3 class="wp-block-heading" id="g_create_pass_digit">g_create_pass_digit</h3>



<p><strong>Require one digit and letter in a password</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_create_pass_digit bool</p>



<h3 class="wp-block-heading" id="g_create_pass_recheck">g_create_pass_recheck</h3>



<p><strong>Recheck passwords during login and warn user if g_hack_touser is true</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_create_pass_recheck bool</p>



<h3 class="wp-block-heading" id="g_create_pass_recheck_text">g_create_pass_recheck_text</h3>



<p><strong>Added to end of recheck email to give users a url to a help page</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_create_pass_recheck_text string</p>



<h3 class="wp-block-heading" id="g_create_strict_admin">g_create_strict_admin</h3>



<p><strong>Enforce strict rules for admins too, set g_create_strict AS WELL!!</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_create_strict_admin bool</p>



<h3 class="wp-block-heading" id="g_create_dictionary">g_create_dictionary</h3>



<p><strong>File containing dictionary words to compare passwords to</strong></p>



<p>Text file containing one word per line, passwords are compared to all words longer than 4 characters in this file, if a username or password contains a word in this file it is not allowed. Only takes effect if g_create_strict is checked.</p>



<p>Syntax: g_create_dictionary string</p>



<h3 class="wp-block-heading" id="g_create_badnames">g_create_badnames</h3>



<p><strong>List of illegal usernames</strong></p>



<p>Comma separated list of illegal usernames, may contain wild cards, if username contains part of a non-wild card or matches a wildcard it is disallowed.</p>



<p>Syntax: g_create_badnames string</p>



<h3 class="wp-block-heading" id="g_create_record_ip">g_create_record_ip</h3>



<p><strong>Causes surgemail to store ipnum in the authent database</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_create_record_ip bool</p>



<h3 class="wp-block-heading" id="g_create_user_length">g_create_user_length</h3>



<p><strong>Limit the length of usernames</strong></p>



<p>This is applied during user self creation. Set admin to true to restrict the domain and global admin also.</p>



<p>Syntax: g_create_user_length min=int max=int admin=bool</p>



<h3 class="wp-block-heading" id="g_create_pass_length">g_create_pass_length</h3>



<p><strong>Limit the length of user passwords</strong></p>



<p>This is applied during user self creation and when users change passwords. Set admin to true to restrict the domain and global admin also.</p>



<p>Syntax: g_create_pass_length min=int max=int admin=bool</p>



<h3 class="wp-block-heading" id="g_create_pass_slack">g_create_pass_slack</h3>



<p><strong>Slacken restrictions on trivial password creation</strong></p>



<p>Useful sometimes for provisioning, allows username=password</p>



<p>Syntax: g_create_pass_slack bool</p>



<h3 class="wp-block-heading" id="g_create_pass_mixed">g_create_pass_mixed</h3>



<p><strong>Require mixed case passwords</strong></p>



<p>Require mixed case passwords</p>



<p>Syntax: g_create_pass_mixed bool</p>



<h3 class="wp-block-heading" id="g_create_pass_special">g_create_pass_special</h3>



<p><strong>Require special character, e.g. !@#$%^&amp;*(){}[];:?&gt;&lt;.,</strong></p>



<p>Require a special character</p>



<p>Syntax: g_create_pass_special bool</p>



<h3 class="wp-block-heading" id="g_create_pass_notuser">g_create_pass_notuser</h3>



<p><strong>Ban password containing username</strong></p>



<p>Ban password if it conains the username</p>



<p>Syntax: g_create_pass_notuser bool</p>



<h3 class="wp-block-heading" id="g_pass_force">g_pass_force</h3>



<p><strong>Force user to reset password if admin changes it</strong></p>



<p>Makes the user change the password on the next login to user.cgi or surgeweb</p>



<p>Syntax: g_pass_force bool</p>



<h3 class="wp-block-heading" id="g_pass_twofactor">g_pass_twofactor</h3>



<p><strong>factor-life-session-life-in-minutes-dflt-4-hours" &gt;</strong></p>



<p>Allow users to enable two factor authentication.</p>



<p>Syntax: g_pass_twofactor_life int</p>



<h3 class="wp-block-heading" id="g_pass_twofactor_life">g_pass_twofactor_life</h3>



<p><strong>Session life in minutes, dflt 4 hours</strong></p>



<p>Allow users to enable two factor authentication.</p>



<p>Syntax: g_pass_twofactor_life int</p>



<h3 class="wp-block-heading" id="g_pass_twofactor_merged">g_pass_twofactor_merged</h3>



<p><strong>Require +code for imap/pop logins sometimes</strong></p>



<p>Requires merged login.</p>



<p>Syntax: g_pass_twofactor_merged bool</p>



<h3 class="wp-block-heading" id="g_recover_noquestions">g_recover_noquestions</h3>



<p><strong>Remove question based password recovery system</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_recover_noquestions bool</p>



<h3 class="wp-block-heading" id="g_recover_reminder">g_recover_reminder</h3>



<p><strong>Send users reminder email monthly until they set a recovery email address</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_recover_reminder bool</p>



<h3 class="wp-block-heading" id="g_disable_smtp_after">g_disable_smtp_after</h3>



<p><strong>Number of days an account can remain unread before delivery is disabled</strong></p>



<p>DO NOT USE THIS SETTING IN A MIRROR/CLUSTER SETUP</p>



<p>Number of days an account can remain unread before delivery is disabled.&nbsp;</p>



<p>Syntax: g_disable_smtp_after int</p>



<h3 class="wp-block-heading" id="g_disable_skip">g_disable_skip</h3>



<p><strong>Ip address of senders to accept email from even if user account is disabled due to g_disable_smtp_after</strong></p>



<p>Useful to ensure delivery for important company notices</p>



<p>Syntax: g_disable_skip string</p>



<h3 class="wp-block-heading" id="g_disable_exclude">g_disable_exclude</h3>



<p><strong>Field and value that excludes an account from g_disable_smtp_after</strong></p>



<p>If the authent response includes this field/value pair then the user account will not be disabled from receiving messages</p>



<p>Syntax: g_disable_exclude field=string value=string</p>



<p>Example: field=”noexpire” value=”true”</p>



<h3 class="wp-block-heading" id="g_delete_user_after">g_delete_user_after</h3>



<p><strong>Number of days an account can remain unread before it is deleted</strong></p>



<p>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&nbsp;<a href="#prefix">prefix</a>&nbsp;setting.</p>



<p>e.g.<br>DELETE_USER_AFTER “30”<br>Then issue the command:<br>tellmail expire_accounts<br>Then examine users_delete.rec to see it is a valid list of old accounts, then use:<br>tellmail delete_user FILE users_delete.rec</p>



<p>To actually delete the accounts.</p>



<p>Syntax: g_delete_user_after int</p>



<h3 class="wp-block-heading" id="g_delete_user_mode">g_delete_user_mode</h3>



<p><strong>What to do when an account is unread</strong></p>



<p>You can set this to “file” or “suspend”. “file” causes accounts to be written to the users_delete.rec file, which you can action by running “tellmail delete_user FILE” or “tellmail delete_user FILE users_delete.rec” (optionally specify the file). “suspend” causes accounts to be suspend, it does this by setting the field and value specified in the&nbsp;<a href="#g_delete_user_suspend">g_delete_user_suspend</a>&nbsp;setting.</p>



<p>If this setting is blank the default is to use ‘file’ mode, accounts are NEVER deleted automatically except in the very oldest versions of surgemail (before version 3)</p>



<p>Syntax: g_delete_user_mode string</p>



<h3 class="wp-block-heading" id="g_delete_user_suspend">g_delete_user_suspend</h3>



<p><strong>If suspending an unread account set this field/value</strong></p>



<p>Set the field and value to use when suspending an account due to&nbsp;<a href="#g_delete_user_after">g_delete_user_after</a>&nbsp;and the&nbsp;<a href="#g_delete_user_mode">g_delete_user_mode</a>&nbsp;“suspend” settings.</p>



<pre class="wp-block-preformatted">Example: Disable accounts after 1 year 
       g_delete_user_after "365"
       g_delete_user_mode "suspend"
       g_delete_user_suspend field="mailstatus" value="closed"
</pre>



<p>Syntax: g_delete_user_suspend field=string value=string</p>



<h3 class="wp-block-heading" id="g_delete_exclude">g_delete_exclude</h3>



<p><strong>Field and value that excludes an account from g_delete_user_after</strong></p>



<p>If the authent response includes this field/value pair then the user account will not expire</p>



<p>Syntax: g_delete_exclude field=string value=string</p>



<p>Example: field=”noexpire” value=”true”</p>



<h3 class="wp-block-heading" id="g_diskio_abort">g_diskio_abort</h3>



<p><strong>Shutdown if diskIO failure on queue files</strong></p>



<p>Intended to make server die rather than to pretend to keep running when a major disk fault has occurred</p>



<p>Syntax: g_diskio_abort bool</p>



<h3 class="wp-block-heading" id="g_disk_debug">g_disk_debug</h3>



<p><strong>Log slow disk access n</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_disk_debug bool</p>



<h3 class="wp-block-heading" id="g_disk_warning">g_disk_warning</h3>



<p><strong>Give manager warning if disk % exceeded, default 95%</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_disk_warning string</p>



<h3 class="wp-block-heading" id="g_dns_paranoid">g_dns_paranoid</h3>



<p><strong>Compare sender forward and reverse dns lookup and see if they match</strong></p>



<p>Does a forward DNS lookup on the sender’s domain and matches this with a reverse lookup of the senders IP address. If these do not match the message is either bounced or stamped with the header “X-DNS-Paranoid: &lt;explanation&gt;”. Valid values for this field are “STAMP”,”RETRY” and “REJECT”.</p>



<p>STAMP = Add the X-DNS-Paranoid header if it fails</p>



<p>RETRY = Bounce the message with a 450 error. (so if the failure was temporary the sending server will retry)</p>



<p>REJECT = Bounce the message with a 550 error</p>



<p>Set g_dns_lookup_msg or g_dns_match_msg to define the reject/stamp strings respectively.</p>



<h3 class="wp-block-heading" id="g_dns_match_msg">g_dns_match_msg</h3>



<p><strong>Message for stamp or bounce if forward and reverse lookup don’t match</strong></p>



<p>The message given to the user when the forwar/reverse dns lookup doesn’t match</p>



<p>Syntax: g_dns_match_msg string</p>



<p>Example: “Sorry your ip address doesn’t translate into a name that translates into your ip address”</p>



<h3 class="wp-block-heading" id="g_dns_noptr">g_dns_noptr</h3>



<p><strong>Set to reject or retry, for ip addresses with no reverse dns entry (rdns)</strong></p>



<p>If the ip number of a connecting user has no associated name in the reverse dns database then the connection is rejected or told to retry later.</p>



<p>Syntax: g_dns_noptr string</p>



<p>Example: “retry”</p>



<h3 class="wp-block-heading" id="g_dns_noptr_skip">g_dns_noptr_skip</h3>



<p><strong>Skip RDNS for these ip addresses</strong></p>



<p>This is an over-ride for local addresses which you trust.</p>



<p>Syntax: g_dns_noptr_skip string</p>



<p>Example: “retry”</p>



<h3 class="wp-block-heading" id="g_dns_noptr_msg">g_dns_noptr_msg</h3>



<p><strong>Message for stamp or bounce if DNS lookup fails on ip address</strong></p>



<p>See short description.</p>



<p>Syntax: g_dns_noptr_msg string</p>



<h3 class="wp-block-heading" id="g_dns_nocache">g_dns_nocache</h3>



<p><strong>Disables DNS cache for spf lookups (20 minute life)</strong></p>



<p>This setting disables the small cache used for SPF lookups to improve performance.</p>



<p>Syntax: g_dns_nocache bool</p>



<h3 class="wp-block-heading" id="g_dns_disk">g_dns_disk</h3>



<p><strong>Enables DNS disk cache</strong></p>



<p>Not normally needed unless dns server is flakey…</p>



<p>Syntax: g_dns_disk bool</p>



<h3 class="wp-block-heading" id="g_dns_cache_size">g_dns_cache_size</h3>



<p><strong>Set size of forward dns cache, default 7000</strong></p>



<p>Best not to change this normally</p>



<p>Syntax: g_dns_cache_size int</p>



<h3 class="wp-block-heading" id="g_dns_system">g_dns_system</h3>



<p><strong>Use system code to do reverse lookups</strong></p>



<p>If all channels hang in a state ‘lookup’ then turn this off so it will use the surgemail code for reverse dns lookups. This setting used to be g_dns_lookup and had the opposite meaning, we reversed it because the system dns code was faulty so often</p>



<p>Syntax: g_dns_system bool</p>



<h3 class="wp-block-heading" id="g_dns_threaded">g_dns_threaded</h3>



<p><strong>Enable threaded dns lookups</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_dns_threaded bool</p>



<h3 class="wp-block-heading" id="g_dns_test_blank">g_dns_test_blank</h3>



<p><strong>Break dns lookups to test how it’s handled</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_dns_test_blank bool</p>



<h3 class="wp-block-heading" id="g_dotstuff_fix">g_dotstuff_fix</h3>



<p><strong>Convert the way mail is stored on disk from dotstuffed to non dot stuffed (beta)</strong></p>



<p>In the dotstuffed format any attachments that have content (in encoded format) starting with a . get corrupted, as all single ‘.’ characters at the start of a line are converted to ‘..’. This is only very seldomly an issue as encoded text doesn’t usually have . characters. This feature can only be enabled and still need furhter production level testing to make sure there are no side effects… so if you play with it consider yourself adequately warned <img src="https://s.w.org/images/core/emoji/15.0.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<p>Syntax: g_dotstuff_fix bool</p>



<h3 class="wp-block-heading" id="g_domain_create_auto">g_domain_create_auto</h3>



<p><strong>Auto create domain if it doesn’t exist when creating a user</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_domain_create_auto bool</p>



<h3 class="wp-block-heading" id="g_domain_create_route">g_domain_create_route</h3>



<p><strong>Auto create route to mx mail server</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_domain_create_route bool</p>



<h3 class="wp-block-heading" id="g_encrypt_disable">g_encrypt_disable</h3>



<p><strong>Disable encryption</strong></p>



<p>Disable encryption mechanism</p>



<p>Syntax: g_encrypt_disable bool</p>



<h3 class="wp-block-heading" id="g_encrypt_config">g_encrypt_config</h3>



<p><strong>Encrypt some config settings (passwords)</strong></p>



<p>This can be used if naked passwords in the config are a problem. This setting currently applies to g_gateway, and may apply to others in future. You must manually copy the file config.key from master to slave.</p>



<p>Syntax: g_encrypt_config bool</p>



<h3 class="wp-block-heading" id="g_encrypt_path">g_encrypt_path</h3>



<p><strong>Path to encrypted files, this is not supported when mirroring!</strong></p>



<p>DO NOT USE</p>



<p>Syntax: g_encrypt_path string</p>



<h3 class="wp-block-heading" id="g_encrypt_ssl_force">g_encrypt_ssl_force</h3>



<p><strong>Require ssl on incoming encrypted messages</strong></p>



<p>When a message is going to be encrypted this setting ensures it is sent from the user to the server via SSL</p>



<p>Syntax: g_encrypt_ssl_force bool</p>



<h3 class="wp-block-heading" id="g_encrypt_ssl_noforce">g_encrypt_ssl_noforce</h3>



<p><strong>Exceptions, e.g. surgeweb or localhost</strong></p>



<p>When a message is going to be encrypted this setting ensures it is sent from the user to the server via SSL</p>



<p>Syntax: g_encrypt_ssl_noforce string</p>



<h3 class="wp-block-heading" id="g_encrypt_expire">g_encrypt_expire</h3>



<p><strong>Days to keep encrypted messages, default 60</strong></p>



<p>When a message is sent via encryption it is deleted after this many days</p>



<p>Syntax: g_encrypt_expire int</p>



<h3 class="wp-block-heading" id="g_encrypt_inline">g_encrypt_inline</h3>



<p><strong>Use INLINE method by default</strong></p>



<p>Sets the default encryption method when a rule does not apply</p>



<p>Syntax: g_encrypt_inline bool</p>



<h3 class="wp-block-heading" id="g_encrypt_reply_plain">g_encrypt_reply_plain</h3>



<p><strong>Send plain message for local replies</strong></p>



<p>By default a reply to a local user is also encrypted this makes it not encrypt the reply as user should be reading the message via SSL so the data is secure anyway.</p>



<p>Syntax: g_encrypt_reply_plain bool</p>



<h3 class="wp-block-heading" id="g_encrypt_pw_key">g_encrypt_pw_key</h3>



<p><strong>Central host password key</strong></p>



<p>DO NOT USE</p>



<p>Syntax: g_encrypt_pw_key string</p>



<h3 class="wp-block-heading" id="g_encrypt_pw_host">g_encrypt_pw_host</h3>



<p><strong>Central host for encryption password storage</strong></p>



<p>DO NOT USE</p>



<p>Syntax: g_encrypt_pw_host string</p>



<h3 class="wp-block-heading" id="g_encrypt_surgeweb_show">g_encrypt_surgeweb_show</h3>



<p><strong>Show SurgeVault in SurgeWeb</strong></p>



<p>Enables the display of surgevault encryption in the surgeweb interface (can be modified using encrypt_hide on surgeweb customisation page)</p>



<p>Syntax: g_encrypt_surgeweb_show bool</p>



<h3 class="wp-block-heading" id="g_encrypt_max">g_encrypt_max</h3>



<p><strong>Max encrypted per day server wide</strong></p>



<p>Server wide limit to prevent abuse (or accidental over use)</p>



<p>Syntax: g_encrypt_max int</p>



<h3 class="wp-block-heading" id="g_encrypt_none">g_encrypt_none</h3>



<p><strong>Don’t encrypt if subject starts with this</strong></p>



<p>Only significant if the setting to lock all messages is enabled.</p>



<p>Syntax: g_encrypt_none string</p>



<h3 class="wp-block-heading" id="g_encrypt_noip">g_encrypt_noip</h3>



<p><strong>Don’t encrypt if from this ip range</strong></p>



<p>Only significant if the setting to lock all messages is enabled.</p>



<p>Syntax: g_encrypt_noip string</p>



<h3 class="wp-block-heading" id="g_encrypt_nofwd">g_encrypt_nofwd</h3>



<p><strong>Don’t encrypt forwarded</strong></p>



<p>Known fault, this affects all recipeients, not generally good to use</p>



<p>Syntax: g_encrypt_nofwd bool</p>



<h3 class="wp-block-heading" id="g_encrypt_nowater">g_encrypt_nowater</h3>



<p><strong>Show this if no water mark defined yet</strong></p>



<p>e.g. No watermark defined, please complete this form</p>



<p>Syntax: g_encrypt_nowater string</p>



<h3 class="wp-block-heading" id="g_encrypt_limit">g_encrypt_limit</h3>



<p><strong>Max encrypted msgs per user per hour</strong></p>



<p>Per user limit</p>



<p>Syntax: g_encrypt_limit int</p>



<h3 class="wp-block-heading" id="g_encrypt_reset_safe">g_encrypt_reset_safe</h3>



<p><strong>When users password is reset, delete all messages to them</strong></p>



<p>This setting increases security and should be used if your server allows public account registrations.</p>



<p>Syntax: g_encrypt_reset_safe bool</p>



<h3 class="wp-block-heading" id="g_encrypt_reset_user">g_encrypt_reset_user</h3>



<p><strong>Msg to person when they click on reset password button</strong></p>



<p>The sender has been emailed a link they can use to reset your password</p>



<p>Syntax: g_encrypt_reset_user string</p>



<h3 class="wp-block-heading" id="g_encrypt_reset_msg">g_encrypt_reset_msg</h3>



<p><strong>Msg Body sent when password has been reset</strong></p>



<p>Message body sent to end user when password is reset</p>



<p>Syntax: g_encrypt_reset_msg string</p>



<h3 class="wp-block-heading" id="g_encrypt_reset_sender">g_encrypt_reset_sender</h3>



<p><strong>Msg Body sent to sender when password reset requested</strong></p>



<p>Message body sent to sender password reset is requested</p>



<p>Syntax: g_encrypt_reset_sender string</p>



<h3 class="wp-block-heading" id="g_encrypt_rule">g_encrypt_rule</h3>



<p><strong>Matches will be encrypted when sent</strong></p>



<p>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.</p>



<p>Syntax: g_encrypt_rule header=string contains=string from=string to=string noconfirm=bool method=string</p>



<h3 class="wp-block-heading" id="g_encrypt_unlock">g_encrypt_unlock</h3>



<p><strong>Unlock for these destinations. e.g. user@domain</strong></p>



<p>Not for general use</p>



<p>Syntax: g_encrypt_unlock string</p>



<h3 class="wp-block-heading" id="g_encrypt_reminders">g_encrypt_reminders</h3>



<p><strong>Days before we send users a reminder to change passwords, not recommended</strong></p>



<p>Not for general use, keywords (expire password reminder)</p>



<p>Syntax: g_encrypt_reminders int</p>



<h3 class="wp-block-heading" id="g_encrypt_smart">g_encrypt_smart</h3>



<p><strong>Smart Encrypt Private Feature (not available)</strong></p>



<p>Encrypt all messages except g_encrypt_unlock and surgeweb defined addresses – this feature not generally available till 9/March/2013, encrypt_smart per domain must also be turned on.</p>



<p>Syntax: g_encrypt_smart bool</p>



<h3 class="wp-block-heading" id="g_encrypt_nodomain">g_encrypt_nodomain</h3>



<p><strong>Allow encryption for users without local domains</strong></p>



<p>This lets you create accounts for domains that don’t exist, these users can then send encrypted messages.</p>



<p>Syntax: g_encrypt_nodomain bool</p>



<h3 class="wp-block-heading" id="g_encrypt_nolate">g_encrypt_nolate</h3>



<p><strong>Disable encryption on late forwarding</strong></p>



<p>If default encrpting is enabled then you might need this setting to stop it for late forwarding.</p>



<p>Syntax: g_encrypt_nolate bool</p>



<h3 class="wp-block-heading" id="g_encrypt_wall">g_encrypt_wall</h3>



<p><strong>Encrypt surgewall msgs</strong></p>



<p>Normally surgewall skips encryption</p>



<p>Syntax: g_encrypt_wall bool</p>



<h3 class="wp-block-heading" id="g_enotify_from">g_enotify_from</h3>



<p><strong>From address to use in email notification messages</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_enotify_from string</p>



<h3 class="wp-block-heading" id="g_error_xlate">g_error_xlate</h3>



<p><strong>Change error messages</strong></p>



<p>If wild card string matches smtp response code, then replace with ‘to’ response code, use %1 to replace the first wild card match etc…</p>



<p>Syntax: g_error_xlate was=string to=string</p>



<h3 class="wp-block-heading" id="g_expire_trash">g_expire_trash</h3>



<p><strong>Expire any messages found in trash folders</strong></p>



<p>Expires any messages more than 7 days old found in the ‘trash’ folder.</p>



<p>Syntax: g_expire_trash bool</p>



<h3 class="wp-block-heading" id="g_expire_silent">g_expire_silent</h3>



<p><strong>Don’t send users emails telling them what was expired.</strong></p>



<p>Some users get upset when they find messages have expired, this setting makes the expiration silent so the users don’t even notice. I think this is a bit nuts myself but some admins prefer it</p>



<p>Syntax: g_expire_silent bool</p>



<h3 class="wp-block-heading" id="g_expire_every">g_expire_every</h3>



<p><strong>Only expire spool once every ‘n’ days</strong></p>



<p>Reduce load spent expiring old messages.</p>



<p>Syntax: g_expire_every int</p>



<h3 class="wp-block-heading" id="g_expire_warning">g_expire_warning</h3>



<p><strong>Give warning ‘n’ days before deleting each file</strong></p>



<p>This will help warn users before a file is actually deleted.</p>



<p>Syntax: g_expire_warning int</p>



<h3 class="wp-block-heading" id="g_expire_onlyunread">g_expire_onlyunread</h3>



<p><strong>For the inbox only expire message if they are unread</strong></p>



<p>Useful if you only want to expire message the user never read</p>



<p>Syntax: g_expire_onlyunread bool</p>



<h3 class="wp-block-heading" id="g_expire_all_rules">g_expire_all_rules</h3>



<p><strong>Scan all users for rule files (not needed usually)</strong></p>



<p>Used if rule files added manually</p>



<p>Syntax: g_expire_all_rules bool</p>



<h3 class="wp-block-heading" id="g_fallback">g_fallback</h3>



<p><strong>Fallback address</strong></p>



<p>Default address for all local domains. If a local delivery is not to any valid user Emails will be delivered to this address. There is also a per domain default.&nbsp;</p>



<p>We want to stress that this is a dangerous setting, you use at your own peril.<br>Spammers will turn up to your server and test sending to accounts, they will just run through a dictionary of names, with a fallback setting you will be telling the spammer that all these accounts exist. The spammer will then deliver spam to these addresses in volumes that can cripple a server almost.</p>



<p>Syntax: g_fallback string</p>



<h3 class="wp-block-heading" id="g_fast_time_off">g_fast_time_off</h3>



<p><strong>Disable faster time function</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_fast_time_off bool</p>



<h3 class="wp-block-heading" id="g_from_valid">g_from_valid</h3>



<p><strong>Require an @ and dotted domain in all return addresses</strong></p>



<p>This forces the sender to either give ‘no’ reply address or a valid one with an @ and a dotted domain</p>



<p>Syntax: g_from_valid bool</p>



<h3 class="wp-block-heading" id="g_to_valid">g_to_valid</h3>



<p><strong>Require an @ and dotted domain in all dest addresses</strong></p>



<p>This forces all destination addresses to contain a domain name (breaks cron job emails on unix)</p>



<p>Syntax: g_to_valid bool</p>



<h3 class="wp-block-heading" id="g_from_header">g_from_header</h3>



<p><strong>From header used in delivery bounces</strong></p>



<p>From header used in delivery bounces.</p>



<p>Syntax: g_from_header string</p>



<h3 class="wp-block-heading" id="g_from_must_exist">g_from_must_exist</h3>



<p><strong>Require local from addresses to exist or reject mail</strong></p>



<p>Can be useful in blocking dumb spam robots</p>



<p>Syntax: g_from_must_exist bool</p>



<h3 class="wp-block-heading" id="g_from_rewrite">g_from_rewrite</h3>



<p><strong>Rewrite from envelope for outgoing email, e.g. *@this.domain -&gt; %1@another.domain</strong></p>



<p>This lets you change the ‘from’ address from an internal domain name to a valid public domain name. The change is performed on the From envelope (return path), not the from header. And the chanage does not affect the return path written in local deliveries, only outgoing email. Mfilter rules can be used to rewrite the actual message headers.</p>



<p>Syntax: g_from_rewrite was=string to=string</p>



<h3 class="wp-block-heading" id="g_from_rewrite_header">g_from_rewrite_header</h3>



<p><strong>Rewrite the from header as well</strong></p>



<p>Replaces the From: header in the mesage with the new address.</p>



<p>Syntax: g_from_rewrite_header bool</p>



<h3 class="wp-block-heading" id="g_from_rewrite_sender">g_from_rewrite_sender</h3>



<p><strong>Rewrite the sender header as well</strong></p>



<p>Replaces the Sender: header in the mesage with the new address.</p>



<p>Syntax: g_from_rewrite_sender bool</p>



<h3 class="wp-block-heading" id="g_from_force">g_from_force</h3>



<p><strong>From address for all sent messages</strong></p>



<p>Used when you want to make all messages use the same valid bounce address, reply-to header will contain original from if it doesn’t exist</p>



<p>Syntax: g_from_force string</p>



<h3 class="wp-block-heading" id="g_from_list_too">g_from_list_too</h3>



<p><strong>Also enforce from rules from lists</strong></p>



<p>Doesn’t allow lists to bypass forge rules</p>



<p>Syntax: g_from_list_too bool</p>



<h3 class="wp-block-heading" id="g_forward_illegal">g_forward_illegal</h3>



<p><strong>Prevents users setting forward rules to certain addresses</strong></p>



<p>Syntax: g_forward_illegal to=”address” apply=”user type “</p>



<p>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.</p>



<p>Some examples:</p>



<p>If you want to stop your users setting up forward rules that redirect to aol.com.<br>g_forward_illegal to=”*@aol.com” apply=”user”</p>



<p>If you want to stop your users setting a forward to all domains except aol.com<br>g_forward_illegal to=”*,!*@aol.com” apply=”user”</p>



<p>Stop domain admins sending to aol.com<br>g_forward_illegal to=”*@aol.com” apply=”domadmin”</p>



<p>Stop admins sending to netwinsite.com<br>g_forward_illegal to=”*@netwinsite.com” apply=”admin”</p>



<p>Syntax: g_forward_illegal to=string apply=string</p>



<h3 class="wp-block-heading" id="g_forward_attach">g_forward_attach</h3>



<p><strong>When late forwarding send as attachment to these domains</strong></p>



<p>Useful with hotmail.com, aol.com etc so that forwarded messages are not mistaken for spam</p>



<p>Syntax: g_forward_attach string</p>



<h3 class="wp-block-heading" id="g_forward_fixfrom">g_forward_fixfrom</h3>



<p><strong>When late forwarding rewrite from/return path as local user</strong></p>



<p>This prevents problems with spf/identity checking as the forwarded message is sent with valid from and return path</p>



<p>Syntax: g_forward_fixfrom bool</p>



<h3 class="wp-block-heading" id="g_forward_oops">g_forward_oops</h3>



<p><strong>Internal testing setting, not for general use sorry</strong></p>



<p>Testing setting, please do not use.</p>



<p>Syntax: g_forward_oops string</p>



<h3 class="wp-block-heading" id="g_about_disable">g_about_disable</h3>



<p><strong>Disable about web page</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_about_disable bool</p>



<h3 class="wp-block-heading" id="g_admin_access">g_admin_access</h3>



<p><strong>Allow / Restrict domain admin access to features based on&nbsp;</strong></p>



<p>g_admin_access group=”wildcard” access=”list”</p>



<p>This setting matches the g_access_group the admin is in to the wildcard specified and applies the specified access list to that domain admin, giving / restricting thier access to certain features. The list may include any of the following:</p>



<figure class="wp-block-table"><table><tbody><tr><th><strong>Value</strong></th><th><strong>Result</strong></th></tr><tr><td>alias</td><td>Access to domain users “Alias” page and features.</td></tr><tr><td>aspam</td><td>Access to the “ASpam” page and features.</td></tr><tr><td>blog</td><td>Access to the “Blogs” page and features.</td></tr><tr><td>bulletins</td><td>Access to the “Bulletins” page and features.</td></tr><tr><td>centipaid</td><td>Access to domain users “Centipaid” page and features.</td></tr><tr><td>enotify</td><td>Access to domain users “Email Notification” page and features.</td></tr><tr><td>exceptions</td><td>Access to domain users “Exceptions” page.</td></tr><tr><td>friends</td><td>Access to domain users “Friends” pages, and system.</td></tr><tr><td>fwd</td><td>Access to domain users “Forwarding” features, forwarding, auto-responder.</td></tr><tr><td>fwdonly</td><td>Access to domain users “Forwarding” features, forwarding</td></tr><tr><td>lists</td><td>Access to the “Lists” page and features.</td></tr><tr><td>log</td><td>Access to domain users “Log” page.</td></tr><tr><td>mailbox</td><td>Access to domain users “Mailbox” page, view mailbox, setup rules.</td></tr><tr><td>sms</td><td>Access to domain users “Sms” page.</td></tr><tr><td>spam</td><td>Access to domain users “Spam” page, and SmiteSpam and Aspam processing of messages.</td></tr><tr><td>spampriv</td><td>Access to domain users “Spam” pages’ spam private feature</td></tr><tr><td>spf</td><td>Access to domain users “Spf” page and features.</td></tr><tr><td>usage</td><td>Access to the “Usage” button, which shows a domain users usage.</td></tr><tr><td>users</td><td>Access to the “Users” page and features.</td></tr><tr><td>redirect</td><td>Access to the “Redirect” page and settings.</td></tr><tr><td>redirect_cc</td><td>Access to the “Redirect CC” page and settings.</td></tr></tbody></table></figure>



<p>In addition you can prefix any of the above with ! to deny access. There are two other special case values, “all” and “none” which mean exactly what they say, access to “all” or “none” of the features.</p>



<p>Example:</p>



<p>g_admin_access group=”simple” access=”all,!users,!reports”</p>



<p>The above setting gives admins in the ‘simple’ group access to all the features except the users and reports features.</p>



<p>Syntax: g_admin_access group=string access=string</p>



<h3 class="wp-block-heading" id="g_admin_access_default">g_admin_access_default</h3>



<p><strong>Default features granted to domain admins</strong></p>



<p>This setting is a default access list for all domain admins on the server, it is specified in the same maner as the&nbsp;<a href="#g_admin_access">g_admin_access</a>&nbsp;settings ‘access’ parameter. eg:</p>



<p>g_user_access_default “all,!users,!reports”</p>



<p>Syntax: g_admin_access_default string</p>



<h3 class="wp-block-heading" id="g_allow_bodyless">g_allow_bodyless</h3>



<p><strong>Allow bodyless email</strong></p>



<p>This will allow bodyless email to be accepted. These are usually spam.&nbsp; In particular Norton Antivirus in autoprotect mode closes the POP link which makes it appear that SurgeMail has terminated the connection when a bodyless email is encountered.</p>



<p>Syntax: g_allow_bodyless bool</p>



<h3 class="wp-block-heading" id="g_allow_user_authent_field_get">g_allow_user_authent_field_get</h3>



<p><strong>A space separated list of authent process fields that users are allowed to view for themself using the POP xauthent_field_get command</strong></p>



<p>This provides limited access to the user database for applications like webmail and surgeplus.</p>



<p>Syntax: g_allow_user_authent_field_get string</p>



<h3 class="wp-block-heading" id="g_allow_user_authent_field_set">g_allow_user_authent_field_set</h3>



<p><strong>A space separated list of authent process fields that users are allowed to set for themself using the POP xauthent_field_set command</strong></p>



<p>This provides limited access to the user database for applications like webmail and surgeplus.</p>



<p>Syntax: g_allow_user_authent_field_set string</p>



<h3 class="wp-block-heading" id="g_allow_passzip_to">g_allow_passzip_to</h3>



<p><strong>A list of addresses to allow unmonitorable archive messages to be sent to</strong></p>



<p>These may of course contain viruses as they cannot be scanned, but some people still need to be able to accept such files.</p>



<p>Syntax: g_allow_passzip_to string</p>



<h3 class="wp-block-heading" id="g_allow_passzip_from">g_allow_passzip_from</h3>



<p><strong>A list of addresses to allow unmonitorable archive messages to be sent from</strong></p>



<p>These may of course contain viruses as they cannot be scanned, but some people still need to be able to accept such files.</p>



<p>Syntax: g_allow_passzip_from string</p>



<h3 class="wp-block-heading" id="g_aspam_headers">g_aspam_headers</h3>



<p><strong>Add aspam information messages to messages.</strong></p>



<p>Adds informational aspam headers to all messages.</p>



<p>Syntax: g_aspam_headers bool</p>



<h3 class="wp-block-heading" id="g_aspam_need_ip">g_aspam_need_ip</h3>



<p><strong>Require good matches to match external ip address</strong></p>



<p>This prevents poluted bad messages in aspam_good causing spam to bypass the filters, but reduces effectiveness of the notspam address.</p>



<p>Syntax: g_aspam_need_ip bool</p>



<h3 class="wp-block-heading" id="g_authent_always">g_authent_always</h3>



<p><strong>Always lookup user, so virtual domains can exist just in authent module</strong></p>



<p>Always lookup user, so virtual domains can exist just in authent module. This allows you to support 10,000 domains on one system without a ‘huge’ ini file. Be careful to not create/remove real domains with the same name as existing domains that only exist in the authent database as the ‘drop files/inboxes’ will move when this occurs and existing mail will vanish.</p>



<p>Syntax: g_authent_always bool</p>



<h3 class="wp-block-heading" id="g_authent_any">g_authent_any</h3>



<p><strong>Restore buggy behaviour of looking up users in domains that don’t exist</strong></p>



<p>Previously surgemail would lookup a user even if the domain in question did not exist, if you need to restore this odd behaviour then you can use this setting…</p>



<p>Syntax: g_authent_any bool</p>



<h3 class="wp-block-heading" id="g_authent_allow_badascii">g_authent_allow_badascii</h3>



<p><strong>Allow ascii chars outside the range 32 &lt; 127</strong></p>



<p>By default ascii characters &lt; 32 and &gt;= 127 are blocked as invalid. If you require these characters set this to TRUE.</p>



<p>Syntax: g_authent_allow_badascii bool</p>



<h3 class="wp-block-heading" id="g_authent_case_sensitive">g_authent_case_sensitive</h3>



<p><strong>Make passwords case sensitive</strong></p>



<p>By default surgemail avoids case sensitive passwords as they do little to increase security but causes endless frustration for users, but this is just an opinion and some people disagree so use this setting if you wish to have case sensitive passwords :-).</p>



<p>Syntax: g_authent_case_sensitive bool</p>



<h3 class="wp-block-heading" id="g_authent_decrypt">g_authent_decrypt</h3>



<p><strong>Collect and store plain text passwords for migration in file pass.decrypted</strong></p>



<p>This setting should only be used as part of a migration, it obviously exposes your customers passwords to risk!.</p>



<p>Syntax: g_authent_decrypt bool</p>



<h3 class="wp-block-heading" id="g_authent_prefix_sep">g_authent_prefix_sep</h3>



<p><strong>Authent Prefix Separator (deprecated – for backward compatibility only)</strong></p>



<p>Prefix separator for prefix based separator. Only relevant if enabled on a per vdomain basis using the “prefix” setting.</p>



<p>Syntax: g_authent_prefix_sep string</p>



<h3 class="wp-block-heading" id="g_authent_process">g_authent_process</h3>



<p><strong>Authent process</strong></p>



<p>The command line of a NetWin authentication module. You can use one of our standard modules for LDAP, ODBCAuth, MySQL etc or write your own. For more information on these modules see the authentication section of the&nbsp;<a href="https://netwinsite.com/authent/index.htm">manual</a>&nbsp;.</p>



<p>This will typically be something like:<br>g_authent_process “E:\surgemail\nwauth.exe -path E:\surgemail”<br>or<br>g_authent_process “/usr/local/surgemail/nwauth -path /usr/local/surgemail”</p>



<p>Syntax: g_authent_process string</p>



<h3 class="wp-block-heading" id="g_authent_pass">g_authent_pass</h3>



<p><strong>Authent process to check passwords with</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_authent_pass string</p>



<h3 class="wp-block-heading" id="g_authent_lookup">g_authent_lookup</h3>



<p><strong>Check if accounts exist using g_authent_pass too</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_authent_lookup bool</p>



<h3 class="wp-block-heading" id="g_authent_cachelife">g_authent_cachelife</h3>



<p><strong>Cache life of successful authent lookups</strong></p>



<p>Set the life in seconds that successful cached lookups can be used, default 2 hours. Best left alone.</p>



<p>Syntax: g_authent_cachelife int</p>



<h3 class="wp-block-heading" id="g_authent_cachebad">g_authent_cachebad</h3>



<p><strong>Cache life of failed authent lookups</strong></p>



<p>Set the life in seconds that the cached failed lookups can be used, default 60 seconds. Best left alone unless your server is being hit by thousands of failed lookups and your authent module is slow.</p>



<p>Syntax: g_authent_cachebad int</p>



<h3 class="wp-block-heading" id="g_authent_cachesize">g_authent_cachesize</h3>



<p><strong>Size of the authent cache</strong></p>



<p>Set the size of the authent cache, default is 500 entries. Generally best left alone.</p>



<p>Syntax: g_authent_cachesize int</p>



<h3 class="wp-block-heading" id="g_authent_domain">g_authent_domain</h3>



<p><strong>Authent domain</strong></p>



<p>If this is ‘true’, the virtual domain name is appended to the username before it is passed to the authent process. This lets the authent process deal with virtual domains. As a general rule, this should ALWAYS be true.&nbsp;</p>



<p>Syntax: g_authent_domain bool</p>



<h3 class="wp-block-heading" id="g_authent_nodomain">g_authent_nodomain</h3>



<p><strong>If true dont add @virtual.domain.name to external user lookups (NOT RECOMMENDED)</strong></p>



<p>Use this at your own risk, it is provided for compatibility with dmail installations, but should be avoided if at all possible.</p>



<p>Syntax: g_authent_nodomain bool</p>



<h3 class="wp-block-heading" id="g_authent_encrypt_key">g_authent_encrypt_key</h3>



<p><strong>Encryption key config settings</strong></p>



<p>Not for general use currently, used to partially obscure credit card info when stored in the authent module.</p>



<p>Syntax: g_authent_encrypt_key string</p>



<h3 class="wp-block-heading" id="g_authent_number">g_authent_number</h3>



<p><strong>Authent number</strong></p>



<p>The number of concurrent authent processes to run. If you are using a slow external authent module (e.g. sql) then it is probably worth running 3-4, there is no need to have more than 1 when using nwauth.exe. (Default = 1)&nbsp;</p>



<p>Syntax: g_authent_number int</p>



<h3 class="wp-block-heading" id="g_authent_info">g_authent_info</h3>



<p><strong>Authent info</strong></p>



<p>Defines a piece of information to store about the user in the user database (phone number, name, address etc). Each piece of information is given a name, a field, an access mode, a default and a type. The name defines what appears in the web management display. The field is what is sent to the authent_process. The access mode can be one of the following: user, domadmin, or admin, createonly, none. The default is what value is assigned upon creation of a new user. The type can be one of: date, readonly, encrypt or any custom string which you want to check for or match on the na_details.htm page with a template function like: ||ifequal||user_info_type||custom|| .. do things .. ||endif||</p>



<p>An access mode of ‘admin’ means that only the system admin can see the information, ‘domadmin’ means the sysadmin and any domain admin can see the information, ‘user’ means the user can see the information, ‘createonly’ means the user sets the information at creation time but cannot see it after that and ‘none’ ensures that no-one can see or modify the information (used for information that is handled by SurgeMail itself, either through the interface or otherwise)</p>



<pre class="wp-block-preformatted">e.g.
     g_authent_info      name="Phone Number" field="phone" access="user" default="" type=""</pre>



<p>See&nbsp;<a href="authent.htm#authent_info">here</a>&nbsp;for a complete list of default settings.</p>



<p>Syntax: g_authent_info name=string field=string access=string default=string type=string</p>



<h3 class="wp-block-heading" id="g_authent_info_grp">g_authent_info_grp</h3>



<p><strong>Fields to show to users in this group</strong></p>



<p>Specifies the authent fields this user group is allowed to see and change. This applies only to the fields visible on the account properties page and the domain admin “Users” page it cannot be used to prevent access to fields which are managed by the web interface i.e. ‘fwd’</p>



<p>Syntax: g_authent_info_grp group=string fields=string tag=string</p>



<h3 class="wp-block-heading" id="g_authent_addip">g_authent_addip</h3>



<p><strong>Send ip address as third parameter to authent module</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_authent_addip bool</p>



<h3 class="wp-block-heading" id="g_authent_ip">g_authent_ip</h3>



<p><strong>Authent Lookup IP numbers via authent modules – enables relaying</strong></p>



<p>If enabled each connecting IP address will be looked up in your user database as x.x.x.x@ip eg: “127.0.0.1@ip” and if the user is found then relaying is allowed and if ‘send_limit=”nn”‘ is defined then that will set the tarpit send limit for that user.</p>



<p>For per IP tarpit limits to work you need to define the g_tarpit_max and g_tarpit_max_remote settings. And g_tarpit_drop to make the limit effective.</p>



<p>Syntax: g_authent_ip bool</p>



<h3 class="wp-block-heading" id="g_authent_single">g_authent_single</h3>



<p><strong>Allow local users with a single quote char in their name</strong></p>



<p>This let’s users exist who contain the single quote ‘ character. It is not supported with some authent modules though, nwauth does allow it.</p>



<p>Syntax: g_authent_single bool</p>



<h3 class="wp-block-heading" id="g_authent_spaces">g_authent_spaces</h3>



<p><strong>Allow spaces in passwords DO NOT USE</strong></p>



<p>Not supported for most authent modules, requires nwauth 4.0r or later, If you have already got users with spaces in their passwords and you turn this setting on, they will no longer be able to login until they reset their passwords. Authent module must support slash encoding, for nwauth add -spaces to command line</p>



<p>Syntax: g_authent_spaces bool</p>



<h3 class="wp-block-heading" id="g_authent_strip_domain">g_authent_strip_domain</h3>



<p><strong>Strip domain for authent lookups</strong></p>



<p>Use when your database expects one ‘primary’ domain to do lookups without a domain name then SurgeMail will strip that domain only from lookups. Typically this is only necessary with old DMail authent modules.</p>



<p>Syntax: g_authent_strip_domain string</p>



<h3 class="wp-block-heading" id="g_authent_restart">g_authent_restart</h3>



<p><strong>Cycle auth modules every 1000 lookups</strong></p>



<p>This is useful if there are resource allocation issues in the authentication module. Eg OBDCAuth</p>



<p>Syntax: g_authent_restart bool</p>



<h3 class="wp-block-heading" id="g_authent_logall">g_authent_logall</h3>



<p><strong>Turns on logging of authent requests</strong></p>



<p>If enabled, authentication requests are logged in mail.log as “&lt;day&gt; &lt;time&gt; Authent[&lt;action&gt; &lt;info&gt;]”.</p>



<p>Syntax: g_authent_logall bool</p>



<h3 class="wp-block-heading" id="g_authent_fwdfile">g_authent_fwdfile</h3>



<p><strong>Use DMail forward files (deprecated – for backward compatibility only)</strong></p>



<p>Allows old style DMail forward files to be read.</p>



<p>Syntax: g_authent_fwdfile bool</p>



<h3 class="wp-block-heading" id="g_authent_timeout">g_authent_timeout</h3>



<p><strong>Timeout for authent response</strong></p>



<p>Timeout for authent response, default 60 seconds.</p>



<p>Syntax: g_authent_timeout int</p>



<h3 class="wp-block-heading" id="g_authent_last_login">g_authent_last_login</h3>



<p><strong>Store users last login time in the database</strong></p>



<p>This setting will cause the authent field ‘last_login’ to be updated when a user logs in. The field is set to a timestamp which is ‘the number of seconds since midnight January 1, 1970’. This field is updated ‘at most’ once every 24 hours. Other features i.e. delete_user_after and disable_smtp_after will look for this field.</p>



<p>Syntax: g_authent_last_login bool</p>



<h3 class="wp-block-heading" id="g_authent_reminders">g_authent_reminders</h3>



<p><strong>Days till we remind user to change password</strong></p>



<p>Days until we remind user to change password.</p>



<p>Syntax: g_authent_reminders int</p>



<h3 class="wp-block-heading" id="g_authent_require">g_authent_require</h3>



<p><strong>Days till we require user to change password</strong></p>



<p>This is the one to use, only requires change in surgeweb, expire password</p>



<p>Syntax: g_authent_require int</p>



<h3 class="wp-block-heading" id="g_authent_enforce">g_authent_enforce</h3>



<p><strong>Days till we prevent user from logging in, NOT RECOMMENDED</strong></p>



<p>Days until we block logins if password is not changed. This setting will annoy your customers but not really achieve anything useful, it shouldn’t be used in most situations</p>



<p>Syntax: g_authent_enforce int</p>



<h3 class="wp-block-heading" id="g_auth_hide">g_auth_hide</h3>



<p><strong>Disable SMTP Authentication</strong></p>



<p>Per default SMTP authentication is enabled. If a user matches this IP range/list they will NOT be shown the ESMTP extension for SMTP authentication. This will usually stop the mail client from prompting the user for authentication. We STRONGLY recommend you do NOT use this feature. It is much better to let users authenticate when sending email.</p>



<p>Syntax: g_auth_hide string</p>



<h3 class="wp-block-heading" id="g_auth_norelay">g_auth_norelay</h3>



<p><strong>orelay-webok-allow-surgeweb-sessions-anyway" &gt;</strong></p>



<p>This means relaying only occurs if g_relay_allow_ip matches</p>



<p>Syntax: g_auth_norelay_webok bool</p>



<h3 class="wp-block-heading" id="g_auth_norelay_webok">g_auth_norelay_webok</h3>



<p><strong>Allow surgeweb sessions anyway.</strong></p>



<p>This means relaying only occurs if g_relay_allow_ip matches</p>



<p>Syntax: g_auth_norelay_webok bool</p>



<h3 class="wp-block-heading" id="g_auth_skipgateway">g_auth_skipgateway</h3>



<p><strong>Skip gateway rules if we get a proxy SMTP auth command</strong></p>



<p>Skip gateway rules if we get a proxy SMTP auth command. This is not for general use. It can be used if you are using SurgeMail in front of another mail server with a wild card gateway to gateway all domains to a back end mail server. Then an authenticated user is a local user trying to send out so the gateway rules are ignored. (this is strongly not recommended)</p>



<p>Syntax: g_auth_skipgateway bool</p>



<h3 class="wp-block-heading" id="g_auth_path">g_auth_path</h3>



<p><strong>Path to nwauth files</strong></p>



<p>Needed for mirroring if using multiauth</p>



<p>Syntax: g_auth_path string</p>



<h3 class="wp-block-heading" id="g_autologin_pop">g_autologin_pop</h3>



<p><strong>Enables WebMail Autologin using POP when on another server</strong></p>



<p>Webmail needs the ability to automatically login to SurgeMail to changes passwords etc. This setting will do this via an extension to the pop protocol allowing WebMail to autologin whilst running on another server. (Normally this is done using a temporary file)</p>



<p>Syntax: g_autologin_pop bool</p>



<h3 class="wp-block-heading" id="g_autologin_file">g_autologin_file</h3>



<p><strong>File to use to share auto login information on NFS based cluster</strong></p>



<p>This allows webmail to autologin when using an nfs based cluster and a load sharing device.</p>



<p>Syntax: g_autologin_file string</p>



<h3 class="wp-block-heading" id="g_autologin_imap_disable">g_autologin_imap_disable</h3>



<p><strong>Disable IMAP based autologins</strong></p>



<p>IMAP autologins allow autologin to surgeweb.</p>



<p>Syntax: g_autologin_imap_disable bool</p>



<h3 class="wp-block-heading" id="g_badfrom_noip">g_badfrom_noip</h3>



<p><strong>Check envelope from domain exists and is a valid IP number</strong></p>



<p>Check envelope from domain exists and is a valid ip number, if not bounce message.</p>



<p>Syntax: g_badfrom_noip bool</p>



<h3 class="wp-block-heading" id="g_badfrom_noip_temp">g_badfrom_noip_temp</h3>



<p><strong>Makes g_badfrom_noip return a temporary error instead of a 501 error</strong></p>



<p>Use g_verify_mx_skip to bypass/whitelist ip addresses from this check</p>



<p>Syntax: g_badfrom_noip_temp bool</p>



<h3 class="wp-block-heading" id="g_badfrom_check">g_badfrom_check</h3>



<p><strong>Check if ‘from’ envelope can be delivered to</strong></p>



<p>If this is set to “true” then SurgeMail will connect back to the envelope ‘from’ address and check that the address is valid, a cache is used to improve performance, if it cannot connect then the message is bounced as probable spam. It’s nicer to use the following setting “g_badfrom_stamp” as well, then if SurgeMail cannot connect back or the user is invalid then a header is added to indicate this, and our SmiteSpam rules will use this to increase the spam weighting.<br><br>You can use g_spam_allow to exempt an IP from this check as well as g_badfrom_whitelist for a domain. Please note that by default SurgeMail uses a blank mail from to do its check.<br>MAIL FROM: &lt;&gt;<br>Some servers might reject this, though they shouldn’t because its a standard bounce, however if they do you can use&nbsp;<a href="g_badfrom_from">g_badfrom_from</a>&nbsp;to set a mail from address to be used for this check.</p>



<p>Syntax: g_badfrom_check bool</p>



<h3 class="wp-block-heading" id="g_badfrom_stamp">g_badfrom_stamp</h3>



<p><strong>If ‘g_badfrom_check’ is bad then stamp a header on the message</strong></p>



<p>g_badfrom_check must also be set to true. If this is set to “true” then SurgeMail will connect back to the envelope ‘from’ address and check that the address is valid, a cache is used to improve performance, if it cannot connect then a header is added to indicate this, and our SmiteSpam rules will use this to increase the spam weighting.</p>



<p>Syntax: g_badfrom_stamp bool</p>



<h3 class="wp-block-heading" id="g_badfrom_badmx">g_badfrom_badmx</h3>



<p><strong>Drop message if this MX</strong></p>



<p>If mx host is one of these addresses then drop the message, it’s definitely spam (e.g. 127.*).</p>



<p>Syntax: g_badfrom_badmx string</p>



<h3 class="wp-block-heading" id="g_badfrom_from">g_badfrom_from</h3>



<p><strong>Mail from account for g_badfrom_check</strong></p>



<p>From to use when doing the g_badfrom_check check, not normally needed, if set must be set to valid account.</p>



<p>Syntax: g_badfrom_from string</p>



<h3 class="wp-block-heading" id="g_badfrom_whitelist">g_badfrom_whitelist</h3>



<p><strong>Whitelist of domains to skip from checks</strong></p>



<p>Whitelist of “from” address domains to skip g_badfrom_* checks.</p>



<p>eg.<br>g_badfrom_whitelist “specialdomain.com”</p>



<p>Syntax: g_badfrom_whitelist string</p>



<h3 class="wp-block-heading" id="g_ban_helo">g_ban_helo</h3>



<p><strong>Ban any machine that gives a matching ‘helo’ string</strong></p>



<p>This is a simple spam protection system to block known spam/problem users based on the ‘helo’ name they send to your system. This name is recorded in the ‘received’ header along with the IP address. This name is very easy to ‘fake’ so is not a high security level of protection, but it is simple for stopping stupid robots etc, that have gone insane.</p>



<p>Example: *junkmail.com&nbsp;</p>



<p>Syntax: g_ban_helo string</p>



<h3 class="wp-block-heading" id="g_ban_from">g_ban_from</h3>



<p><strong>Ban any matching MAIL FROM: envelope</strong></p>



<p>Same as ‘ban_helo’ but applies to the from (return address) part of the mail envelope. This is NOT the same as the from/sender header in the message itself!!! This equates to the ‘Return-path:’ header that the mail server adds.&nbsp;</p>



<p>Syntax: g_ban_from string</p>



<h3 class="wp-block-heading" id="g_ban_rcpt">g_ban_rcpt</h3>



<p><strong>Ban any matching RCPT TO: envelope</strong></p>



<p>Same as ‘ban_helo’ but applies to the recipient part of the envelope (destination users) this is NOT the same as the ‘To:’ header in the message itself!!! This can sometimes be used to block really simple spamming programs that always send to the same invalid users.&nbsp;</p>



<p>Syntax: g_ban_rcpt string</p>



<h3 class="wp-block-heading" id="g_ban_blackhole">g_ban_blackhole</h3>



<p><strong>Leave connected but reject all recipients without looking them up</strong></p>



<p>Leave connected but reject all recipients without looking them up. This is good of dealing with high volume spammers without wasting resources doing user lookups.&nbsp;</p>



<p>Syntax: g_ban_blackhole bool</p>



<h3 class="wp-block-heading" id="g_bind_byfromip">g_bind_byfromip</h3>



<p><strong>Bind outgoing SMTP connections to the specified IP based on the sender IP</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_bind_byfromip fromip=string bindip=string</p>



<h3 class="wp-block-heading" id="g_bind_to">g_bind_to</h3>



<p><strong>Bind outgoing SMTP if to address matches</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_bind_to string</p>



<h3 class="wp-block-heading" id="g_bind_to_ip">g_bind_to_ip</h3>



<p><strong>The address to bind to</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_bind_to_ip string</p>



<h3 class="wp-block-heading" id="g_bind_to_name">g_bind_to_name</h3>



<p><strong>The name to use in the ehlo</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_bind_to_name string</p>



<h3 class="wp-block-heading" id="g_bind_out">g_bind_out</h3>



<p><strong>Bind outgoing smtp connections to IP</strong></p>



<p>Bind outgoing smtp connections to this IP number.&nbsp;</p>



<p>Syntax: g_bind_out string</p>



<h3 class="wp-block-heading" id="g_bind_from">g_bind_from</h3>



<p><strong>Bind outgoing SMTP connections based on ‘from’ envelope</strong></p>



<p>Bind outgoing SMTP connections based on the IP of the virtual domain in ‘from’ envelope. This is only useful if you are using IP based virtual domains.&nbsp;</p>



<p>Syntax: g_bind_from bool</p>



<h3 class="wp-block-heading" id="g_bind_incoming">g_bind_incoming</h3>



<p><strong>Bind outgoing SMTP connections based on incoming ip address</strong></p>



<p>So if the incomnig mail came in on interface address 1.2.3.4 then that same address is used to send the email</p>



<p>Syntax: g_bind_incoming bool</p>



<h3 class="wp-block-heading" id="g_bind_in_always">g_bind_in_always</h3>



<p><strong>Bind on incoming in preference to g_bind_from</strong></p>



<p>So if the incomnig mail came in on interface address 1.2.3.4 then that same address is used to send the email</p>



<p>Syntax: g_bind_in_always bool</p>



<h3 class="wp-block-heading" id="g_bind_authent_default">g_bind_authent_default</h3>



<p><strong>Bind to default if authenticated</strong></p>



<p>So authenticated users get the default binding not g_bind_byfromip</p>



<p>Syntax: g_bind_authent_default bool</p>



<h3 class="wp-block-heading" id="g_black_above">g_black_above</h3>



<p><strong>Level for spam detection for g_black_count</strong></p>



<p>Level for spam detection for blacklisting IP number e.g. 7.&nbsp;</p>



<p>Syntax: g_black_above int</p>



<h3 class="wp-block-heading" id="g_black_count">g_black_count</h3>



<p><strong>Blacklist sender IP based on spam sent</strong></p>



<p>Number of spam in a row before IP blacklisted for 30 minutes eg: 30 (default = disabled)</p>



<p>Syntax: g_black_count int</p>



<h3 class="wp-block-heading" id="g_black_to">g_black_to</h3>



<p><strong>Blacklist sender IP based on catch addresses</strong></p>



<p>Blacklist senders IP address for 30 minutes if they deliver to these spam catch email addresses.</p>



<p>eg. g_black_to “smith@mydomain.com,catcher@myotherdomain.com”</p>



<p>Syntax: g_black_to string</p>



<h3 class="wp-block-heading" id="g_black_isspam">g_black_isspam</h3>



<p><strong>Blacklist ip address for any spam training event</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_black_isspam bool</p>



<h3 class="wp-block-heading" id="g_black_nbad">g_black_nbad</h3>



<p><strong>Blacklist ip address if this many bad recipients in a row (e.g. 8)</strong></p>



<p>There is no default. The ip is blacklisted for the time specified by G_MAX_BAD_IP_TIME or one day. Whitelist with G_BLACK_WHITE for ip address or from matches. This limit is related to a single connection, not all errors from an ip over time.</p>



<p>Syntax: g_black_nbad int</p>



<h3 class="wp-block-heading" id="g_black_white">g_black_white</h3>



<p><strong>Whitelist to prevent blacklisting, e.g. 1.2.3.*,mail*.aol.com</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_black_white string</p>



<h3 class="wp-block-heading" id="g_blogs_enable">g_blogs_enable</h3>



<p><strong>Surgemail blogs</strong></p>



<p>Allow users to create blogs</p>



<p>Syntax: g_blogs_enable bool</p>



<h3 class="wp-block-heading" id="g_blogs_maximum_image_width">g_blogs_maximum_image_width</h3>



<p><strong>Default maximum image width</strong></p>



<p>Images larger than this that are posted to blogs are scaled down, default is 390, per blog setting can overide this.</p>



<p>Syntax: g_blogs_maximum_image_width int</p>



<h3 class="wp-block-heading" id="g_blogs_maximum_image_size">g_blogs_maximum_image_size</h3>



<p><strong>Default maximum image size</strong></p>



<p>Images larger than this (in largest dimension) that are posted to blogs are scaled down, default is 390, per blog setting can overide this.</p>



<p>Syntax: g_blogs_maximum_image_size int</p>



<h3 class="wp-block-heading" id="g_blogs_maximum_items_in_top_page">g_blogs_maximum_items_in_top_page</h3>



<p><strong>Maximum number of items on the top blog page</strong></p>



<p>Maximum number of post bodies to appear on a blog top page, default is 10</p>



<p>Syntax: g_blogs_maximum_items_in_top_page int</p>



<h3 class="wp-block-heading" id="g_blogs_max_per_user">g_blogs_max_per_user</h3>



<p><strong>Maximum number of blogs per user</strong></p>



<p>Maximum number of blogs per user, default is 5</p>



<p>Syntax: g_blogs_max_per_user int</p>



<h3 class="wp-block-heading" id="g_blogs_default_template">g_blogs_default_template</h3>



<p><strong>Default template set that is used by newly created blogs</strong></p>



<p>This setting can have a value of the name of any directory in the SurgeMail blogtpl directory</p>



<p>Syntax: g_blogs_default_template string</p>



<h3 class="wp-block-heading" id="g_blogs_use_sub_domains">g_blogs_use_sub_domains</h3>



<p><strong>Make blogs accessible at http://blog_name.domain/</strong></p>



<p>If you’re DNS entry supports it, turn on this setting to make blogs accessible at http://blog_name.blogs.domain/ instead of http://domain/blogs/blog_name</p>



<p>Syntax: g_blogs_use_sub_domains bool</p>



<h3 class="wp-block-heading" id="g_blogs_sub_domain_prefix">g_blogs_sub_domain_prefix</h3>



<p><strong>Prefix to use instead of blogs. for blog subdomains. use ! to have no prefix.</strong></p>



<p>Experimental feature do not use</p>



<p>Syntax: g_blogs_sub_domain_prefix string</p>



<h3 class="wp-block-heading" id="g_blogs_not_unique">g_blogs_not_unique</h3>



<p><strong>Allow the same blog name in multiple domains</strong></p>



<p>If set you can create different blogs with the same name in different virtual domains, this is not recommended.</p>



<p>Syntax: g_blogs_not_unique bool</p>



<h3 class="wp-block-heading" id="g_blogs_not_global">g_blogs_not_global</h3>



<p><strong>Only allows access to a blog onthe domain it is defined on</strong></p>



<p>Only allows access to a blog on the domain it is defined on, this is not recommended. (probably want to use g_blogs_not_unique, g_blogs_domonly too)</p>



<p>Syntax: g_blogs_not_global bool</p>



<h3 class="wp-block-heading" id="g_blogs_no_suffix">g_blogs_no_suffix</h3>



<p><strong>Shortens URL, url_blogs must be defined for each domain</strong></p>



<p>This shortens http://a.com/blog/juggling to http:/a.com/juggling, but does require that you define a specific name for the blogs in the domain based url_blogs setting</p>



<p>Syntax: g_blogs_no_suffix bool</p>



<h3 class="wp-block-heading" id="g_blogs_ping">g_blogs_ping</h3>



<p><strong>Sites to ping on each post</strong></p>



<p>Host and path to ping on each blog post. eg: host=rpc.weblog.com path=/RPC2</p>



<p>Syntax: g_blogs_ping host=string path=string</p>



<h3 class="wp-block-heading" id="g_blogs_domonly">g_blogs_domonly</h3>



<p><strong>Only list blogs in a users domain</strong></p>



<p>By default all blogs in all domains are listed/shown to the user. This setting causes it to only list blogs in the users domain.</p>



<p>Syntax: g_blogs_domonly bool</p>



<h3 class="wp-block-heading" id="g_blogs_image_optional">g_blogs_image_optional</h3>



<p><strong>Allow users to specify if image verification is required for comments</strong></p>



<p>By default image verification is now required, this prevents spammers from abusing the many ‘test’ blogs set up by your users.</p>



<p>Syntax: g_blogs_image_optional bool</p>



<h3 class="wp-block-heading" id="g_blogs_allow_links">g_blogs_allow_links</h3>



<p><strong>Allow users to post comments that contain urls</strong></p>



<p>Due to widespread abuse of blogs this is not recommended.</p>



<p>Syntax: g_blogs_allow_links bool</p>



<h3 class="wp-block-heading" id="g_blogs_cleanup_links">g_blogs_cleanup_links</h3>



<p><strong>Delete existing posts that contain urls</strong></p>



<p>This setting will help cleanup existing spam postings to your users blogs.</p>



<p>Syntax: g_blogs_cleanup_links bool</p>



<h3 class="wp-block-heading" id="g_blogs_comment_rev">g_blogs_comment_rev</h3>



<p><strong>Show blog comments newest first</strong></p>



<p>Helps if there are lots of comments, this is a global setting not per blog..</p>



<p>Syntax: g_blogs_comment_rev bool</p>



<h3 class="wp-block-heading" id="g_blogs_https">g_blogs_https</h3>



<p><strong>Use https for blog urls</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_blogs_https bool</p>



<h3 class="wp-block-heading" id="g_bomb_max">g_bomb_max</h3>



<p><strong>Max messages to a single address per hour</strong></p>



<p>Simple system to prevent intentional or more likely, accidental mail loops or mail bombs where thousands of Emails are sent to a single user. A setting in the range of 100-1000 is generally good depending on your sensitivity to incorrectly blocking real mail.&nbsp; We suggest 1000 is a good setting if you are unsure.</p>



<p>This counts the messages from a single IP address to a single recipient. If a single IP sends more than this many messages to any single recipient then they will be tarpitted (slowed down and rejected).</p>



<p>Use spam_allow ip.address.list to over-ride the limit for known local systems that might exceed this limit (unlikely anything will).</p>



<p>Syntax: g_bomb_max int</p>



<h3 class="wp-block-heading" id="g_bomb_max_from">g_bomb_max_from</h3>



<p><strong>Max msgs from a single email address/hour</strong></p>



<p>Max msgs from a single email address/hour.</p>



<p>Syntax: g_bomb_max_from int</p>



<h3 class="wp-block-heading" id="g_bomb_white">g_bomb_white</h3>



<p><strong>don’t apply bomb_max limit if to address matches</strong></p>



<p>Useful for robots etc that expect high volume</p>



<p>Syntax: g_bomb_white string</p>



<h3 class="wp-block-heading" id="g_bounce_disable">g_bounce_disable</h3>



<p><strong>Bounce Disable</strong></p>



<p>Disable all bounces. This is particularly useful when under spam attack. This is for outgoing bounces it stops SurgeMail generating bounces it won’t affect incomming bounces from other servers.</p>



<p>example:<br>g_bounce_disable “true”</p>



<p>Syntax: g_bounce_disable bool</p>



<h3 class="wp-block-heading" id="g_bounce_redirect">g_bounce_redirect</h3>



<p><strong>Send all bounces to a local address</strong></p>



<p>This can be used to avoid ‘back scatter’ which can get your server listed in various black listed sites. In general your server should not generate bounces so if you get lots you may find changing config settings can stop them. Note this only redirects bounces to non local recipients, so your users sending outgoing mail will still get their own bounce messages.</p>



<p>Syntax: g_bounce_redirect string</p>



<h3 class="wp-block-heading" id="g_bounce_reject">g_bounce_reject</h3>



<p><strong>Reject bounces by ip address from known dumb mail servers</strong></p>



<p>Some mail servers (exchange) will accept email, then bounce it, this is now considered a ‘crime’ and will get your server black listed, so if you have surgemail running as a gateway for such servers you can tell it to reject any bounce that server is foolish enough to send you.</p>



<p>Syntax: g_bounce_reject string</p>



<h3 class="wp-block-heading" id="g_bounce_limit">g_bounce_limit</h3>



<p><strong>Max size of bounce messages</strong></p>



<p>Max size in bytes of message to send back as bounce message is truncated if necessary.</p>



<p>Syntax: g_bounce_limit int</p>



<h3 class="wp-block-heading" id="g_bounce_some_stop">g_bounce_some_stop</h3>



<p><strong>Disables locally generated bounces for partial message failure – NEVER use this!</strong></p>



<p>This can decrease back scatter, but it has other bad effects, it can result in duplicate messasges arriving. Never never use this setting</p>



<p>Syntax: g_bounce_some_stop bool</p>



<h3 class="wp-block-heading" id="g_bounce_nodrop">g_bounce_nodrop</h3>



<p><strong>Enables locally generated bounces for non local users</strong></p>



<p>This setting makes bounces occur normally, the reason bounces are normally dropped for non local users is that they are almost always spam bouncing off another server due to forwarding settings, and as such sending a bounce email will get your server black listed, so we decided it was best to drop them by default since they are rarely useful. Turn this setting on at your own risk :-). Instead use g_bounce_to to list domains that it is safe to bounce to.</p>



<p>Syntax: g_bounce_nodrop bool</p>



<h3 class="wp-block-heading" id="g_bounce_to">g_bounce_to</h3>



<p><strong>Domains to treat as local and send bounces to</strong></p>



<p>This setting makes bounces occur normally, the reason bounces are normally dropped for non local users is that they are almost always spam bouncing off another server due to forwarding settings, and as such sending a bounce email will get your server black listed, so we decided it was best to drop them by default since they are rarely useful. Turn this setting on at your own risk :-). Instead use g_bounce_to to list domains that it is safe to bounce to. e.g. *@a.com,*@b.com</p>



<p>Syntax: g_bounce_to string</p>



<h3 class="wp-block-heading" id="g_warning_to">g_warning_to</h3>



<p><strong>Addresses to treat as local and send warning bounces to</strong></p>



<p>This may cause back scatter to use with caution</p>



<p>Syntax: g_warning_to string</p>



<h3 class="wp-block-heading" id="g_bounce_to_recipient">g_bounce_to_recipient</h3>



<p><strong>Bounce suregewall failure to the recipient</strong></p>



<p>This can help prevent message loss in rare cases where quota/size limits prevent a delivery from surgewall server to destination server.</p>



<p>Syntax: g_bounce_to_recipient bool</p>



<h3 class="wp-block-heading" id="g_bounce_bind">g_bounce_bind</h3>



<p><strong>Use a specific ip address for outgoing bounces</strong></p>



<p>Some RBL sites blacklist machines for sending bounces, which is probably a good thing. But even with spf running your server may occasionally send a bounce to a forged address, and so you can use an alternate ip address for these bounces to avoid blacklisting your main mail server address. First you must assign the ip address to your network interface etc</p>



<p>Syntax: g_bounce_bind string</p>



<h3 class="wp-block-heading" id="g_bounce_suggest">g_bounce_suggest</h3>



<p><strong>Send bounces to postmaster if spf cannot be verified</strong></p>



<p>This may help stop black listing for backscatter while still alerting the sending domain admin that one of their users emails to your server bounced, You can specify a template file suggest.eml if you don’t like the default message suggesting the postmaster add spf records for their domain</p>



<p>Syntax: g_bounce_suggest bool</p>



<h3 class="wp-block-heading" id="g_bounce_paranoid">g_bounce_paranoid</h3>



<p><strong>Prevent external bounces going through surgemail</strong></p>



<p>This can help stop back scatter from another server going through your server to an external domain</p>



<p>Syntax: g_bounce_paranoid bool</p>



<h3 class="wp-block-heading" id="g_bounce_safe">g_bounce_safe</h3>



<p><strong>Only send bounces to local domains</strong></p>



<p>This may result in lost messages, but can also avoid backscatter issues</p>



<p>Syntax: g_bounce_safe bool</p>



<h3 class="wp-block-heading" id="g_block_files">g_block_files</h3>



<p><strong>Block certain attachments</strong></p>



<p>Allow you to block any mail with certain files attached.&nbsp;</p>



<p>g_block_files “*.exe,*.cmd,*.com”</p>



<p>Syntax: g_block_files string</p>



<h3 class="wp-block-heading" id="g_block_skip">g_block_skip</h3>



<p><strong>From or To address to bypass g_block_files</strong></p>



<p>Some users will need to send various attachments, these users are excempt to the g_block_files rule</p>



<p>Syntax: g_block_skip string</p>



<h3 class="wp-block-heading" id="g_block_longok">g_block_longok</h3>



<p><strong>If true allow long file names (more than 180 char)</strong></p>



<p>By default files names over this length are ALWAYS blocked if g_block_files is used, in rare situations these are not just viruses attempting to get around the filter.</p>



<p>Syntax: g_block_longok bool</p>



<h3 class="wp-block-heading" id="g_breakin_enable">g_breakin_enable</h3>



<p><strong>Stop multiple ip logins for one account in a few seconds</strong></p>



<p>When a hacker guesses a password on your system they will often send outgoing spam to your server from multiple ip addresses, Surgemail detects this and emails the administrator when it occurs, use g_breakin_white to enable specific users who need to do this (this is very unusual though)</p>



<p>Syntax: g_breakin_enable bool</p>



<h3 class="wp-block-heading" id="g_breakin_short">g_breakin_short</h3>



<p><strong>Match on 1.2.3.* for ip addresses, helps with google sending</strong></p>



<p>When a hacker guesses a password on your system they will often send outgoing spam to your server from multiple ip addresses, Surgemail detects this and emails the administrator when it occurs, use g_breakin_white to enable specific users who need to do this (this is very unusual though)</p>



<p>Syntax: g_breakin_short bool</p>



<h3 class="wp-block-heading" id="g_breakin_white">g_breakin_white</h3>



<p><strong>Email addresses that can send concurrently from mulltiple ips (use * to allow everyone)</strong></p>



<p>When a hacker guesses a password on your system they will often send outgoing spam to your server from multiple ip addresses, Surgemail detects this and emails the administrator when it occurs, use this setting to enable specific users who need to do this (this is very unusual though), it also accepts wild cards, e.g. * if you wish to disable teh feature. A list is given as “user@domin,user2@domain2”</p>



<p>Syntax: g_breakin_white string</p>



<h3 class="wp-block-heading" id="g_breakin_n">g_breakin_n</h3>



<p><strong>Number of different ip’s that trigger a lockout, default is 8</strong></p>



<p>Only lower numbers are valid.</p>



<p>Syntax: g_breakin_n int</p>



<h3 class="wp-block-heading" id="g_breakin_window">g_breakin_window</h3>



<p><strong>Window in seconds, default is 300</strong></p>



<p>The window in which the multiple logins are counted</p>



<p>Syntax: g_breakin_window string</p>



<h3 class="wp-block-heading" id="g_byname_old">g_byname_old</h3>



<p><strong>Enable old slow domain lookup functions</strong></p>



<p>This setting should not be needed.</p>



<p>Syntax: g_byname_old bool</p>



<h3 class="wp-block-heading" id="g_convert_percent">g_convert_percent</h3>



<p><strong>Convert % signs top @ in recipient addresses</strong></p>



<p>Some Spam tests send mail user%spamdomain.com@localdomain.com to see if a server is an open relay. If a default address is set up for the local domain this will be delivered to this local address and the test assumes the mail server is an open relay. This setting prevents this.&nbsp;</p>



<p>Syntax: g_convert_percent bool</p>



<h3 class="wp-block-heading" id="g_crash_normal">g_crash_normal</h3>



<p><strong>Crash without catching exceptions</strong></p>



<p>Crash without catching signals 10,11. In particular this will generate correct core files on FreeBSD systems.</p>



<p>Syntax: g_crash_normal bool</p>



<h3 class="wp-block-heading" id="g_crash_simple">g_crash_simple</h3>



<p><strong>Crash simpler for solaris to avoid deadlock situation</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_crash_simple bool</p>



<h3 class="wp-block-heading" id="g_crash_nomini">g_crash_nomini</h3>



<p><strong>Crash without minidump on windows</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_crash_nomini bool</p>



<h3 class="wp-block-heading" id="g_cid_skip_to">g_cid_skip_to</h3>



<p><strong>Skip CID score, good for lawyers etc</strong></p>



<p>Some users will trigger CID matches due to the nature of their business (accountants/lawyers) for these people you may want to list them here. CID is content matching, usually scams which often use legal language.</p>



<p>Syntax: g_cid_skip_to string</p>



<h3 class="wp-block-heading" id="g_mailstatus_message">g_mailstatus_message</h3>



<p><strong>Error message to give when mailstatus is set to specified state</strong></p>



<p>This allows you to specify the error message given to the user when they are set to certain states, you may use other authent fields in the message, for example:</p>



<p>g_mailstatus_message state=”payup” message=”Payment is due $full_name$, please pay here: http://your.site/path/file.htm”</p>



<p>Syntax: g_mailstatus_message state=string message=string</p>



<h3 class="wp-block-heading" id="g_manager_username">g_manager_username</h3>



<p><strong>Global domain managers username (for web based domain administration)</strong></p>



<p>Specifies the local users which have manager rights for all domains. These users can login to the user self management interface and will recieve special domain manager options. This setting works slightly different to the domain level ‘manager_username’ setting in that if you specify an account without the @domain part i.e. ‘admin’ it gives all admin users in all domains domain rights over all domains.</p>



<p>Syntax: g_manager_username string</p>



<h3 class="wp-block-heading" id="g_mirror_host">g_mirror_host</h3>



<p><strong>Mirror host&nbsp;</strong></p>



<p>This unique SurgeMail feature allows you to setup two identical mail servers across a local or widearea network. The waiting mail messages &amp; 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.&nbsp;</p>



<p><a href="mirror.htm">See this page for Mirror overview</a></p>



<p>Syntax: g_mirror_host string</p>



<h3 class="wp-block-heading" id="g_mirror_nossl">g_mirror_nossl</h3>



<p><strong>Disable SSL for mirror protocol connection</strong></p>



<p>This is best turned off unless your servers are talking over a wide area untrusted network.&nbsp;</p>



<p>Syntax: g_mirror_nossl bool</p>



<h3 class="wp-block-heading" id="g_mirror_nwauth">g_mirror_nwauth</h3>



<p><strong>Mirror NWAuth data files (deprecated – for backward compatibility only)</strong></p>



<p>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.</p>



<p>Syntax: g_mirror_nwauth bool</p>



<h3 class="wp-block-heading" id="g_mirror_nwauth_always">g_mirror_nwauth_always</h3>



<p><strong>Mirror nwauth database files</strong></p>



<p>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.</p>



<p>Syntax: g_mirror_nwauth_always bool</p>



<h3 class="wp-block-heading" id="g_mirror_mode">g_mirror_mode</h3>



<p><strong>Master / slave mirror system</strong></p>



<p>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)</p>



<p>Syntax: g_mirror_mode string</p>



<h3 class="wp-block-heading" id="g_mirror_secret">g_mirror_secret</h3>



<p><strong>Mirror secret shared password</strong></p>



<p>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”&nbsp;</p>



<p>Syntax: g_mirror_secret string</p>



<h3 class="wp-block-heading" id="g_mirror_prune_age">g_mirror_prune_age</h3>



<p><strong>Mirror minimum age for items to be pruned during sync_prune</strong></p>



<p>Mirror minimum age for items to be pruned during sync_prune, default 14 days.&nbsp;</p>



<p>Syntax: g_mirror_prune_age int</p>



<h3 class="wp-block-heading" id="g_mirror_threads">g_mirror_threads</h3>



<p><strong>Max threads we can use during resync_fast, default 6</strong></p>



<p>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!</p>



<p>Syntax: g_mirror_threads int</p>



<h3 class="wp-block-heading" id="g_mirror_live">g_mirror_live</h3>



<p><strong>Mirror: Send incoming messages immediately</strong></p>



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



<p>Syntax: g_mirror_live bool</p>



<h3 class="wp-block-heading" id="g_mirror_live_max">g_mirror_live_max</h3>



<p><strong>Limit size of mirror_live default 60k</strong></p>



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



<p>Syntax: g_mirror_live_max int</p>



<h3 class="wp-block-heading" id="g_mirror_nsend">g_mirror_nsend</h3>



<p><strong>Sending threads to use, default 8</strong></p>



<p>Sending threads for normal queue</p>



<p>Syntax: g_mirror_nsend int</p>



<h3 class="wp-block-heading" id="g_mirror_config">g_mirror_config</h3>



<p><strong>Mirror surgemail.ini</strong></p>



<p>Syntax: g_mirror_config “true/false”</p>



<p>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:</p>



<p><a href="#g_mirror_config_except">g_mirror_config_except</a>&nbsp;“setting,setting,setting”</p>



<p>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</p>



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



<p>Syntax: g_mirror_config bool</p>



<h3 class="wp-block-heading" id="g_mirror_config_except">g_mirror_config_except</h3>



<p><strong>Mirror surgemail.ini</strong></p>



<p>Syntax: g_mirror_config “setting,setting,setting”</p>



<p>This will tell the server not to import the specified settings from the other mirror.</p>



<p>Example:<br>g_mirror_except “g_spam_allow”</p>



<p>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&nbsp;<a href="#g_mirror_config">g_mirror_config</a>.</p>



<p>In addition the mailbox_path setting is not mirrored,&nbsp;<strong>unless</strong>, 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.</p>



<p>[recieving server]<br>g_mailbox_path “c:\surgemail\mbox”<br>mailbox_path “c:\surgemail\mbox\domain”</p>



<p>[sending server]<br>g_mailbox_path “d:\surgemail\mbox”<br>mailbox_path “c:\surgemail\mbox\domain_moved_here”</p>



<p>[result on recieving server]<br>g_mailbox_path “c:\surgemail\mbox”<br>mailbox_path “c:\surgemail\mbox\domain_moved_here”</p>



<p>Syntax: g_mirror_config_except string</p>



<h3 class="wp-block-heading" id="g_mirror_trash">g_mirror_trash</h3>



<p><strong>Normally on a resync the trash folder is ignored.</strong></p>



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



<p>Syntax: g_mirror_trash bool</p>



<h3 class="wp-block-heading" id="g_mirror_debug">g_mirror_debug</h3>



<p><strong>Log more info to mirror log.</strong></p>



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



<p>Syntax: g_mirror_debug bool</p>



<h3 class="wp-block-heading" id="g_mirror_debug3">g_mirror_debug3</h3>



<p><strong>NEVER USE, MAKES MIRROR FAIL.</strong></p>



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



<p>Syntax: g_mirror_debug3 bool</p>



<h3 class="wp-block-heading" id="g_mirror_repair">g_mirror_repair</h3>



<p><strong>Run resync_prune once per month, only set on master, TURN OFF DURING FAILURES</strong></p>



<p>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.</p>



<p>Syntax: g_mirror_repair bool</p>



<h3 class="wp-block-heading" id="g_mirror_email">g_mirror_email</h3>



<p><strong>Email manager list of fixes sent</strong></p>



<p>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.</p>



<p>Syntax: g_mirror_email bool</p>



<h3 class="wp-block-heading" id="g_mirror_max">g_mirror_max</h3>



<p><strong>Max items in one folder to mirror, default 160k currently</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_mirror_max int</p>



<h3 class="wp-block-heading" id="g_mirror_lock">g_mirror_lock</h3>



<p><strong>Lock master during slave bursts</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_mirror_lock bool</p>



<h3 class="wp-block-heading" id="g_mirror_others">g_mirror_others</h3>



<p><strong>BETA Other hosts, for 3,4 host mirrors,(DO NOT USE)</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_mirror_others string</p>



<h3 class="wp-block-heading" id="g_mirror_resync_inbox">g_mirror_resync_inbox</h3>



<p><strong>BETA Resync inbox for active users once a day</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_mirror_resync_inbox bool</p>



<h3 class="wp-block-heading" id="g_mtasts">g_mtasts</h3>



<p><strong>Enable MTA-STS ssl/tls rules</strong></p>



<p>Use DNS entries to discover if receiving server should have a signed SSL certificate</p>



<p>Syntax: g_mtasts bool</p>



<h3 class="wp-block-heading" id="g_mtasts_white">g_mtasts_white</h3>



<p><strong>Domains to ignore MTA-STS rules</strong></p>



<p>Whitelist for destination domains we should just send to anyway</p>



<p>Syntax: g_mtasts_white string</p>



<h3 class="wp-block-heading" id="g_mtasts_report">g_mtasts_report</h3>



<p><strong>Alert manager on MTASTS failures</strong></p>



<p>Most failures will be due to something other than real hackers, so this alert helps you resolve issues, and add whitelist rules g_mtasts_white settings for problem domains</p>



<p>Syntax: g_mtasts_report bool</p>



<h3 class="wp-block-heading" id="g_callhome_disable">g_callhome_disable</h3>



<p><strong>Disable misc features that reference netwinsite</strong></p>



<p>Useful if you are paranoid about information <img src="https://s.w.org/images/core/emoji/15.0.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<p>Syntax: g_callhome_disable bool</p>



<h3 class="wp-block-heading" id="g_con_peruser">g_con_peruser</h3>



<p><strong>Connection limit per user for imap/pop. Set above 20</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_con_peruser int</p>



<h3 class="wp-block-heading" id="g_con_peruser_except">g_con_peruser_except</h3>



<p><strong>Exception users to g_con_peruser, include domain name</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_con_peruser_except string</p>



<h3 class="wp-block-heading" id="g_con_perip">g_con_perip</h3>



<p><strong>Connections per IP</strong></p>



<p>Maximum number of connections allowed per IP address. Primarily this is used to prevent simple denial of service attacks where one user could otherwise use up all the channels your system can support and then do nothing with them.&nbsp;</p>



<p>Syntax: g_con_perip int</p>



<h3 class="wp-block-heading" id="g_con_gateway">g_con_gateway</h3>



<p><strong>Connection limit per ip also applies to gateways</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_con_gateway int</p>



<h3 class="wp-block-heading" id="g_con_perip_except">g_con_perip_except</h3>



<p><strong>Connections per IP exception</strong></p>



<p>IP list of exception addresses to g_con_perip.&nbsp;</p>



<p>Syntax: g_con_perip_except string</p>



<h3 class="wp-block-heading" id="g_con_persubnet">g_con_persubnet</h3>



<p><strong>Maximum concurrent connections per subnet</strong></p>



<p>Maximum number of concurrent connections per subnet. This limits concurrent connections from a sub net, great for automatically stopping professional spammers who use multiple addresses. A typical setting might be 20. Subnet is /24.</p>



<p>Syntax: g_con_persubnet int</p>



<h3 class="wp-block-heading" id="g_date_add_utc">g_date_add_utc</h3>



<p><strong>Add UTC if date header is missing it</strong></p>



<p>Add timezone if date header is missing one</p>



<p>Syntax: g_date_add_utc bool</p>



<h3 class="wp-block-heading" id="g_dbabble_smtp_port">g_dbabble_smtp_port</h3>



<p><strong>DBabble SMTP port (do not manually change this setting – it should be set from the DBabble section of the web admin interface only)</strong></p>



<p>This setting specifies the port that DBabble listens on. DBabble looks at surgemail.ini and if it sees this setting, overrides it’s own setting with this value. When you save changes to this setting from within the SurgeMail DBabble admin interface, SurgeMail automatically sets appropriate values for the g_redirect_iflocal and g_gateway settings.</p>



<p>Syntax: g_dbabble_smtp_port int</p>



<h3 class="wp-block-heading" id="g_dbabble_smtp_prefix">g_dbabble_smtp_prefix</h3>



<p><strong>DBabble SMTP prefix (do not manually change this setting – it should be set from the DBabble section of the web admin interface only)</strong></p>



<p>This setting is used in conjunction with the dbabble_smtp_port setting to forward all mail with the specified prefix on to DBabble.</p>



<p>Syntax: g_dbabble_smtp_prefix string</p>



<h3 class="wp-block-heading" id="g_dbabble_links">g_dbabble_links</h3>



<p><strong>Add web links to DBabble from other web interfaces (and vice versa)</strong></p>



<p>This causes links to appear in the DBabble interface to switch to using WebMail (and SurgePlus if you have the g_surgeplus_links setting on).</p>



<p>Syntax: g_dbabble_links bool</p>



<h3 class="wp-block-heading" id="g_debug_block">g_debug_block</h3>



<p><strong>For catching bugs in block file processsing</strong></p>



<p>For catching bugs in block file processsing.</p>



<p>Syntax: g_debug_block bool</p>



<h3 class="wp-block-heading" id="g_debug_crt">g_debug_crt</h3>



<p><strong>Some CRT debugging on windows, do not use</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_debug_crt bool</p>



<h3 class="wp-block-heading" id="g_debug_ini">g_debug_ini</h3>



<p><strong>Debugging, don’t use this</strong></p>



<p>This is a temp setting used for testing</p>



<p>Syntax: g_debug_ini bool</p>



<h3 class="wp-block-heading" id="g_debug_vanished">g_debug_vanished</h3>



<p><strong>Name of file to check for, if file vanishes, crash</strong></p>



<p>This is for tracking a particular bug, not for general use</p>



<p>Syntax: g_debug_vanished string</p>



<h3 class="wp-block-heading" id="g_debug_free">g_debug_free</h3>



<p><strong>Check free memory isn’t corrupted – slows performance slightly</strong></p>



<p>This is for tracking a particular bug, not for general use</p>



<p>Syntax: g_debug_free bool</p>



<h3 class="wp-block-heading" id="g_debug_imap">g_debug_imap</h3>



<p><strong>Log imap folder renames and deletes in kmsg.log</strong></p>



<p>This is for tracking a particular bug or user error <img src="https://s.w.org/images/core/emoji/15.0.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<p>Syntax: g_debug_imap bool</p>



<h3 class="wp-block-heading" id="g_debug_ncpy">g_debug_ncpy</h3>



<p><strong>Debug ncpy function</strong></p>



<p>This makes ncpy clear the entire destination buffer to increase the chance of a crash if the buffer length is wrong</p>



<p>Syntax: g_debug_ncpy bool</p>



<h3 class="wp-block-heading" id="g_debug_timing">g_debug_timing</h3>



<p><strong>Record dfopen timing, tellmail dfopen_stats</strong></p>



<p>This makes ncpy clear the entire destination buffer to increase the chance of a crash if the buffer length is wrong</p>



<p>Syntax: g_debug_timing bool</p>



<h3 class="wp-block-heading" id="g_debug_image">g_debug_image</h3>



<p><strong>Save image thumbnail files to find bug</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_debug_image bool</p>



<h3 class="wp-block-heading" id="g_debug_body">g_debug_body</h3>



<p><strong>Save msg body during processing</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_debug_body bool</p>



<h3 class="wp-block-heading" id="g_debug_check">g_debug_check</h3>



<p><strong>Use more dmalloc debugging, some performance impact. Also set g_debug_free</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_debug_check bool</p>



<h3 class="wp-block-heading" id="g_demo">g_demo</h3>



<p><strong>Demo mode lock unsafe admin features</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_demo bool</p>



<h3 class="wp-block-heading" id="g_demo_to">g_demo_to</h3>



<p><strong>Demo mode valid external destinations</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_demo_to string</p>



<h3 class="wp-block-heading" id="g_deny">g_deny</h3>



<p><strong>can clutter log</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_deny_log bool</p>



<h3 class="wp-block-heading" id="g_deny_country">g_deny_country</h3>



<p><strong>Block email from some countries, use 2 digit code not the full name, see IpToCountry.csv, turn on g_country_ip!</strong></p>



<p>Block countries, examine the file IpToCountry.csv for the abbreviations, g_country_ip must be set true, and issue tellmail aspam_update</p>



<p>Syntax: g_deny_country string</p>



<h3 class="wp-block-heading" id="g_deny_smtp">g_deny_smtp</h3>



<p><strong>Deny SMTP based on IP address</strong></p>



<p>Block users from some IP ranges connecting to SMTP only.&nbsp;</p>



<p>Syntax: g_deny_smtp string</p>



<h3 class="wp-block-heading" id="g_deny_login">g_deny_login</h3>



<p><strong>Block users from some ip ranges logging in</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_deny_login string</p>



<h3 class="wp-block-heading" id="g_deny_msg">g_deny_msg</h3>



<p><strong>Deny message</strong></p>



<p>Message to give to users who are disconnected due to the above ‘deny’ setting.&nbsp;</p>



<p>Syntax: g_deny_msg string</p>



<h3 class="wp-block-heading" id="g_deny_log">g_deny_log</h3>



<p><strong>Log g_deny rejections to msg.log – can clutter log</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_deny_log bool</p>



<h3 class="wp-block-heading" id="g_download">g_download</h3>



<p><strong>Fetch an http file and do an ini reload</strong></p>



<p>Can be used with g_include to have settings fetched from a central location, the file is fetched once an hour.</p>



<p>Syntax: g_download url=string user=string pass=string local=string</p>



<h3 class="wp-block-heading" id="g_domainkeys_check">g_domainkeys_check</h3>



<p><strong>Check incoming DomainKeys signatures (obsolete turn off)</strong></p>



<p>See domainkeys.htm</p>



<p>Syntax: g_domainkeys_check bool</p>



<h3 class="wp-block-heading" id="g_domainkeys_sign">g_domainkeys_sign</h3>



<p><strong>Sign outgoing messages (obsolete, turn off)</strong></p>



<p>To turn off domainkeys for some domains see the per domain setting, domainkeys_disable. See domainkeys.htm for more info.</p>



<p>Syntax: g_domainkeys_sign bool</p>



<h3 class="wp-block-heading" id="g_domainkeys_selector">g_domainkeys_selector</h3>



<p><strong>Policy name for your server (used creating dns entry for domainkeys)</strong></p>



<p>This defines the dns entry name for your policy record and public key entry in your dns. See domainkeys.htm for details</p>



<p>Syntax: g_domainkeys_selector string</p>



<h3 class="wp-block-heading" id="g_domainkeys_only">g_domainkeys_only</h3>



<p><strong>Domains to sign for outgoing email</strong></p>



<p>Normally all local domains are signed, but if this setting exists then it is used instead so you must list local domains as well as non local ones you want to sign messages for. G_domainkeys_sign must also be set to true!</p>



<p>Syntax: g_domainkeys_only string</p>



<h3 class="wp-block-heading" id="g_domainkeys_headers">g_domainkeys_headers</h3>



<p><strong>List which headers to sign</strong></p>



<p>This will help get the message through gateways without breaking the signature, try a single header, e.g. from</p>



<p>Syntax: g_domainkeys_headers string</p>



<h3 class="wp-block-heading" id="g_dkim_check">g_dkim_check</h3>



<p><strong>DKIM Check incoming DKIM signatures</strong></p>



<p>See domainkeys.htm</p>



<p>Syntax: g_dkim_check bool</p>



<h3 class="wp-block-heading" id="g_dkim_sign">g_dkim_sign</h3>



<p><strong>DKIM Sign outgoing messages</strong></p>



<p>To turn off dkim for some domains see the per domain setting, dkim_disable. See domainkeys.htm for more info.</p>



<p>Syntax: g_dkim_sign bool</p>



<h3 class="wp-block-heading" id="g_dkim_selector">g_dkim_selector</h3>



<p><strong>DKIM Policy name for your server (used creating dns entry for dkim)</strong></p>



<p>This defines the dns entry name for your policy record and public key entry in your dns. See domainkeys.htm for details</p>



<p>Syntax: g_dkim_selector string</p>



<h3 class="wp-block-heading" id="g_dkim_only">g_dkim_only</h3>



<p><strong>DKIM Domains to sign for outgoing email (default is all)</strong></p>



<p>Normally all local domains are signed, but if this setting exists then it is used instead so you must list local domains as well as non local ones you want to sign messages for. G_dkim_sign must also be set to true! Never set to *</p>



<p>Syntax: g_dkim_only string</p>



<h3 class="wp-block-heading" id="g_dkim_exclude">g_dkim_exclude</h3>



<p><strong>DKIM Domains to not sign for outgoing email</strong></p>



<p>This can be used to exclude some domains</p>



<p>Syntax: g_dkim_exclude string</p>



<h3 class="wp-block-heading" id="g_dkim_headers">g_dkim_headers</h3>



<p><strong>DKIM List which headers to sign (blank=default, and is usually best)</strong></p>



<p>This will help get the message through gateways without breaking the signature, try a single header, e.g. from</p>



<p>Syntax: g_dkim_headers string</p>



<h3 class="wp-block-heading" id="g_dkim_skip">g_dkim_skip</h3>



<p><strong>DKIM Destination Domains to not sign</strong></p>



<p>This is useful if the destination server is faulty with it’s dkim processing</p>



<p>Syntax: g_dkim_skip string</p>



<h3 class="wp-block-heading" id="g_dkim_nogateway">g_dkim_nogateway</h3>



<p><strong>Don’t sign if gateway rule used</strong></p>



<p>Useful to avoid double signing incoming messages</p>



<p>Syntax: g_dkim_nogateway bool</p>



<h3 class="wp-block-heading" id="g_dkim_alt_domains">g_dkim_alt_domains</h3>



<p><strong>Use selector ‘alt_name’ for these domains</strong></p>



<p>Use if you need to use a different selector when forwarding for a domain (so you can define a different dkim private key)</p>



<p>Syntax: g_dkim_alt_domains string</p>



<h3 class="wp-block-heading" id="g_dkim_alt_name">g_dkim_alt_name</h3>



<p><strong>Name of selector to use</strong></p>



<p>Use if you need to use a different selector when forwarding for a domain (so you can define a different dkim private key)</p>



<p>Syntax: g_dkim_alt_name string</p>



<h3 class="wp-block-heading" id="g_dkim_return">g_dkim_return</h3>



<p><strong>Sign if ‘return path’ matches g_dkim_only</strong></p>



<p>Useful when you want to act as a signing gateway</p>



<p>Syntax: g_dkim_return bool</p>



<h3 class="wp-block-heading" id="g_domain_templates">g_domain_templates</h3>



<p><strong>Check for domain specific templates</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_domain_templates bool</p>



<h3 class="wp-block-heading" id="g_dlist_nostart">g_dlist_nostart</h3>



<p><strong>Disable dlist</strong></p>



<p>If set disable (do not attempt to start) dlist for DMail compatibility mode..&nbsp;</p>



<p>Syntax: g_dlist_nostart bool</p>



<h3 class="wp-block-heading" id="g_dlist_nolocal">g_dlist_nolocal</h3>



<p><strong>Remove add local button from mailing lists</strong></p>



<p>Prevents address havesting etc by users – strongly recommended on public servers, not necessary on small or private servers</p>



<p>Syntax: g_dlist_nolocal bool</p>



<h3 class="wp-block-heading" id="g_dlist_path">g_dlist_path</h3>



<p><strong>Path for dlist</strong></p>



<p>DList Path normally defaults to $g_home/dlist.</p>



<p>Syntax: g_dlist_path string</p>



<h3 class="wp-block-heading" id="g_dlist_one">g_dlist_one</h3>



<p><strong>Only allow one recipient if message is to a mailing list</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_dlist_one bool</p>



<h3 class="wp-block-heading" id="g_dmail_filter">g_dmail_filter</h3>



<p><strong>Run DMail compatible filter files (deprecated – for backward compatibility only)</strong></p>



<p>Run DMail compatible filter files. Mfilter rule files should be used instead.</p>



<p>Syntax: g_dmail_filter string</p>



<h3 class="wp-block-heading" id="g_dns_blank_fail">g_dns_blank_fail</h3>



<p><strong>NEVER USE! Bounce email if dns response blank rather than retry</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_dns_blank_fail bool</p>



<h3 class="wp-block-heading" id="g_dns_host">g_dns_host</h3>



<p><strong>DNS host(s) for MX lookups</strong></p>



<p>This setting can normally be left blank as the mail server will find your system DNS settings. However, you can specify one or more DNS servers for the mail server to use instead to lookup names.&nbsp;</p>



<p>DNS lookups are cached to disk so SurgeMail will generally continue to work even if your dns server is temporarily unavailable.</p>



<p>Test your dns server with this command. If working it should return two ip addresses for that domain.</p>



<pre class="wp-block-preformatted"> 	tellmail dns_test "netwinsite.com"</pre>



<p>Prior to SurgeMail 2.0h dns lookups were done using tcp instead of udp, they are now down with UDP unless the response exceeds UDP packet size (as per RFC).</p>



<p><strong>NOTE: All dns servers listed in this setting must be fully recursive, a non recursive dns server will create many dns lookup failures!</strong></p>



<p>Syntax: g_dns_host string</p>



<h3 class="wp-block-heading" id="g_dns_nlookup">g_dns_nlookup</h3>



<p><strong>Concurrent MX lookups</strong></p>



<p>Concurrent DNS lookups to send to DNS server (Default=20) (not used after version 2.0h)</p>



<p>Syntax: g_dns_nlookup int</p>



<h3 class="wp-block-heading" id="g_dns_require">g_dns_require</h3>



<p><strong>Require reverse DNS names match</strong></p>



<p>Require MAIL FROM header to match the reverse dns lookup based of the sender based on the sender’s IP.</p>



<p>eg. from=*@hotmail.com hosts=*hotmail.com</p>



<p>Syntax: g_dns_paranoid string</p>



<h3 class="wp-block-heading" id="g_dns_translate">g_dns_translate</h3>



<p><strong>If mx response is x.x.x.x translate to y.y.y.y:port</strong></p>



<p>Useful for translating ip numbers inside a local intranet and doing other fancy routing of various sorts.</p>



<p>Syntax: g_dns_translate from=string to=string</p>



<h3 class="wp-block-heading" id="g_dsn_loggedin">g_dsn_loggedin</h3>



<p><strong>Enable DSN (Delivery Status Notification) for trusted senders.</strong></p>



<p>Safer alternative to real DSN as it only applies to local users. This guesses if the user is trusted based on previous logins</p>



<p>Syntax: g_dsn_loggedin bool</p>



<h3 class="wp-block-heading" id="g_dsn_enable">g_dsn_enable</h3>



<p><strong>Enable DSN (Delivery Status Notification) esmtp extension.</strong></p>



<p>Not recommended. Delivery Status Notification is used by spammers to find addresses to spam to.</p>



<p>Syntax: g_dsn_enable bool</p>



<h3 class="wp-block-heading" id="g_dsn_nofinal">g_dsn_nofinal</h3>



<p><strong>Try not to show real final recepients but just original recipients</strong></p>



<p>This setting helps hide internal addresses in bounce messages (after forwarding etc). Not recommended.</p>



<p>Syntax: g_dsn_nofinal bool</p>



<h3 class="wp-block-heading" id="g_domain_separator">g_domain_separator</h3>



<p><strong>Separator characters for virtual POP</strong></p>



<p>For POP logins where your virtual domain is NOT distinguished by IP address users can login with ‘user@domain’ or user/domain.name etc and the mail server will pickup the domain name correctly. By default only ‘user@domain.name’ is accepted unless this setting is used which can be useful for brain dead mail clients which don’t allow the user to specify ‘user@domain.name’ as the username eg:</p>



<p>g_domain_separator “/”</p>



<p>Syntax: g_domain_separator string</p>



<h3 class="wp-block-heading" id="g_domain_list_max">g_domain_list_max</h3>



<p><strong>Maximum number of domains to list at once</strong></p>



<p>Maximum number of domains to list at once in the admin user interface.&nbsp;</p>



<p>Syntax: g_domain_list_max int</p>



<h3 class="wp-block-heading" id="g_domain_default">g_domain_default</h3>



<p><strong>Default domain when POP/IMAP user does not specify one</strong></p>



<p>This is probably not what you think it is, generally the ‘first’ domain in surgemail.ini is used in this situation, but in some instances, when using domuser.dat for example to translate users back to virtual domains, you will want the default domain to be a ‘generic’ made up domain that doesn’t really exist.</p>



<p>For example lets say you have users fred@a.com, bob@b.com, then in domusers.dat you have</p>



<p>fred@a.com fred@a.com<br>bob@b.com bob@b.com<br>bob@xxx bob@b.com<br>fred@xxx fred@a.com</p>



<p>And the result is that users who login to pop as bob or fred, will be correctly mapped to the correct virtual domain user even though the actual domain is different in those two cases.</p>



<p>Clear as mud I expect?</p>



<p>Syntax: g_domain_default string</p>



<h3 class="wp-block-heading" id="g_domuser_file">g_domuser_file</h3>



<p><strong>Domain users to thousands of virtual domains easily</strong></p>



<p>Specifies a file which contains lines that translate an email address to the username that should be looked up in the database. This file can contain a domain name not previously specified in surgemail.ini allowing you to create unique sub-domain addresses. eg:</p>



<p>g_domuser_file “c:\surgemail\domuser.dat”</p>



<p>Example entries…</p>



<p>*@domain.com postmaster@domain.com<br>userA@domain.com userB@domain.com<br>firstname@lastname.domain.com firstname@lastname.domain.com</p>



<p>Syntax: g_domuser_file string</p>



<h3 class="wp-block-heading" id="g_dotlock_minutes">g_dotlock_minutes</h3>



<p><strong>NFS lock waits</strong></p>



<p>Minutes to wait for nfs lock file, default 20 minutes.</p>



<p>Syntax: g_dotlock_minutes int</p>



<h3 class="wp-block-heading" id="g_drop_use_len">g_drop_use_len</h3>



<p><strong>Use the content-len header for drop file processing</strong></p>



<p>For use on Solaris when using sendmail for incoming mail delivery.</p>



<p>Syntax: g_drop_use_len bool</p>



<h3 class="wp-block-heading" id="g_encrypt_prefix">g_encrypt_prefix</h3>



<p><strong>Prefix for encrypted messages must match encrypt rule so replies are encrypted</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_encrypt_prefix string</p>



<h3 class="wp-block-heading" id="g_ehlo_simple">g_ehlo_simple</h3>



<p><strong>Ip addresses to give simple ehlo respone to</strong></p>



<p>This is a debugging setting, do not use.</p>



<p>Syntax: g_ehlo_simple string</p>



<h3 class="wp-block-heading" id="g_ehlo_8bitmime">g_ehlo_8bitmime</h3>



<p><strong>Enable 8bit mime in ehlo response (not recommended)</strong></p>



<p>This is probably a bad idea, it is best to reject 8bit mime and stop people sending it as the destination server may not support it</p>



<p>Syntax: g_ehlo_8bitmime bool</p>



<h3 class="wp-block-heading" id="g_ehlo_log">g_ehlo_log</h3>



<p><strong>Log ehlo/bind to msg*.rec logs</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_ehlo_log bool</p>



<h3 class="wp-block-heading" id="g_event_url">g_event_url</h3>



<p><strong>Send msg events to a url</strong></p>



<p>The parameters sent include, (given url)&amp;mode=xx&amp;mid=xx&amp;from=x&amp;to=xx&amp;qnum=xx</p>



<p>Syntax: g_event_url string</p>



<h3 class="wp-block-heading" id="g_event_list">g_event_list</h3>



<p><strong>Events wanted by url</strong></p>



<p>e.g. New,Sent,Bounced,Later,Failed,Stored,Dropped,Rejected</p>



<p>Syntax: g_event_list string</p>



<h3 class="wp-block-heading" id="g_emailreg_enable">g_emailreg_enable</h3>



<p><strong>Enable whitelist http://www.emailreg.org register to use</strong></p>



<p>Be aware that this setting will not work until you register on their server and tell them the ip address of your server/dns to permit lookups. They charge $20 to verify your domain and this will help to get your email delivered more reliably</p>



<p>Syntax: g_emailreg_enable bool</p>



<h3 class="wp-block-heading" id="g_external_warn">g_external_warn</h3>



<p><strong>Tag external messages from non friends</strong></p>



<p>This tags any external email with a warning</p>



<p>Syntax: g_external_warn bool</p>



<h3 class="wp-block-heading" id="g_external_all">g_external_all</h3>



<p><strong>Tag messages from friends too</strong></p>



<p>This tags any external email with a warning</p>



<p>Syntax: g_external_all bool</p>



<h3 class="wp-block-heading" id="g_external_msg">g_external_msg</h3>



<p><strong>Msg to insert at the top of external mails</strong></p>



<p>This tags any external email with a warning</p>



<p>Syntax: g_external_msg string</p>



<h3 class="wp-block-heading" id="g_external_style">g_external_style</h3>



<p><strong>css style for the warning</strong></p>



<p>Used to set the color/font etc…</p>



<p>Syntax: g_external_style string</p>



<h3 class="wp-block-heading" id="g_external_spam">g_external_spam</h3>



<p><strong>Tag messages in spam folder too</strong></p>



<p>Tags most msgs placed in the spam folder too.</p>



<p>Syntax: g_external_spam bool</p>



<h3 class="wp-block-heading" id="g_external_white">g_external_white</h3>



<p><strong>Disable for return path matches</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_external_white string</p>



<h3 class="wp-block-heading" id="g_external_only">g_external_only</h3>



<p><strong>Enable only these destionations</strong></p>



<p>e.g. *@xyz.com,*@fred.com</p>



<p>Syntax: g_external_only string</p>



<h3 class="wp-block-heading" id="g_external_white_to">g_external_white_to</h3>



<p><strong>Disable for these recipients</strong></p>



<p>People who don’t need warning.</p>



<p>Syntax: g_external_white_to string</p>



<h3 class="wp-block-heading" id="g_external_ip_disable">g_external_ip_disable</h3>



<p><strong>Do not add X-External-IP header</strong></p>



<p>Removes external ip address from headers.</p>



<p>Syntax: g_external_ip_disable bool</p>



<h3 class="wp-block-heading" id="g_fallback_relay_if_exists">g_fallback_relay_if_exists</h3>



<p><strong>Use FALLBACK_RELAY if not logged in but user exists (OLD_POPHOST_CREATEUSER_DISABLE)</strong></p>



<p>This can be used to relay users where you have a user database that can be checked on the front end system directly (odbcauth, tcpauth, etc)</p>



<p>Syntax: g_fallback_relay_if_exists bool</p>



<h3 class="wp-block-heading" id="g_feat_testing">g_feat_testing</h3>



<p><strong>Testing setting do not use</strong></p>



<p>Used to test alternate spam filter weigtings</p>



<p>Syntax: g_feat_testing bool</p>



<h3 class="wp-block-heading" id="g_filter_pipe">g_filter_pipe</h3>



<p><strong>Filter pipe allowing external message processing</strong></p>



<p>This allows external applications to filter and modify incoming messages. Example: Integration with Spam Assassin (on UNIX) could be achieved as follows:</p>



<p>g_filter_pipe “/usr/local/bin/spamassassin -P”</p>



<p>it expects a normal unix ‘filter’ so, read the message on ‘stdin’ and write the identical (or modified) message to ‘stdout’.</p>



<p>The input will be ‘crlf’ terminated and so should the output file.</p>



<p>That’s all you can do with this mechanism, if you want to bounce the message or flag it as spam you ‘add’ a header and then use something in surgemail to detect and act on the header you’ve added (mfilter)</p>



<p>Syntax: g_filter_pipe string</p>



<h3 class="wp-block-heading" id="g_filter_pipe_skip">g_filter_pipe_skip</h3>



<p><strong>Skip filter if ip matches this</strong></p>



<p>Set this for local servers that don’t need filtering, e.g. mailing list servers, local trusted robots.</p>



<p>Syntax: g_filter_pipe_skip string</p>



<h3 class="wp-block-heading" id="g_filter_pipe_noauth">g_filter_pipe_noauth</h3>



<p><strong>Skip for auth users</strong></p>



<p>Skip for authenticated users</p>



<p>Syntax: g_filter_pipe_noauth bool</p>



<h3 class="wp-block-heading" id="g_filter_pipe_headers">g_filter_pipe_headers</h3>



<p><strong>Re-read headers after pipe finishes</strong></p>



<p>Needed if you want headers to be seen by later surgemail processing</p>



<p>Syntax: g_filter_pipe_headers bool</p>



<h3 class="wp-block-heading" id="g_filter_max">g_filter_max</h3>



<p><strong>Max size of messages to send through the filter pipe</strong></p>



<p>Messages over this size (in bytes) are skipped. default = no limit</p>



<p>Syntax: g_filter_max int</p>



<h3 class="wp-block-heading" id="g_filter_n">g_filter_n</h3>



<p><strong>Number of filters to run simultaneously</strong></p>



<p>Default is 20, when this limit is reached the incoming thread waits a few seconds then skips the filter if necessary, this is intended to prevent a log jam/melt down effect.</p>



<p>Syntax: g_filter_n int</p>



<h3 class="wp-block-heading" id="g_filter_timeout">g_filter_timeout</h3>



<p><strong>Filter pipe timeout</strong></p>



<p>Filter timeout (g_filter_pipe) in seconds, default is 360.</p>



<p>Syntax: g_filter_timeout int</p>



<h3 class="wp-block-heading" id="g_fix_crcrlf">g_fix_crcrlf</h3>



<p><strong>Fix email messages containing crcrlf for line termination</strong></p>



<p>This is best not used, it’s best to fix the faulty email application, results are not gauranteed.</p>



<p>Syntax: g_fix_crcrlf bool</p>



<h3 class="wp-block-heading" id="g_fix_imap_lf">g_fix_imap_lf</h3>



<p><strong>During IMAP import fix email messages containing lf</strong></p>



<p>This is best not used, it’s best to fix the faulty email server, results are not gauranteed.</p>



<p>Syntax: g_fix_imap_lf bool</p>



<h3 class="wp-block-heading" id="g_friends_spf">g_friends_spf</h3>



<p><strong>Refine friends matching using spf/dmarc when possible</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_friends_spf bool</p>



<h3 class="wp-block-heading" id="g_friends_only">g_friends_only</h3>



<p><strong>Friends system</strong></p>



<p>An anti-spam feature which screens incoming mail to ensure it comes from a human. For incoming mail from unknown addresses a message is sent to this person requesting them to reply to confirm they are human and the original message will be delivered.&nbsp;<a href="friends.htm">See this page for more details.</a></p>



<p>Syntax: g_friends_only bool</p>



<h3 class="wp-block-heading" id="g_friends_bounce_rej">g_friends_bounce_rej</h3>



<p><strong>Reject blank return path as friends failures</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_friends_bounce_rej bool</p>



<h3 class="wp-block-heading" id="g_friends_bounce_friend">g_friends_bounce_friend</h3>



<p><strong>Allow exception rules to bounce a mesesage from a friend</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_friends_bounce_friend bool</p>



<h3 class="wp-block-heading" id="g_friends_cleanup">g_friends_cleanup</h3>



<p><strong>Cleanup/repair large friend.lst files</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_friends_cleanup bool</p>



<h3 class="wp-block-heading" id="g_friends_daemon_ok">g_friends_daemon_ok</h3>



<p><strong>Accept emails from any mailer deamon</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_friends_daemon_ok bool</p>



<h3 class="wp-block-heading" id="g_friends_name">g_friends_name</h3>



<p><strong>What to call the friends system</strong></p>



<p>This specifies what to call the friends system when referring to it on web pages and in email to our users, you can call it whatever you like</p>



<p>Syntax: g_friends_name string</p>



<h3 class="wp-block-heading" id="g_friends_pending_name">g_friends_pending_name</h3>



<p><strong>The imap name of the friends_pending (and spam store) quarantine folder – should match surgeweb imap_spam_folder – default is ‘Friends Pending’</strong></p>



<p>This shouldn’t be changed unless this feature has not been used before as it will confuse your users. Any matching folder the user has of the same name will become invisible. So at least make it something other than simply Spam!!</p>



<p>Syntax: g_friends_pending_name string</p>



<h3 class="wp-block-heading" id="g_friends_silent">g_friends_silent</h3>



<p><strong>Disable friends responses to users</strong></p>



<p>This setting is to simply disable the confirm emails, not generally recommended as this makes friends a bit pointless.</p>



<p>Syntax: g_friends_silent bool</p>



<h3 class="wp-block-heading" id="g_friends_silent_level">g_friends_silent_level</h3>



<p><strong>If spam score above this then don’t send friends message</strong></p>



<p>Not generally recommended.</p>



<p>Syntax: g_friends_silent_level int</p>



<h3 class="wp-block-heading" id="g_friends_ignore">g_friends_ignore</h3>



<p><strong>List of addresses considered friends for all users on the system</strong></p>



<p>List of addresses considered friends for all users on the system eg: the system manager email address</p>



<p>Syntax: g_friends_ignore string</p>



<h3 class="wp-block-heading" id="g_friends_skip_ip">g_friends_skip_ip</h3>



<p><strong>List of ip addresses considered friends for all users on the system</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_friends_skip_ip string</p>



<h3 class="wp-block-heading" id="g_friends_confirm_subject">g_friends_confirm_subject</h3>



<p><strong>String to use as the subject of a friends confirmation email</strong></p>



<p>String to use as the subject of a friends confirmation email. Defaults to:&nbsp;<em>“Please reply to ||confirm|| message and allow delivery”</em>. This value&nbsp;<strong>must&nbsp;</strong>contain the text ||confirm||, this text is replaced by the unique message id that allows SurgeMail to find the message to release eg. confirm(1150419513.1880_1180.domain). It is also advisable to place the ||confirm|| near the start of the string as some clients will truncate long subjects and any truncation of the ||confirm|| value will result in failure to release the message.</p>



<p>Syntax: g_friends_confirm_subject string</p>



<h3 class="wp-block-heading" id="g_friends_default_mode">g_friends_default_mode</h3>



<p><strong>Default friends mode, smite (recommended) silent, or list</strong></p>



<p>Valid settings are kids,disabled,smite,silent,list. Recommended silent or smite, in silent mode no challenge email is sent, in smite mode a challenge email is sent if the score is exceeded.</p>



<p>Syntax: g_friends_default_mode string</p>



<h3 class="wp-block-heading" id="g_friends_default_autoadd">g_friends_default_autoadd</h3>



<p><strong>Default auto addition when sending (recommended)</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_friends_default_autoadd bool</p>



<h3 class="wp-block-heading" id="g_friends_msg">g_friends_msg</h3>



<p><strong>Message used for friends bounce.</strong></p>



<p>e.g. Delivery pending, to deliver you must send an email to</p>



<p>Syntax: g_friends_msg string</p>



<h3 class="wp-block-heading" id="g_friends_msg_link">g_friends_msg_link</h3>



<p><strong>Message used for friends link bounce.</strong></p>



<p>e.g. Note: Delivery will ONLY occur if you click on this link</p>



<p>Syntax: g_friends_msg_link string</p>



<h3 class="wp-block-heading" id="g_friends_latest_headers">g_friends_latest_headers</h3>



<p><strong>Friends system re-read message headers</strong></p>



<p>Causes friends to re-read message headers, allowing rules based on headers added during delivery</p>



<p>Syntax: g_friends_latest_headers bool</p>



<h3 class="wp-block-heading" id="g_friends_lang_auto">g_friends_lang_auto</h3>



<p><strong>Set users language settings automatically based on observed emails from friends</strong></p>



<p>This setting improves spam handling</p>



<p>Syntax: g_friends_lang_auto bool</p>



<h3 class="wp-block-heading" id="g_friends_pending_keep">g_friends_pending_keep</h3>



<p><strong>Time to keep friend pending messages</strong></p>



<p>How long to store users friends pending messages before deleting them (days)</p>



<p>Syntax: g_friends_pending_keep int</p>



<h3 class="wp-block-heading" id="g_friends_pending_max">g_friends_pending_max</h3>



<p><strong>Max items in pending before deleting them</strong></p>



<p>The default is 10000 Items</p>



<p>Syntax: g_friends_pending_max int</p>



<h3 class="wp-block-heading" id="g_friends_pending_vanish">g_friends_pending_vanish</h3>



<p><strong>Enable auto-vanish of pending messages on confirmation bounce</strong></p>



<p>When a bounce for a confirmation message is received we vanish it, this setting will also delete the original message.</p>



<p>Syntax: g_friends_pending_vanish bool</p>



<h3 class="wp-block-heading" id="g_friends_at_rcpt">g_friends_at_rcpt</h3>



<p><strong>Whether to check users friends list at rcpt stage</strong></p>



<p>This setting is automatically added/removed by the web admin when global friends defaults are configured. It allows us to check friends at rcpt stage without paying a disk access cost for non-friends users.</p>



<p>Syntax: g_friends_at_rcpt bool</p>



<h3 class="wp-block-heading" id="g_friends_allow_spf">g_friends_allow_spf</h3>



<p><strong>Allow all email through as if it was a friend during temporary allow</strong></p>



<p>The user click on a button to disable friends for a few hours, during this time all messages will get treated as a friend and thus bypass SPF too.</p>



<p>Syntax: g_friends_allow_spf bool</p>



<h3 class="wp-block-heading" id="g_friends_spf_fail_bounce">g_friends_spf_fail_bounce</h3>



<p><strong>Bounce SPF failures, do not send friends confirmations (Not recommended)</strong></p>



<p>The default behaviour is to only send confirmations if SPF checks pass, if they fail friends checking is skipped, no confirmation request is sent and the email is not blocked by friends.</p>



<p>Syntax: g_friends_spf_fail_bounce bool</p>



<h3 class="wp-block-heading" id="g_friends_check_spf">g_friends_check_spf</h3>



<p><strong>Disable friends bounces if SPF headers missing/failed to avoid backscatter.</strong></p>



<p>If the incoming message may be forged it will bounce messages using an smtp error code to deny delivery but it will allow any real sender to bypass this. This settings is good if spamcop block your domain for sending friends challenges as it cuts down on the number of such messages. This avoids backscatter</p>



<p>Syntax: g_friends_check_spf bool</p>



<h3 class="wp-block-heading" id="g_friends_safer">g_friends_safer</h3>



<p><strong>Make friends always avoid back scatter.</strong></p>



<p>By using a rejection during the incoming message instead of sending an email back scatter is completely avoided.</p>



<p>Syntax: g_friends_safer bool</p>



<h3 class="wp-block-heading" id="g_friends_always">g_friends_always</h3>



<p><strong>Always use friends list.</strong></p>



<p>This enables the “Add all outgoing email addresses to list” feature and always checks incoming messages against the friends list so that SurgeMail can correctly tag or filter it.</p>



<p>Syntax: g_friends_always bool</p>



<h3 class="wp-block-heading" id="g_friends_add_trusted">g_friends_add_trusted</h3>



<p><strong>Add to friends list when if sender is trusted</strong></p>



<p>This is useful if senders are not using smtp auth but you still want friends to be added, typically used with surgewall…</p>



<p>Syntax: g_friends_add_trusted bool</p>



<h3 class="wp-block-heading" id="g_friends_global_add">g_friends_global_add</h3>



<p><strong>Add to a global friends list if ip matches and sender doesn’t match authenticated user</strong></p>



<p>Used when you wish to whitelist outgoing addresses even though the sender/reply address does not match the authenticated user (e.g. messages sent via exchange)</p>



<p>Syntax: g_friends_global_add string</p>



<h3 class="wp-block-heading" id="g_friends_global_exclude">g_friends_global_exclude</h3>



<p><strong>Addresses not to auto add, e.g. *@paypal.com</strong></p>



<p>This is good for avoiding meaningless entries or obvious entries that people might send email to by mistake</p>



<p>Syntax: g_friends_global_exclude string</p>



<h3 class="wp-block-heading" id="g_friends_confirm_debug">g_friends_confirm_debug</h3>



<p><strong>Log sucessful friends confirmation responses</strong></p>



<p>This enables us to examine suspect replies to friends confirmations for indications that they were sent by spammers or mail robots.</p>



<p>Syntax: g_friends_confirm_debug bool</p>



<h3 class="wp-block-heading" id="g_friends_rotate">g_friends_rotate</h3>



<p><strong>Rotate user level log file, default 30k</strong></p>



<p>Set log size, the log is also rotated when a friends report email is sent (if configured)</p>



<p>Syntax: g_friends_rotate int</p>



<h3 class="wp-block-heading" id="g_friends_long">g_friends_long</h3>



<p><strong>In friends web release addresses use a longer url</strong></p>



<p>Uses an older style link</p>



<p>Syntax: g_friends_long bool</p>



<h3 class="wp-block-heading" id="g_friends_ignore_trusted">g_friends_ignore_trusted</h3>



<p><strong>If from trusted ip still apply friends</strong></p>



<p>Useful when you have a gateway that is sending to surgemail</p>



<p>Syntax: g_friends_ignore_trusted bool</p>



<h3 class="wp-block-heading" id="g_friends_url">g_friends_url</h3>



<p><strong>Specify default global url for friends release http://domain.name:port</strong></p>



<p>Normally the default will work.</p>



<p>Syntax: g_friends_url string</p>



<h3 class="wp-block-heading" id="g_friends_testurl">g_friends_testurl</h3>



<p><strong>Test g_friends_url and status_url and url_host work externally</strong></p>



<p>Reports to manager if any fail</p>



<p>Syntax: g_friends_testurl bool</p>



<h3 class="wp-block-heading" id="g_friends_autodom">g_friends_autodom</h3>



<p><strong>Auto whitelist friends based on domain/ip</strong></p>



<p>This means a friend or trained message will whitelist the entire domain/ip address combination until contradicted for all users</p>



<p>Syntax: g_friends_autodom bool</p>



<h3 class="wp-block-heading" id="g_speech_cmd">g_speech_cmd</h3>



<p><strong>Command to convert sound file to text (append .txt to filename)</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_speech_cmd string</p>



<h3 class="wp-block-heading" id="g_speech_from">g_speech_from</h3>



<p><strong>Only attempt conversion if from this email address</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_speech_from string</p>



<h3 class="wp-block-heading" id="g_speech_size">g_speech_size</h3>



<p><strong>Default 10mb, will not convert larger files</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_speech_size int</p>



<p>Example: 10mb</p>



<h3 class="wp-block-heading" id="g_status_url">g_status_url</h3>



<p><strong>Specify default global url for status messages</strong></p>



<p>Normally the default will work.</p>



<p>Syntax: g_status_url string</p>



<h3 class="wp-block-heading" id="g_status_view_html">g_status_view_html</h3>



<p><strong>Obsolete setting</strong></p>



<p>Setting is no longer used.</p>



<p>Syntax: g_status_view_html bool</p>



<h3 class="wp-block-heading" id="g_status_login">g_status_login</h3>



<p><strong>Require login for spam status actions</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_status_login bool</p>



<h3 class="wp-block-heading" id="g_friends_byemail">g_friends_byemail</h3>



<p><strong>Use old email based friends rejections</strong></p>



<p>This restores the old beahviour, you would normally only use this if your mail server was unaccessable via http as email based rejections are not as easy to use or as reliable as web based human confirmations</p>



<p>Syntax: g_friends_byemail bool</p>



<h3 class="wp-block-heading" id="g_friends_bounce_second">g_friends_bounce_second</h3>



<p><strong>Bounce the next time the user sends a message if waiting for confirm still</strong></p>



<p>This can make it clearer that email is not getting through to the destination</p>



<p>Syntax: g_friends_bounce_second bool</p>



<h3 class="wp-block-heading" id="g_friends_old_status_email">g_friends_old_status_email</h3>



<p><strong>Use older status email &amp; processing</strong></p>



<p>Use status.eml instead of status_html.eml</p>



<p>Syntax: g_friends_old_status_email bool</p>



<h3 class="wp-block-heading" id="g_friends_obey_spf">g_friends_obey_spf</h3>



<p><strong>If SPF failed then no friends match allowed for local domains</strong></p>



<p>If spf failed then don’t allow a friends match</p>



<p>Syntax: g_friends_obey_spf bool</p>



<h3 class="wp-block-heading" id="g_friends_local_match">g_friends_local_match</h3>



<p><strong>If from!=returnpath and one is local, then block friends match</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_friends_local_match bool</p>



<h3 class="wp-block-heading" id="g_friends_spam_score">g_friends_spam_score</h3>



<p><strong>Default level to quaranteen message in spam folder (Recommended 8 or 10)</strong></p>



<p>This sets the default when no friends.ini file exists, a level of 8 will give best all round results, a level of 10 will stop less spam but avoid false positives.</p>



<p>Syntax: g_friends_spam_score int</p>



<h3 class="wp-block-heading" id="g_friends_status_sort">g_friends_status_sort</h3>



<p><strong>Sort friends status messages with low scores at the top</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_friends_status_sort bool</p>



<h3 class="wp-block-heading" id="g_friends_release_wash">g_friends_release_wash</h3>



<p><strong>Clean any subject marking (ie stars) when releasing/allowing</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_friends_release_wash bool</p>



<h3 class="wp-block-heading" id="g_friends_warnonce">g_friends_warnonce</h3>



<p><strong>Give bounce on only the first message</strong></p>



<p>This used to be the default, but it meant people thought delivery was occurring!</p>



<p>Syntax: g_friends_warnonce bool</p>



<h3 class="wp-block-heading" id="g_friends_debug1">g_friends_debug1</h3>



<p><strong>NEVER USE, only for NetWin testing</strong></p>



<p>This makes surgemail always send an email bounce rather than a safe reject, only intended for testing bounce messages</p>



<p>Syntax: g_friends_debug1 bool</p>



<h3 class="wp-block-heading" id="g_footer_file">g_footer_file</h3>



<p><strong>Footer file</strong></p>



<p>Footer file which is appended to all plain text mail messages.</p>



<p>Syntax: g_footer_file string</p>



<h3 class="wp-block-heading" id="g_footer_html">g_footer_html</h3>



<p><strong>Footer file (HTML mail)</strong></p>



<p>Footer file which is appended to all HTML mail messages.</p>



<p>Syntax: g_footer_html string</p>



<h3 class="wp-block-heading" id="g_footer_send">g_footer_send</h3>



<p><strong>Footer file (outbound only)</strong></p>



<p>Plain text footer file which is appended to all outbound mail messages only.</p>



<p>Syntax: g_footer_send string</p>



<h3 class="wp-block-heading" id="g_footer_sendonly">g_footer_sendonly</h3>



<p><strong>Enable outbound footer</strong></p>



<p>Add g_footer_send to all messages when sending to non local users.</p>



<p>Syntax: g_footer_sendonly bool</p>



<h3 class="wp-block-heading" id="g_footer_auth">g_footer_auth</h3>



<p><strong>Only add footer for authenticated local users</strong></p>



<p>This essentially adds the footers to ‘outgoing’ email… if the user is a member of the group nofooter then the footer is also skipped.</p>



<p>Syntax: g_footer_auth bool</p>



<h3 class="wp-block-heading" id="g_footer_skip">g_footer_skip</h3>



<p><strong>Skip footers for these users</strong></p>



<p>This skips the footer for matching users (e.g. cell phones etc)</p>



<p>Syntax: g_footer_skip string</p>



<h3 class="wp-block-heading" id="g_footer_trusted">g_footer_trusted</h3>



<p><strong>Only add footers if sender is trusted</strong></p>



<p>This prevents the footer from being added for a message that pretends to come from your domain.</p>



<p>Syntax: g_footer_trusted bool</p>



<h3 class="wp-block-heading" id="g_footer_notfound">g_footer_notfound</h3>



<p><strong>Only add footer if footer is not in message already</strong></p>



<p>This works by examining the message contents to try and find part of the footer.</p>



<p>Syntax: g_footer_notfound bool</p>



<h3 class="wp-block-heading" id="g_footer_skipfound">g_footer_skipfound</h3>



<p><strong>Only add footer if this text is not already in the message, requires g_footer_notfound</strong></p>



<p>This can be used to make the footer optional</p>



<p>Syntax: g_footer_skipfound string</p>



<h3 class="wp-block-heading" id="g_from_bl">g_from_bl</h3>



<p><strong>Domain Based Blacklist Zones, lookups FROM domain in dns</strong></p>



<p>The ‘from’ domain is checked against the specified RBL which must be a special ‘FROM’ based rbl which lists spammers by from address. Most spammers fake from addresses so this is a fairly marginally useful method.</p>



<p>Syntax: g_from_bl name=string stamp=string</p>



<h3 class="wp-block-heading" id="g_from_bounce">g_from_bounce</h3>



<p><strong>Bounce if from is probably faked</strong></p>



<p>Bounce if from address is probably faked.</p>



<p>This check is activated for any mail with a local domain in the from address but not using SMTP authentcation, relay allow IP address or spam allow IP address.</p>



<p>Syntax: g_from_bounce bool</p>



<h3 class="wp-block-heading" id="g_from_body_bounce">g_from_body_bounce</h3>



<p><strong>Reject if local from header address is probably faked</strong></p>



<p>Checks if the sender is authenticated or from an address that can relay, if not then the message is bounced if it claims to be from a local domain. One of the settings to prevent forgery</p>



<p>Syntax: g_from_body_bounce bool</p>



<h3 class="wp-block-heading" id="g_from_stamp">g_from_stamp</h3>



<p><strong>Stamp if from is probably faked</strong></p>



<p>Stamp message with “X-Verify-Failed:” header if from address is probably faked.</p>



<p>eg: X-Verify-Failed: &lt;user@mydomain.com&gt; From mydomain.com is local but user not authenticated or from g_relay_allow_ip</p>



<p>This check is activated based on the same conditions as g_from_bounce.</p>



<p>Syntax: g_from_stamp bool</p>



<h3 class="wp-block-heading" id="g_from_timeout">g_from_timeout</h3>



<p><strong>Timeout on g_badfrom_* checks</strong></p>



<p>Timeout in seconds of g_badfrom_* checks. Default = 60 seconds. If this timeout is reached the g_badfrom check will be classed as having failed.</p>



<p>Syntax: g_from_timeout int</p>



<h3 class="wp-block-heading" id="g_from_check">g_from_check</h3>



<p><strong>Check from matches valid local domain</strong></p>



<p>Check from domains match valid local domains if user is authenticated, or g_from_allow.Should be used with g_from_bounce “true” which basically forces them to authenticate and then makes this setting work properly.</p>



<p>Syntax: g_from_check bool</p>



<h3 class="wp-block-heading" id="g_from_noforge">g_from_noforge</h3>



<p><strong>If envelope or from is local domain then the other must be too</strong></p>



<p>This can prevent many common forms of forgery, this will bounce some real email, so probably better to use the noforgeme setting instead. One of the settings to prevent forgery</p>



<p>Syntax: g_from_noforge bool</p>



<h3 class="wp-block-heading" id="g_from_noforge_some">g_from_noforge_some</h3>



<p><strong>If from matches this then from/envelope must match</strong></p>



<p>Prevent forgeries of important local addresses, e.g. *support*</p>



<p>Syntax: g_from_noforge_some string</p>



<h3 class="wp-block-heading" id="g_from_noforgeme">g_from_noforgeme</h3>



<p><strong>If to==from then from and env from must match</strong></p>



<p>This can prevent many common forms of forgery, this is safer than the noforge setting above, and generally almost as effective. One of the settings to prevent forgery</p>



<p>Syntax: g_from_noforgeme bool</p>



<h3 class="wp-block-heading" id="g_from_noforgename">g_from_noforgename</h3>



<p><strong>If from contains two addresses the domains must match</strong></p>



<p>Prevents forgery where the descriptive name is a fake email address that doesn’t match the real address</p>



<p>Syntax: g_from_noforgename bool</p>



<h3 class="wp-block-heading" id="g_from_nofriend">g_from_nofriend</h3>



<p><strong>If forge setting would bounce message then allow message but don’t allow friend match</strong></p>



<p>This setting modifies the g_from_noforgeme behaviour so it doesn’t block the message but does prevent a friend match occurring</p>



<p>Syntax: g_from_nofriend bool</p>



<h3 class="wp-block-heading" id="g_notlocal">g_notlocal</h3>



<p><strong>Add ALERT to message subject if domain is local but origin is external</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_notlocal bool</p>



<h3 class="wp-block-heading" id="g_notlocal_message">g_notlocal_message</h3>



<p><strong>ALERT text to add to suspect messages that appear to be from a local domain</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_notlocal_message string</p>



<h3 class="wp-block-heading" id="g_from_allow">g_from_allow</h3>



<p><strong>-allow-ip-ip-addresses-to-bypass-local-from-check" &gt;</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_from_allow_ip string</p>



<h3 class="wp-block-heading" id="g_from_allow_ip">g_from_allow_ip</h3>



<p><strong>IP addresses to bypass local from check</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_from_allow_ip string</p>



<h3 class="wp-block-heading" id="g_from_allow_to">g_from_allow_to</h3>



<p><strong>destination user to bypass local from check</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_from_allow_to string</p>



<h3 class="wp-block-heading" id="g_from_exact">g_from_exact</h3>



<p><strong>Check from matches authenticated user</strong></p>



<p>Check from matches authenticated user. If user is not authenticated the setting is skipped.</p>



<p>Should be used with g_from_bounce “true” which basically forces them to authenticate and then makes this setting work properly.</p>



<p>Syntax: g_from_exact bool</p>



<h3 class="wp-block-heading" id="g_from_relay">g_from_relay</h3>



<p><strong>If not authenticated and g_relay_allow_ip matched then block if not local domain or whitelisted</strong></p>



<p>This one helps prevent a local virus sending out spam. It basically says non authenticated users who can relay due to a g_relay_allow_ip rule must send from one of your domains or use smtp authentication or be in a white list. Note this test is performed on the message envelope not the body. We recommend insisting on smtp authentication to reduce your risk of this type of problem.</p>



<p>Syntax: g_from_relay bool</p>



<h3 class="wp-block-heading" id="g_from_relay_white">g_from_relay_white</h3>



<p><strong>White list of domains for g_from_relay setting</strong></p>



<p>This is domains that can be used as a ‘from’ address for non authenticated users, in addition to local domains</p>



<p>Syntax: g_from_relay_white string</p>



<h3 class="wp-block-heading" id="g_from_domain">g_from_domain</h3>



<p><strong>Default domain for from envelope</strong></p>



<p>Fixes the ‘from’ envelope if the email client failed to specify a domain name, this doesn’t fix the from header currently but we may change that in future!</p>



<p>Syntax: g_from_domain string</p>



<h3 class="wp-block-heading" id="g_gateway">g_gateway</h3>



<p><strong>Gateway messages to a particular domain (Or smarthost)</strong></p>



<p>Used to gateway messages to another local mail server.&nbsp; Typically this other server is inside a fire wall so it’s local IP address is not known by the DNS server.&nbsp; You specify the domain and IP address to send messages to&nbsp;and this server is treated as ‘local’ rather than remote in terms of open relay restrictions. eg: nonauthenticated users are able to send in mail. Open relay restrictions do not apply to messages sent to this domain because they are considered as if they were local users and not ‘relaying’.&nbsp;</p>



<p>This setting has the fields domain(required), to(required), user(optional), pass(optional), relay=true/false(optional),check=true/false (optional)</p>



<p>Normally “domain” and “to” are the only fields that need to be filled in. eg. To relay mail from anyone to user accounts in the domain somedomain.com to the host 1.2.3.4.<br>g_gateway domain=”somedomain.com” to=”1.2.3.4″</p>



<p><strong>user=”username” pass=”password”</strong></p>



<p>If SMTP authentication is required on the destination server the user and pass fields need to be completed.<strong>check=true</strong></p>



<p>The check=true setting tells surgemail to actually connect to the server and check that recipients exist before accepting an incoming email for that user, this is STRONGLY recommended, as it stops the server having to bounce thousands of messages when spammers send to invalid addresses on your server. If SurgeMail cannot connect it will assume the user does exist so nothing is bounced except when the connection is successful.</p>



<p><strong>Classic smarthost setting</strong></p>



<p>This is where you want to send all outgoing email to another server, that may require authentication, note that we don’t use relay=”true” as that would make the server an open relay.</p>



<p>g_gateway domain=”*” to=”isp.mail.server” user=”user@isp.server” pass=”xxx”</p>



<p><strong>relay=”true”</strong>&nbsp;(warning, usually not needed or wise, this can make your server into an open relay for spammers to abuse!)</p>



<p>As a safety measure to prevent accidental openrelays, SurgeMail will not relay for non authenticated users or trusted users (users that are allowed to relay due to relaying settings eg g_relay_allow_ip) if the domain is “*”. This can be overridden by placing “true” in the “relay” field. eg: To relay all mail for all users to host 1.2.3.4:<br><br>g_gateway domain=”*” to=”1.2.3.4″ relay=”false”</p>



<p>It is possible to use domain=”c:\domains.txt” where domains.txt is a file listing the domains to be gatewayed, this should only be done for one gateway rule, and is only worth doing if you have thousands of domains to gateway.</p>



<p><strong>local=”true”</strong></p>



<p>Requires that the destination addresses exist in the local account database.</p>



<h3 class="wp-block-heading" id="g_gateway_open">g_gateway_open</h3>



<p><strong>Allows an open relay setting in g_gateway</strong></p>



<p>This lets you set g_gateway domain=* and relay=true, this makes your server an open relay so is never a good idea!</p>



<p>Syntax: g_gateway_open bool</p>



<h3 class="wp-block-heading" id="g_gateway_allow">g_gateway_allow</h3>



<p><strong>Known hosts that act as incoming SMTP or surgewall servers for us</strong></p>



<p>Some spam prevention mechanisms which use the ip address of the incoming system must be disabled for incoming SMTP servers/surgewall/firewall boxes so that stupid limits don’t block all the incoming messages from your backup mx server etc. Settings this affects: g_tarpit_max, g_tarpit_max_remote, g_con_perip, RBL checks,</p>



<p>Syntax: g_gateway_allow string</p>



<h3 class="wp-block-heading" id="g_gateway_auth">g_gateway_auth</h3>



<p><strong>Send SMTP auth requests to another host</strong></p>



<p>Send SMTP auth requests to another host.</p>



<p>Syntax: g_gateway_auth string</p>



<h3 class="wp-block-heading" id="g_gateway_always">g_gateway_always</h3>



<p><strong>Always send to gateway even if local domain exists</strong></p>



<p>Always send to gateway even if local domain exists. Not sure why you would want to use this setting other than to temporarily send mail on to another server whilst keeping the local domain and accounts intact and untouced.</p>



<p>Syntax: g_gateway_always bool</p>



<h3 class="wp-block-heading" id="g_gateway_data">g_gateway_data</h3>



<p><strong>Gateway at the data stage</strong></p>



<p>To allow bounces to be handled cleanly gateway messages before responding to the data comman so bounces can go direct without being generated and creating back scatter.</p>



<p>Syntax: g_gateway_data bool</p>



<h3 class="wp-block-heading" id="g_gateway_ifnot">g_gateway_ifnot</h3>



<p><strong>Send mail to gateway in preference to local delivery unless IP matches</strong></p>



<p>The use of g_gateway_ifnot will deliver mail to the g_gateway rule in preference to local delivery unless the IP number matches. This would typically be used to pass mail through an external SMTP server for certain or all domains for scanning purposes etc.</p>



<p>Syntax: g_gateway_ifnot string</p>



<h3 class="wp-block-heading" id="g_gateway_ignorewild_ip">g_gateway_ignorewild_ip</h3>



<p><strong>Ignore * gateway rules if from ip matches (allows outbound email scanning using gateway * to external scanner)</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_gateway_ignorewild_ip string</p>



<h3 class="wp-block-heading" id="g_gateway_helo">g_gateway_helo</h3>



<p><strong>Header that must exist in incoming bounces (g_send_helo) or bounces are dropped</strong></p>



<p>An incoming filter can discard the majority of incoming bounces by using this setting to figure out if a bounce is valid without having to do a user lookup first! Usually this would be the setting g_send_helo from your ‘outgoing’ mail server, this setting can be a list of host names.</p>



<p>Syntax: g_gateway_helo string</p>



<h3 class="wp-block-heading" id="g_gateway_orcpt">g_gateway_orcpt</h3>



<p><strong>Writes an original receipt header when forwarding a message, this may disclose multiple recipients, cc/bcc etc use only for tracking faults</strong></p>



<p>This writes a header X-Rcpt-Original: …, when forwarding a message to another server, good for tracking problems. This may disclose multiple hidden recipients, it should not be used normally</p>



<p>Syntax: g_gateway_orcpt bool</p>



<h3 class="wp-block-heading" id="g_gateway_from">g_gateway_from</h3>



<p><strong>Pass ‘from’ header thru during gatewawy check</strong></p>



<p>In some cases to verify an email address the correct ‘from’ must be passed through, normally this is a bad idea as it will cause spf failures, but it is sometimes necessary</p>



<p>Syntax: g_gateway_from bool</p>



<h3 class="wp-block-heading" id="g_gateway_mx">g_gateway_mx</h3>



<p><strong>If specified IP address is found in mx record for destination then allow relay (not recommended)</strong></p>



<p>This can be useful if you have thousands of servers using your machine for mx backup and you want to allow them simply because the mx records exist, it’s much better to use g_gateway or g_relay settings instead as this saves lookups and makes the results entirely more predictable <img src="https://s.w.org/images/core/emoji/15.0.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<p>Syntax: g_gateway_mx string</p>



<h3 class="wp-block-heading" id="g_gateway_shuffle">g_gateway_shuffle</h3>



<p><strong>Round robbin shuffle of to ip addresses for gateway rules</strong></p>



<p>Use if you wish to spread outgoing load evenly to multiple outgoing servers.</p>



<p>Syntax: g_gateway_shuffle bool</p>



<h3 class="wp-block-heading" id="g_group_field">g_group_field</h3>



<p><strong>Group Field from authentication database</strong></p>



<p>Based upon a match on an arbitrary field in the authentication database a user can be defined as being part of an access_group. All fields (field, value, group) are required. eg: To add the user to the access_group “paid_user” if the field “mystatus” has the value “fullaccess”:</p>



<p>g_group_field field=”mystatus” value=”fullaccess” group=”paid_user”</p>



<p>Syntax: g_group_field field=string value=string group=string</p>



<h3 class="wp-block-heading" id="g_gzip_disable">g_gzip_disable</h3>



<p><strong>Disable gzip web compression</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_gzip_disable bool</p>



<h3 class="wp-block-heading" id="g_hack_detect_disable">g_hack_detect_disable</h3>



<p><strong>Stop admin emails when users login with a weak password</strong></p>



<p>Useful if you must have weak passwords for some reason</p>



<p>Syntax: g_hack_detect_disable bool</p>



<h3 class="wp-block-heading" id="g_hack_touser">g_hack_touser</h3>



<p><strong>Send warnings about hacking directly to users</strong></p>



<p>Send warnings directly to users</p>



<p>Syntax: g_hack_touser bool</p>



<h3 class="wp-block-heading" id="g_hack_url">g_hack_url</h3>



<p><strong>Url for users to change password</strong></p>



<p>Url to your server for users to change password, if not given the user.cgi url will be generated</p>



<p>Syntax: g_hack_url string</p>



<h3 class="wp-block-heading" id="g_hack_msg">g_hack_msg</h3>



<p><strong>Message to send to users with a weak password</strong></p>



<p>Message to send to users with a weak password</p>



<p>Syntax: g_hack_msg string</p>



<h3 class="wp-block-heading" id="g_hack_report">g_hack_report</h3>



<p><strong>Address to send weak password reports to</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_hack_report string</p>



<h3 class="wp-block-heading" id="g_hack_noemail">g_hack_noemail</h3>



<p><strong>Disable weak password reports</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_hack_noemail bool</p>



<h3 class="wp-block-heading" id="g_hacker_max">g_hacker_max</h3>



<p><strong>Login guesses for one ip address before we lockout the ip address</strong></p>



<p>Stops hackers from guessing passwords every day until they find one, use tellmail unlock ip.number to unlock, or whitelist it…</p>



<p>Syntax: g_hacker_max int</p>



<h3 class="wp-block-heading" id="g_hacker_whitelist">g_hacker_whitelist</h3>



<p><strong>Ip addresses to avoid guessing issues</strong></p>



<p>Whitelist for gateways or other systems that you expect multiple failed logins from (e.g. webmail host)</p>



<p>Syntax: g_hacker_whitelist string</p>



<h3 class="wp-block-heading" id="g_hacker_poison">g_hacker_poison</h3>



<p><strong>Poison accounts. Instantly blacklist ip address e.g. root@*</strong></p>



<p>If user tries to login with this account then their ip address is blocked from further logins. Give full domain name or wild card, e.g. root@your.domain,staff@*</p>



<p>Syntax: g_hacker_poison string</p>



<h3 class="wp-block-heading" id="g_hacker_weak">g_hacker_weak</h3>



<p><strong>If user tries weak password, lockout ip address</strong></p>



<p>If someone is ‘guessing’ weak passwords their ip address will be locked out</p>



<p>Syntax: g_hacker_weak bool</p>



<h3 class="wp-block-heading" id="g_hacker_password">g_hacker_password</h3>



<p><strong>If hacker attempts to login with account name as password, then blacklist ip</strong></p>



<p>Good for stopping robots guessing accounts</p>



<p>Syntax: g_hacker_password bool</p>



<h3 class="wp-block-heading" id="g_hacker_passwords">g_hacker_passwords</h3>



<p><strong>Failed logins that use these passwords will lockout the ip address</strong></p>



<p>List commonly guessed passwords, e.g. 12345678</p>



<p>Syntax: g_hacker_passwords string</p>



<h3 class="wp-block-heading" id="g_hacker_alert">g_hacker_alert</h3>



<p><strong>Email manager if address is locked out</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_hacker_alert bool</p>



<h3 class="wp-block-heading" id="g_hacker_fwd">g_hacker_fwd</h3>



<p><strong>Email manager if user sets fowarding rule</strong></p>



<p>Useful to identify a spammer trying to set a bounce address to pickup incoming email</p>



<p>Syntax: g_hacker_fwd bool</p>



<h3 class="wp-block-heading" id="g_hacker_days">g_hacker_days</h3>



<p><strong>Days to keep ipaddress locked out, default 7</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_hacker_days int</p>



<h3 class="wp-block-heading" id="g_hacker_more">g_hacker_more</h3>



<p><strong>Be more restrictive, don’t allow /24 netblocks based on loginip</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_hacker_more bool</p>



<h3 class="wp-block-heading" id="g_header_out">g_header_out</h3>



<p><strong>Header to add to outgoing posts</strong></p>



<p>Mail header to add to outgoing mailing list posts.</p>



<p>Syntax: g_header_out string</p>



<h3 class="wp-block-heading" id="g_help_local">g_help_local</h3>



<p><strong>Make all help references to the local help files</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_help_local bool</p>



<h3 class="wp-block-heading" id="g_help_url">g_help_url</h3>



<p><strong>Link to another website for help instead of surgemail.com</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_help_url string</p>



<h3 class="wp-block-heading" id="g_helo_optional">g_helo_optional</h3>



<p><strong>Make the SMTP Helo optional</strong></p>



<p>Helo is optional for SMTP protocol (not recommended).</p>



<p>Syntax: g_helo_optional bool</p>



<h3 class="wp-block-heading" id="g_home">g_home</h3>



<p><strong>Root directory of the mail server</strong></p>



<p>This setting controls where the mail server runs including the many sub directories it creates below this directory for work files and log files for each domain. Not something you should generally change.&nbsp;</p>



<p>Syntax: g_home string</p>



<h3 class="wp-block-heading" id="g_honeypot_key">g_honeypot_key</h3>



<p><strong>Key for HTTP RBL service www.projecthoneypot.org – not recommended</strong></p>



<p>Do not share your key you can get a key for free from this web site. By defining this setting you will enable honeypot lookups, which in turn will block web imap pop and smtp authentication connections from listed sites, it does not block normal incoming email, but does reduce the permitted guess count to ‘1’. You can whitelist an ip address using g_spam_allow or g_hacker_whitelist, this setting will tend to cause false positives which will stop users logging in, we don’t recommend you use this setting currently.</p>



<p>Syntax: g_honeypot_key string</p>



<h3 class="wp-block-heading" id="g_honeypot_rbl">g_honeypot_rbl</h3>



<p><strong>RBL name to lookup, typically dnsbl.httpbl.org</strong></p>



<p>This is the name of the rbl database we are going to query</p>



<p>Syntax: g_honeypot_rbl string</p>



<h3 class="wp-block-heading" id="g_host_redirect">g_host_redirect</h3>



<p><strong>Redirection based on host for surgeweb’s https_required redirection</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_host_redirect from=string to=string</p>



<h3 class="wp-block-heading" id="g_http_proxy">g_http_proxy</h3>



<p><strong>Proxy web server for fetching files via HTTP</strong></p>



<p>Proxy web server for fetching files if direct access fails. (mainly for updates to the spam prevention rules from netwinsite.com and for downloading the latest version of the SurgePlus Windows client to make available to your users.)&nbsp;</p>



<p>Syntax: g_http_proxy string</p>



<h3 class="wp-block-heading" id="g_http_11">g_http_11</h3>



<p><strong>Use http 1.1 requests to netwinsite (do not use)</strong></p>



<p>Experimental setting do not use</p>



<p>Syntax: g_http_11 bool</p>



<h3 class="wp-block-heading" id="g_ipv6_enable">g_ipv6_enable</h3>



<p><strong>Enable IPV6 networking only use if you have an IPV6 address for some reason</strong></p>



<p>Enable IPV6 networking, Best avoided unless your mail server is in ipv6 address space.</p>



<p>Syntax: g_ipv6_enable bool</p>



<h3 class="wp-block-heading" id="g_ipv6_notrim">g_ipv6_notrim</h3>



<p><strong>Prevent automatic conversion of ::ffff:x.x.x.x to x.x.x.x</strong></p>



<p>Disables the automatic conversion of addresses to ipv4 format strings on linux</p>



<p>Syntax: g_ipv6_notrim bool</p>



<h3 class="wp-block-heading" id="g_imap_acl">g_imap_acl</h3>



<p><strong>Enable ACL (shared folders) in imap</strong></p>



<p>This setting allows folders to be shared between users. See the domain setting ‘imap_public’. Requires surgemail 3.9d or later! For this to work you will need an imap client that supports ACL’s to create and map shared folders (.e.g. thunderbird)</p>



<p>Syntax: g_imap_acl bool</p>



<h3 class="wp-block-heading" id="g_imap_auto_create">g_imap_auto_create</h3>



<p><strong>Create folders matching this list in response to ‘select’ commands</strong></p>



<p>Some imap clients assume certain folders exist, this setting can be used to let surgemail auto create such folders when the imap client requests some action involving the folder</p>



<p>Syntax: g_imap_auto_create string</p>



<h3 class="wp-block-heading" id="g_imap_auto_subscribe">g_imap_auto_subscribe</h3>



<p><strong>Auto subscribe folders for users</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_imap_auto_subscribe bool</p>



<h3 class="wp-block-heading" id="g_imap_blacklist">g_imap_blacklist</h3>



<p><strong>Test if imap users are in rbl’s and email admin</strong></p>



<p>This lets you find any of your users who’s ip address has been blacklisted, at most it will email once a day, any additional entries are logged in mail.err log file (search for ‘blacklist’)</p>



<p>Syntax: g_imap_blacklist bool</p>



<h3 class="wp-block-heading" id="g_imap_cram_enable">g_imap_cram_enable</h3>



<p><strong>Enable CRAM-MD5 authentication (requires nwauth 4.0h or greater)</strong></p>



<p>Please note that CRAM-MD5 does have security implications, specifically it means that the local users password must be stored in a semi reversable state in the authent database. Also you must be using the new version of the NWAuth module.</p>



<p>Syntax: g_imap_cram_enable bool</p>



<h3 class="wp-block-heading" id="g_imap_capa">g_imap_capa</h3>



<p><strong>Where to get the CAPABILITY value from</strong></p>



<p>When you have suffix based domains and you’re using SurgeWall the CAPABILITY request comes before the domain of the user is known. As such SurgeMail cannot determine whether to send the real servers CAPABILITY or it’s own. This setting will choose the default behaviour, valid values are: Local,&nbsp;. By default SurgeMail defaults to the behaviour of the primary domain, if it’s surgewall then it obtains the real server capability. “Local” defaults to SurgeMails own capability, and&nbsp;defaults to the real server capability.</p>



<p>Syntax: g_imap_capa string</p>



<h3 class="wp-block-heading" id="g_imap_capa_strip">g_imap_capa_strip</h3>



<p><strong>Capability values to hide</strong></p>



<p>In some situations you might not want to advertise server capabilities, for example SURGEMAIL and XFLDDATA when they cause problems with SurgeWall operations. Or perhaps the IDLE capability. Specifying the capability strings to hide here will cause SurgeMail to stop advertising those capabilies.</p>



<p>Syntax: g_imap_capa_strip string</p>



<h3 class="wp-block-heading" id="g_imap_debug">g_imap_debug</h3>



<p><strong>For NetWin use only</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_imap_debug bool</p>



<h3 class="wp-block-heading" id="g_imap_expunge_close">g_imap_expunge_close</h3>



<p><strong>Expunge on every close, not recommended</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_imap_expunge_close bool</p>



<h3 class="wp-block-heading" id="g_imap_folder">g_imap_folder</h3>



<p><strong>folder-create-auto-create-default-folders-for-trash-sent-etc" &gt;</strong></p>



<p>Warning this may change the default folder currently used by creating one the user didn’t previously have</p>



<p>Syntax: g_imap_folder_create bool</p>



<h3 class="wp-block-heading" id="g_imap_folder_create">g_imap_folder_create</h3>



<p><strong>Auto create default folders for Trash/Sent etc</strong></p>



<p>Warning this may change the default folder currently used by creating one the user didn’t previously have</p>



<p>Syntax: g_imap_folder_create bool</p>



<h3 class="wp-block-heading" id="g_imap_idle_free">g_imap_idle_free</h3>



<p><strong>Releases threads in ‘idle’ state</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_imap_idle_free bool</p>



<h3 class="wp-block-heading" id="g_imap_inactive_free">g_imap_inactive_free</h3>



<p><strong>Releases threads not active</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_imap_inactive_free bool</p>



<h3 class="wp-block-heading" id="g_imap_log_protocol">g_imap_log_protocol</h3>



<p><strong>Log IMAP protocol</strong></p>



<p>Log IMAP protocol and other IMAP information to the mail.log file.</p>



<p>Syntax: g_imap_log_protocol bool</p>



<h3 class="wp-block-heading" id="g_imap_log_main">g_imap_log_main</h3>



<p><strong>Log imap to mail.log too (not recommended)</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_imap_log_main bool</p>



<h3 class="wp-block-heading" id="g_imap_log_size">g_imap_log_size</h3>



<p><strong>Size of imap.log file</strong></p>



<p>This sets the imap.log file size, default is 2mb</p>



<p>Syntax: g_imap_log_size int</p>



<h3 class="wp-block-heading" id="g_imap_log_flush">g_imap_log_flush</h3>



<p><strong>IMAP log flush</strong></p>



<p>Flush IMAP log on every write (for debugging).</p>



<p>Syntax: g_imap_log_flush bool</p>



<h3 class="wp-block-heading" id="g_imap_log_copy">g_imap_log_copy</h3>



<p><strong>Log imap copy commands to msg*.rec log files</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_imap_log_copy bool</p>



<h3 class="wp-block-heading" id="g_imap_log_header">g_imap_log_header</h3>



<p><strong>Log imap fetch header commands to msg*.rec log files (not usually needed)</strong></p>



<p>This logs rather a lot so may create excessive logging. Probably the log body setting is more wise.</p>



<p>Syntax: g_imap_log_header bool</p>



<h3 class="wp-block-heading" id="g_imap_log_body">g_imap_log_body</h3>



<p><strong>Log imap fetch body commands to msg*.rec log files</strong></p>



<p>This only logs when a body or body part is read via imap</p>



<p>Syntax: g_imap_log_body bool</p>



<h3 class="wp-block-heading" id="g_imap_loop_report">g_imap_loop_report</h3>



<p><strong>Report imap loops of bad email clients</strong></p>



<p>This only logs when a body or body part is read via imap</p>



<p>Syntax: g_imap_loop_report bool</p>



<h3 class="wp-block-heading" id="g_imap_move">g_imap_move</h3>



<p><strong>IMAP move extension</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_imap_move bool</p>



<h3 class="wp-block-heading" id="g_imap_maxdup">g_imap_maxdup</h3>



<p><strong>Max duplicate imap fetch commands before we throttle connection, default 500</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_imap_maxdup int</p>



<h3 class="wp-block-heading" id="g_imap_port">g_imap_port</h3>



<p><strong>IMAP Port (default 143)</strong></p>



<p>Specifies the PORT to listen for IMAP connections on. IMAP is an alternative to POP protocol where the messages and folders all exist on the server. This is ideal when sharing a mail account between several users or when using Email from more than one computer.&nbsp; Use the keyword ‘disabled’ to disable this part of the surgemail service.</p>



<p>Syntax: g_imap_port int</p>



<h3 class="wp-block-heading" id="g_imap_delay">g_imap_delay</h3>



<p><strong>Glob data into bigger packets, never use this</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_imap_delay bool</p>



<h3 class="wp-block-heading" id="g_imap_secure_port">g_imap_secure_port</h3>



<p><strong>IMAP Port (default 993)</strong></p>



<p>Specifies the PORT to listen for dedicated SSL IMAP connections.</p>



<p>Syntax: g_imap_secure_port int</p>



<h3 class="wp-block-heading" id="g_imap_search_noattach">g_imap_search_noattach</h3>



<p><strong>Skip non text attachments when searching</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_imap_search_noattach bool</p>



<h3 class="wp-block-heading" id="g_imap_search_index">g_imap_search_index</h3>



<p><strong>Build and use indexes for imap header searching</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_imap_search_index bool</p>



<h3 class="wp-block-heading" id="g_imap_search_body">g_imap_search_body</h3>



<p><strong>Build and use indexes for imap body searching</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_imap_search_body bool</p>



<h3 class="wp-block-heading" id="g_imap_search_text">g_imap_search_text</h3>



<p><strong>Use only body and header indexes, fast but won’t get all matches</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_imap_search_text bool</p>



<h3 class="wp-block-heading" id="g_imap_search_timeout">g_imap_search_timeout</h3>



<p><strong>Limit on imap search, default is 180 seconds</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_imap_search_timeout int</p>



<h3 class="wp-block-heading" id="g_imap_spam_train">g_imap_spam_train</h3>



<p><strong>Train if moving message to ‘spam’ folder, or from ‘spam’ folder to inbox</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_imap_spam_train bool</p>



<h3 class="wp-block-heading" id="g_imap_status_cache">g_imap_status_cache</h3>



<p><strong>Cache imap status responses (Obsolete, use _stored setting)</strong></p>



<p>Improves performance/reduces disk IO for imap</p>



<p>Syntax: g_imap_status_cache bool</p>



<h3 class="wp-block-heading" id="g_imap_status_stored">g_imap_status_stored</h3>



<p><strong>Keep imap folder counts stored on disk</strong></p>



<p>Improves performance/reduces disk IO for imap</p>



<p>Syntax: g_imap_status_stored bool</p>



<h3 class="wp-block-heading" id="g_imap_no_internal_date">g_imap_no_internal_date</h3>



<p><strong>Disable the internal date output on IMAP commands</strong></p>



<p>The RFC implementation of internal dateis broken wiht MS outlook. SurgeMail has been modified to conform to the outlook inplementation of internal date making this setting redundant..</p>



<p>Syntax: g_imap_no_internal_date bool</p>



<h3 class="wp-block-heading" id="g_imap_maxbusy">g_imap_maxbusy</h3>



<p><strong>Limit for concurrent requests per user, user is throttled if exceeded</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_imap_maxbusy int</p>



<h3 class="wp-block-heading" id="g_imap_throttle">g_imap_throttle</h3>



<p><strong>Limit for sustained imap commands per second before warning admin, default is 5</strong></p>



<p>Useful for detecting an email client in a loop wasting your resources</p>



<p>Syntax: g_imap_throttle int</p>



<h3 class="wp-block-heading" id="g_imap_throttle_speed">g_imap_throttle_speed</h3>



<p><strong>Limit to this speed in bytes per second when throttling, e.g. 50k</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_imap_throttle_speed int</p>



<h3 class="wp-block-heading" id="g_imap_throttle_limit">g_imap_throttle_limit</h3>



<p><strong>-limit-for-sustained-imap-commands-per-second-before-warning-admin-default-is-5" &gt;</strong></p>



<p>Useful for detecting an email client in a loop wasting your resources</p>



<p>Syntax: g_imap_throttle int</p>



<h3 class="wp-block-heading" id="g_imap_throttle_exclude">g_imap_throttle_exclude</h3>



<p><strong>Users who are not limited</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_imap_throttle_exclude string</p>



<h3 class="wp-block-heading" id="g_imap_timezone">g_imap_timezone</h3>



<p><strong>Timezone to display – for testing purposes only</strong></p>



<p>as per title <img src="https://s.w.org/images/core/emoji/15.0.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<p>Syntax: g_imap_timezone string</p>



<h3 class="wp-block-heading" id="g_imap_timeout">g_imap_timeout</h3>



<p><strong>Time, in minutes for imap timeout, RFC required default is 30</strong></p>



<p>You may in some cases wish to reduce this below the RFC required default if your server is under very heavy load. Results may be unexpected when breaking RFC behavior!</p>



<p>Syntax: g_imap_timeout int</p>



<h3 class="wp-block-heading" id="g_imap_timeout_login">g_imap_timeout_login</h3>



<p><strong>Timeout prior to login in seconds</strong></p>



<p>You may in some cases wish to reduce this below the RFC required default if your server is under very heavy load. Results may be unexpected when breaking RFC behavior!</p>



<p>Syntax: g_imap_timeout_login int</p>



<h3 class="wp-block-heading" id="g_imap_trash_nocopy">g_imap_trash_nocopy</h3>



<p><strong>Prevent copying from Trash to Trash folder</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_imap_trash_nocopy bool</p>



<h3 class="wp-block-heading" id="g_imap_uidl_nofix">g_imap_uidl_nofix</h3>



<p><strong>Disable UIDL auto repair of duplicate entries</strong></p>



<p>If true disable auto repair of identical UIDL entries.</p>



<p>Syntax: g_imap_uidl_nofix bool</p>



<h3 class="wp-block-heading" id="g_imap_unsub_auto">g_imap_unsub_auto</h3>



<p><strong>Unsubscribe if a folder doesn’t exist</strong></p>



<p>Helps dumb email clients that get confused</p>



<p>Syntax: g_imap_unsub_auto bool</p>



<h3 class="wp-block-heading" id="g_imap_size_fetch">g_imap_size_fetch</h3>



<p><strong>If true, will display message sizes on fetch command. (ie * 123 EXISTS)</strong></p>



<p>Displays message size in IMAP responses</p>



<p>Syntax: g_imap_size_fetch bool</p>



<h3 class="wp-block-heading" id="g_imap_idle_nsf">g_imap_idle_nsf</h3>



<p><strong>The number of seconds before a complete directory rescan. To be used on NFS network drives</strong></p>



<p>Number of seconds for IMAP IDLE to do directory rescan – , note setting is miss spelled, do not correct it!</p>



<p>Syntax: g_imap_idle_nsf int</p>



<h3 class="wp-block-heading" id="g_imap_testing">g_imap_testing</h3>



<p><strong>Test imap module instead of normal one (not functional)</strong></p>



<p>Replace normal imap with a test one, this is not functional, do not use this setting.</p>



<p>Syntax: g_imap_testing bool</p>



<h3 class="wp-block-heading" id="g_imap_old">g_imap_old</h3>



<p><strong>Revert to old imap module</strong></p>



<p>Replace normal imap with old imap module, not recommended/supported</p>



<p>Syntax: g_imap_old bool</p>



<h3 class="wp-block-heading" id="g_imap_old_ip">g_imap_old_ip</h3>



<p><strong>Revert to old imap module for some ip’s</strong></p>



<p>Replace normal imap with old imap module, not recommended/supported</p>



<p>Syntax: g_imap_old_ip string</p>



<h3 class="wp-block-heading" id="g_imap_pop_burst">g_imap_pop_burst</h3>



<p><strong>Always burst using imap code</strong></p>



<p>Prevents redownloading messages if file indicating user is using imap is lost. Generally this setting is not needed and should not be used. Turning it on/off will result in users getting duplicate messagese if they are using POP and have leave on server ticked</p>



<p>Syntax: g_imap_pop_burst bool</p>



<h3 class="wp-block-heading" id="g_imap_friends">g_imap_friends</h3>



<p><strong>Make the friends_pending folder visible in imap</strong></p>



<p>Setting to map the friends_pending folder into an imap folder. There is no corresponding setting for the ‘held’ folder as we believe people should always use the friends mechanism as it is a superset of the held folder in functionality</p>



<p>Syntax: g_imap_friends bool</p>



<h3 class="wp-block-heading" id="g_imap_user_flags">g_imap_user_flags</h3>



<p><strong>This setting may confuse some email clients (mac) use with cautioun</strong></p>



<p>This may confused some email clients if multiple clients are used on a single account as the user flags can conflict</p>



<p>Syntax: g_imap_user_flags bool</p>



<h3 class="wp-block-heading" id="g_imap_max_messages">g_imap_max_messages</h3>



<p><strong>The number of messages in a single imap folder, default 200000</strong></p>



<p>This setting helps limit impact when a user has a large folder, it will fail to load a folder larger than this and report errors in the log, it also will prevent new deliveries once this limit is reached. </p>



<p>To resolve do NOT increase this setting, the correct solution is to use one of the builtin archving features to clean up the mailbox automatically, large folders create SERIOUS performance issues.  </p>



<p>Syntax: g_imap_max_messages int</p>



<h3 class="wp-block-heading" id="g_imap_max_limit">g_imap_max_limit</h3>



<p><strong>Limits messages being put in folders</strong></p>



<p>This setting helps limit impact when a user has a large folder, it will fail to load a folder larger than this and report errors in the log, it does not prevent the folder from having messages added to it, and it does not inform the user that the problem has occurred, this setting is primarily to limit impact of a crazy user :-), see also G_MAILDIR_MAX</p>



<p>Syntax: g_imap_max_limit int</p>



<h3 class="wp-block-heading" id="g_imap_warn_big">g_imap_warn_big</h3>



<p><strong>Warn user if inbox or sent has more than this many messages</strong></p>



<p>We recommend setting this at about 10000, users should use the auto cleanup features (via user.cgi) to archive older messages to another folder</p>



<p>Syntax: g_imap_warn_big int</p>



<h3 class="wp-block-heading" id="g_imap_sync_nomax">g_imap_sync_nomax</h3>



<p><strong>Exception to imap_max_sync setting</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_imap_sync_nomax string</p>



<h3 class="wp-block-heading" id="g_imap_sync_all">g_imap_sync_all</h3>



<p><strong>Apply imap_max_sync to all folders</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_imap_sync_all bool</p>



<h3 class="wp-block-heading" id="g_imap_allow_trailing">g_imap_allow_trailing</h3>



<p><strong>Allow leading/trailing spaces on folder names on linux, not a good idea</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_imap_allow_trailing bool</p>



<h3 class="wp-block-heading" id="g_imap_log_user">g_imap_log_user</h3>



<p><strong>Log imap info to imap.log in users mdir folder</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_imap_log_user bool</p>



<h3 class="wp-block-heading" id="g_recycling">g_recycling</h3>



<p><strong>ycling-imap-make-visible-to-imap-users-default-is-now-only-surgeweb-users" &gt;</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_recycling_imap bool</p>



<h3 class="wp-block-heading" id="g_recycling_life">g_recycling_life</h3>



<p><strong>Days to keep imap deleted messages, default 30</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_recycling_life int</p>



<h3 class="wp-block-heading" id="g_recycling_visible">g_recycling_visible</h3>



<p><strong>Only allow members of this group to see recycling folder</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_recycling_visible string</p>



<h3 class="wp-block-heading" id="g_recycling_imap">g_recycling_imap</h3>



<p><strong>Make visible to IMAP users, default is now ONLY surgeweb users</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_recycling_imap bool</p>



<h3 class="wp-block-heading" id="g_recycling_del">g_recycling_del</h3>



<p><strong>Allow usergroup to delete messages from the recycle folder</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_recycling_del string</p>



<h3 class="wp-block-heading" id="g_recycling_pop">g_recycling_pop</h3>



<p><strong>Do recycling for POP deletes too</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_recycling_pop bool</p>



<h3 class="wp-block-heading" id="g_inbox_archive">g_inbox_archive</h3>



<p><strong>Archive old messages to Archives/yyyy/Inbox folder, age in days</strong></p>



<p>Trigger with tellmail mail_rules (or it will run once a week)</p>



<p>Syntax: g_inbox_archive int</p>



<h3 class="wp-block-heading" id="g_sent_archive">g_sent_archive</h3>



<p><strong>Archive old messages to Archives/yyyy/Sent folder, age in days</strong></p>



<p>Trigger with tellmail mail_rules (or it will run once a week)</p>



<p>Syntax: g_sent_archive int</p>



<h3 class="wp-block-heading" id="g_inbox_max">g_inbox_max</h3>



<p><strong>Max messages permitted in inbox e.g. 5000</strong></p>



<p>This setting will stop users leaving lots of message in their inbox. Valid range would be 1000 to 10000 depending on the nature of your users. A smaller number can reduce load on your server. The user is warned when the reach 70% and 95% of the limit. Users can cleanup their inbox automatically by enabling the auto archive feature in their web self admin settings.  or with g_inbox_archive globally.</p>



<p>Syntax: g_inbox_max int</p>



<h3 class="wp-block-heading" id="g_inbox_nolimit">g_inbox_nolimit</h3>



<p><strong>Users with no limit on inbox</strong></p>



<p>Use for special users who are not subject to the normail message count limit on their inbox (g_inbox_max)</p>



<p>Syntax: g_inbox_nolimit string</p>



<h3 class="wp-block-heading" id="g_include">g_include</h3>



<p><strong>Include another ini file global settings only</strong></p>



<p>Unlike the include command this setting will allow editing of the ini file in web admin, but settings included via this setting will not appear in the admin interface</p>



<p>Syntax: g_include string</p>



<h3 class="wp-block-heading" id="g_iplimit">g_iplimit</h3>



<p><strong>Untrusted local ip addresses e.g. web servers, special sending limits applied.</strong></p>



<p>These limit settings let you control untrusted sources which may get viruses or cgi scripts that open them up to abuse. By throttling the remote addreses limit this will prevent any significant abuse. Authenticated sessions are ‘not’ limited!.</p>



<p>Syntax: g_iplimit string</p>



<h3 class="wp-block-heading" id="g_iplimit_local">g_iplimit_local</h3>



<p><strong>Max sends from untrusted ip to local domains per 30 minutes.</strong></p>



<p>See explanation of g_iplimit</p>



<p>Syntax: g_iplimit_local int</p>



<h3 class="wp-block-heading" id="g_iplimit_remote">g_iplimit_remote</h3>



<p><strong>Max sends from untrusted ip to remote domains per 30 minutes.</strong></p>



<p>See explanation of g_iplimit</p>



<p>Syntax: g_iplimit_remote int</p>



<h3 class="wp-block-heading" id="g_iplimit_islocal">g_iplimit_islocal</h3>



<p><strong>Add domains to list of domains considered local for limit counting</strong></p>



<p>See explanation of g_iplimit</p>



<p>Syntax: g_iplimit_islocal string</p>



<h3 class="wp-block-heading" id="g_iplimit_whitelist">g_iplimit_whitelist</h3>



<p><strong>List of ‘from’ addresses that should bypass limits</strong></p>



<p>This lets you bypass the iplimit restrictions for a known trusted user/form that needs to send a lot of local/remote emails</p>



<p>Syntax: g_iplimit_whitelist string</p>



<h3 class="wp-block-heading" id="g_kann_test">g_kann_test</h3>



<p><strong>Testing spam module do not use</strong></p>



<p>Testing a new feature do not use</p>



<p>Syntax: g_kann_test bool</p>



<h3 class="wp-block-heading" id="g_keepalive">g_keepalive</h3>



<p><strong>Attempts to use keepalive for the web sessions (experimental &amp; faulty currently)</strong></p>



<p>Don’t use this yet, we are still working on it.</p>



<p>Syntax: g_keepalive bool</p>



<h3 class="wp-block-heading" id="g_key_manual">g_key_manual</h3>



<p><strong>Try and activate automatically when the key expires</strong></p>



<p>When you purchase updates you must activate to get the expire date reset in surgemail, if this setting is not turned on then surgemail will try and do this automatically for you.</p>



<p>Syntax: g_key_manual bool</p>



<h3 class="wp-block-heading" id="g_key_nowarning">g_key_nowarning</h3>



<p><strong>Disable reminders to update your license</strong></p>



<p>Disables the email reminding you to pay for updates for virus and spam filter and new versions etc…</p>



<p>Syntax: g_key_nowarning bool</p>



<h3 class="wp-block-heading" id="g_known_skip">g_known_skip</h3>



<p><strong>Disable the bypass of known ip addresses from spf failures</strong></p>



<p>Purely for testing</p>



<p>Syntax: g_known_skip bool</p>



<h3 class="wp-block-heading" id="g_last_login">g_last_login</h3>



<p><strong>Create last_login.time files</strong></p>



<p>If true then when users login via pop or imap or webmail the file last_login.time is created/touched, this can then be used by local scripts to determine which user directories are not in active use.</p>



<p>Syntax: g_last_login bool</p>



<h3 class="wp-block-heading" id="g_last_login_days">g_last_login_days</h3>



<p><strong>If last login is more than this many days then reject email – do not use on mirrors</strong></p>



<p>This can be used on a shared disk cluster to establish which users are inactive. On a normal mirror or stand alone system you should use DISABLE_SMTP_AFTER</p>



<p>Syntax: g_last_login_days int</p>



<h3 class="wp-block-heading" id="g_late_forward">g_late_forward</h3>



<p><strong>Apply all users forwarding rules after friends, spam, and filtering</strong></p>



<p>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 all user forwarding rules to be applied after friends, spam and filtering.</p>



<p>Syntax: g_late_forward bool</p>



<h3 class="wp-block-heading" id="g_late_skiplocal">g_late_skiplocal</h3>



<p><strong>Skip late forwarding for local destinations</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_late_skiplocal bool</p>



<h3 class="wp-block-heading" id="g_ldap_port">g_ldap_port</h3>



<p><strong>LDAP Port (normally 389)</strong></p>



<p>If specified this enables the mini ldap server inside surgemail which allows users with email clients that can do ‘ldap’ directory lookups to search for other users on the system. Obviously this should NEVER BE turned on for a public mail server, it is only appropriate with private mail servers where all users who can access the system are trusted.</p>



<p>There are additional ‘domain’ settings ldap_anydomain, which lets users search for users outside their own domain name. And ldap_disable which can disable ldap for specific domains.</p>



<p>Syntax: g_ldap_port int</p>



<h3 class="wp-block-heading" id="g_ldap_forward">g_ldap_forward</h3>



<p><strong>Remote ldap server to forward requests to (only for testing do not use)</strong></p>



<p>Forwards all ldap requests to another host, primarily intended for testing, use at your own risk.</p>



<p>Syntax: g_ldap_forward string</p>



<h3 class="wp-block-heading" id="g_ldap_outlook_browse_max">g_ldap_outlook_browse_max</h3>



<p><strong>Basic outlook ldap address browsing, max items (KEEP THIS SMALL eg &lt;50): default=0 (disabled)</strong></p>



<p>numeric maximum items to return default=0 (ie disabled)</p>



<p>Syntax: g_ldap_outlook_browse_max int</p>



<h3 class="wp-block-heading" id="g_ssl_auto">g_ssl_auto</h3>



<p><strong>Generate letsencrpt ssl certificates automatically for all domains</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_ssl_auto bool</p>



<h3 class="wp-block-heading" id="g_ssl_lets_slave">g_ssl_lets_slave</h3>



<p><strong>Run letsencrypt on SLAVE too</strong></p>



<p>Also exclude url_host on the mirroring exclude settings</p>



<p>Syntax: g_ssl_lets_slave bool</p>



<h3 class="wp-block-heading" id="g_ssl_lets_path">g_ssl_lets_path</h3>



<p><strong>Path to webservers /.well-known folder for letsencrypt</strong></p>



<p>Use this if you have a webserver that is running on port 80 but you still wish to generate ssl certificates automatically. Folder must be writeable by user ‘mail’ on linux</p>



<p>Syntax: g_ssl_lets_path string</p>



<h3 class="wp-block-heading" id="g_ssl_lets_exclude">g_ssl_lets_exclude</h3>



<p><strong>Domains urls to not update, user must copy from ssl to lets folder</strong></p>



<p>The certifictes must be coppied from the ssl to the lets folder manually!</p>



<p>Syntax: g_ssl_lets_exclude string</p>



<h3 class="wp-block-heading" id="g_ssl_guess_domain">g_ssl_guess_domain</h3>



<p><strong>Guess domain using SSL hostname to allow login without @domain.name</strong></p>



<p>The certifictes must be coppied from the ssl to the lets folder manually!</p>



<p>Syntax: g_ssl_guess_domain bool</p>



<h3 class="wp-block-heading" id="g_letsencrypt">g_letsencrypt</h3>



<p><strong>Path to find letsencrypt certificates (obsolete)</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_letsencrypt string</p>



<h3 class="wp-block-heading" id="g_local_skipgateway">g_local_skipgateway</h3>



<p><strong>Skip gateway rule for local messages</strong></p>



<p>If true skip gateway rule for local messages (bounces etc).&nbsp;</p>



<p>Syntax: g_local_skipgateway bool</p>



<h3 class="wp-block-heading" id="g_log_fakemid">g_log_fakemid</h3>



<p><strong>Header to use instead of message-id in log files</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_log_fakemid string</p>



<h3 class="wp-block-heading" id="g_log_flush">g_log_flush</h3>



<p><strong>Flushing log – flush on every write</strong></p>



<p>This makes the server flush log data after every write to the file. This affects performance but can sometimes be the only way to track down an unusual fault eg: if the server dies the log is completely up to date and shows the last thing the server did before dying.&nbsp;</p>



<p>Syntax: g_log_flush bool</p>



<h3 class="wp-block-heading" id="g_log_fwd">g_log_fwd</h3>



<p><strong>Log fwd/redirection rules associated in msg.rec</strong></p>



<p>Log fwd/redirection rules associated with g_log_rcpt in msg.rec files.&nbsp;</p>



<p>Syntax: g_log_fwd bool</p>



<h3 class="wp-block-heading" id="g_log_level">g_log_level</h3>



<p><strong>Set logging level</strong></p>



<p>Set the logging level. This is primarily intended for finding faults with the server. Info level logging is the default. Alternatives are ‘error’ and ‘debug’&nbsp;</p>



<p>Syntax: g_log_level string</p>



<h3 class="wp-block-heading" id="g_log_disable">g_log_disable</h3>



<p><strong>Disable most logging – not recommended</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_log_disable bool</p>



<h3 class="wp-block-heading" id="g_log_path">g_log_path</h3>



<p><strong>Path for log files</strong></p>



<p>Sets the path for all SurgeMails generated logfiles. (except the delivery record logs)</p>



<p>Syntax: g_log_path string</p>



<h3 class="wp-block-heading" id="g_log_password">g_log_password</h3>



<p><strong>Log password failures to login_failed.log</strong></p>



<p>It is considered bad form to do this, but it can be very useful, so it’s up to you!</p>



<p>Syntax: g_log_password bool</p>



<h3 class="wp-block-heading" id="g_log_pid">g_log_pid</h3>



<p><strong>Log pid</strong></p>



<p>Log PID along with thread-id in the UNIXlog files.</p>



<p>Syntax: g_log_pid bool</p>



<h3 class="wp-block-heading" id="g_log_thid">g_log_thid</h3>



<p><strong>Log thread id in .rec files</strong></p>



<p>Logs the thread id in the msg*.rec files, this is good for some types of debugging.</p>



<p>Syntax: g_log_thid bool</p>



<h3 class="wp-block-heading" id="g_log_reject_disable">g_log_reject_disable</h3>



<p><strong>Disable the logging of rejected mail</strong></p>



<p>SurgeMail will normally log failed deliveries due to MFilter / SmiteSpam / etc in the delivery logs. This setting will restrict this logging to accepted mail only.</p>



<p>Syntax: g_log_reject_disable bool</p>



<h3 class="wp-block-heading" id="g_log_bounce_disable">g_log_bounce_disable</h3>



<p><strong>Stop bounce reject entries filling up log (typically from spam bounces)</strong></p>



<p>Disables useless logging in msg*.rec files, only recommended for busy servers</p>



<p>Syntax: g_log_bounce_disable bool</p>



<h3 class="wp-block-heading" id="g_log_dropped_disable">g_log_dropped_disable</h3>



<p><strong>Don’t log if no ‘data’ command sent</strong></p>



<p>Disables useless logging in msg*.rec files, only recommended for busy servers</p>



<p>Syntax: g_log_dropped_disable bool</p>



<h3 class="wp-block-heading" id="g_log_norcpt">g_log_norcpt</h3>



<p><strong>Don’t log individual recipients in msg.rec files</strong></p>



<p>Log individual recipients in msg.rec files</p>



<p>Syntax: g_log_norcpt bool</p>



<h3 class="wp-block-heading" id="g_log_size">g_log_size</h3>



<p><strong>Size of the mail.log files before they are rotated</strong></p>



<p>The mail.log files are a fixed size rotating log of what is happening inside SurgeMail. Dependant on the load of your server this may contain a few days worth of activity or a few minutes worth. This setting allows you to change the default 2MB before rotation size.</p>



<p>Syntax: g_log_size int</p>



<h3 class="wp-block-heading" id="g_log_dns">g_log_dns</h3>



<p><strong>Log dns responses in gory detail</strong></p>



<p>Useful when debugging unexpected DNS results, search for ‘dns’ in mail.log to find the results.</p>



<p>Syntax: g_log_dns bool</p>



<h3 class="wp-block-heading" id="g_log_slow">g_log_slow</h3>



<p><strong>Do slower logging system</strong></p>



<p>Forces logging to disk even if it may slow things down. Not recommended.</p>



<p>Syntax: g_log_slow bool</p>



<h3 class="wp-block-heading" id="g_log_start_norotate">g_log_start_norotate</h3>



<p><strong>Don’t rotate log on startup</strong></p>



<p>By default the mail.log is rotated to mail2.log… on startup.</p>



<p>Syntax: g_log_start_norotate bool</p>



<h3 class="wp-block-heading" id="g_log_user">g_log_user</h3>



<p><strong>Log pop/imap/smtp protocol for specified user</strong></p>



<p>Creates a file for each user that matches this list, user_user@domain.log</p>



<p>Syntax: g_log_user string</p>



<h3 class="wp-block-heading" id="g_log_quota">g_log_quota</h3>



<p><strong>Log quota for specified user</strong></p>



<p>Creates a file for each user that matches this list, user_user@domain.log</p>



<p>Syntax: g_log_quota string</p>



<h3 class="wp-block-heading" id="g_log_date">g_log_date</h3>



<p><strong>Log full date in log files</strong></p>



<p>Makes log lines more complete</p>



<p>Syntax: g_log_date bool</p>



<h3 class="wp-block-heading" id="g_log_date_msg">g_log_date_msg</h3>



<p><strong>Log full date in msg log files (g_log_date required too)</strong></p>



<p>Makes log lines more complete with the full date</p>



<p>Syntax: g_log_date_msg bool</p>



<h3 class="wp-block-heading" id="g_log_syslog">g_log_syslog</h3>



<p><strong>Send ‘msg.rec’ entries to syslog</strong></p>



<p>This is useful to ‘merge’ log information on a single host, on unix you specify the destination in your syslog configuration rather than specifying a host. On windows you can specify the remote host as you may not have a local syslog daemon</p>



<p>Syntax: g_log_syslog bool</p>



<h3 class="wp-block-heading" id="g_log_syslog_debug">g_log_syslog_debug</h3>



<p><strong>Send ‘mail.log’ entries to syslog as ‘mail.debug’ data</strong></p>



<p>This data is probably not worth sending to syslog, it’s really debugging information of no long term value and too much to store.</p>



<p>Syntax: g_log_syslog_debug bool</p>



<h3 class="wp-block-heading" id="g_log_syslog_only">g_log_syslog_only</h3>



<p><strong>Disable writing to msg.rec</strong></p>



<p>This prevents the local logs from being written</p>



<p>Syntax: g_log_syslog_only bool</p>



<h3 class="wp-block-heading" id="g_log_syslog_host">g_log_syslog_host</h3>



<p><strong>Specify host to send syslog entries to (windows only)</strong></p>



<p>On windows this lets you tell surgemail where the syslog deamon is, on unix you can do this in your syslog config file.</p>



<p>Syntax: g_log_syslog_host string</p>



<h3 class="wp-block-heading" id="g_policy_enable">g_policy_enable</h3>



<p><strong>Enable policy.dat rules, still testing</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_policy_enable bool</p>



<h3 class="wp-block-heading" id="g_safe_smtp">g_safe_smtp</h3>



<p><strong>Force users to prove they are real if logging in from unknown sources via smtp</strong></p>



<p>This feature is intended to prevent spamers/hackers from harvesting accounts on your system and then using them to send out spam, the user is sent an email to enable logins</p>



<p>Syntax: g_safe_smtp bool</p>



<h3 class="wp-block-heading" id="g_safe_smtp_email">g_safe_smtp_email</h3>



<p><strong>Email manager as remote ip addresses are added</strong></p>



<p>This feature is intended to prevent spamers/hackers from harvesting accounts on your system and then using them to send out spam</p>



<p>Syntax: g_safe_smtp_email bool</p>



<h3 class="wp-block-heading" id="g_safe_alert">g_safe_alert</h3>



<p><strong>Email manager when user fails to login from new ip</strong></p>



<p>Useful to keep an eye on users and hackers</p>



<p>Syntax: g_safe_alert bool</p>



<h3 class="wp-block-heading" id="g_safe_warning">g_safe_warning</h3>



<p><strong>Email user for logins from new ip addresses</strong></p>



<p>Helps alert users if their account has been hacked, will also cause confusion though. This is not the same as g_safe_smtp which also generates user level warnings…</p>



<p>Syntax: g_safe_warning bool</p>



<h3 class="wp-block-heading" id="g_safe_country_nowarning">g_safe_country_nowarning</h3>



<p><strong>Whitelist countries for just this setting</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_safe_country_nowarning string</p>



<h3 class="wp-block-heading" id="g_safe_text">g_safe_text</h3>



<p><strong>The first line of the warning email when a new login occurs</strong></p>



<p>This lets you explain to the user what this email is about.</p>



<p>Syntax: g_safe_text string</p>



<h3 class="wp-block-heading" id="g_safe_imap">g_safe_imap</h3>



<p><strong>Force users to prove they are real if logging in from pop/imap NEVER NEVER USE</strong></p>



<p>This feature is intended to prevent spamers/hackers from harvesting accounts on your system and then using them to send out spam. This setting should never be used as users often never see the error and just get prompted for a new password.</p>



<p>Syntax: g_safe_imap bool</p>



<h3 class="wp-block-heading" id="g_safe_white">g_safe_white</h3>



<p><strong>White list for g_safe* settings</strong></p>



<p>These ip addresses are always considered to safe, typically internal networks, 10.*.*.* .</p>



<p>Syntax: g_safe_white string</p>



<h3 class="wp-block-heading" id="g_safe_country">g_safe_country</h3>



<p><strong>White list use 2 char country code, e.g. US,NZ,AU a list is ok</strong></p>



<p>This whitelists your entire country, which can help prevent user confusion by blocking logins while still blocking logins from the rest of the world</p>



<p>Syntax: g_safe_country string</p>



<h3 class="wp-block-heading" id="g_safe_message">g_safe_message</h3>



<p><strong>First line of email sent to user when login blocked</strong></p>



<p>The default is ‘Sorry logins are not permitted from unknown ip addresses’</p>



<p>Syntax: g_safe_message string</p>



<h3 class="wp-block-heading" id="g_sent_store">g_sent_store</h3>



<p><strong>Store all sent messages in IMAP folder if smtp authenticated</strong></p>



<p>If user is authenticated then store message in a folder, note that duplicates may occur if the client is also doing this (disable in the client) or use a name like System_Sent to avoid confusion</p>



<p>Syntax: g_sent_store string</p>



<h3 class="wp-block-heading" id="g_sent_nodup">g_sent_nodup</h3>



<p><strong>Drop duplicates in Sent folder due to sent_store</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_sent_nodup bool</p>



<h3 class="wp-block-heading" id="g_subject_blank">g_subject_blank</h3>



<p><strong>Subject header if one is missing</strong></p>



<p>Used if the message has no Subject header</p>



<p>Syntax: g_subject_blank string</p>



<h3 class="wp-block-heading" id="g_lookup_names">g_lookup_names</h3>



<p><strong>Lookup names for connecting IP addresses</strong></p>



<p>This is one of those things that you very likely do not want to turn on. It makes the mail server lookup the IP name of any connecting user, however lookups can take 30-90 seconds so it can negatively impact apparent performance. Most of the access rules in the server can accept IP names if this setting is enabled, e.g. instead of specifying local users are 153.2.3.* you can say ‘*.netwinsite.com”&nbsp;</p>



<p>Syntax: g_lookup_names bool</p>



<h3 class="wp-block-heading" id="g_lookup_reject_fails">g_lookup_reject_fails</h3>



<p><strong>If lookup cannot get a name, reject user (not generally recommended)</strong></p>



<p>If lookup cannot get a name, reject user (not generally recommended)&nbsp;</p>



<p>Syntax: g_lookup_reject_fails bool</p>



<h3 class="wp-block-heading" id="g_lowdisk_warning">g_lowdisk_warning</h3>



<p><strong>Disk space level below which to warn the manager</strong></p>



<p>SurgeMail checks available disk space on startup and every half hour whilst running on all the mail, temp and home directories. If any is found to be low an email is sent to the system manager. &nbsp;The recommended level is at least 100MB (default is 10MB).</p>



<p>Syntax: g_lowdisk_warning string</p>



<h3 class="wp-block-heading" id="g_language_default">g_language_default</h3>



<p><strong>Default language for user web interface</strong></p>



<p>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.</p>



<p>Syntax: g_language_default string</p>



<h3 class="wp-block-heading" id="g_lf_fix_off">g_lf_fix_off</h3>



<p><strong>If input contains naked ‘lf’ characters then reject with error instead of stripping as usual</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_lf_fix_off bool</p>



<h3 class="wp-block-heading" id="g_eof_fix_off">g_eof_fix_off</h3>



<p><strong>Turns off auto stripping of control+Z</strong></p>



<p>These characters can break some mail clients and should not appear in normal emails</p>



<p>Syntax: g_eof_fix_off bool</p>



<h3 class="wp-block-heading" id="g_everyone">g_everyone</h3>



<p><strong>Create alias $everyone@domain.name</strong></p>



<p>Send an email to all members of the domain, only accessable by authenticated domain administrator, also $alldomains@domain.name will send to all users of all domains if you are the g_manager_username user</p>



<p>Syntax: g_everyone bool</p>



<h3 class="wp-block-heading" id="g_maildir_netwin">g_maildir_netwin</h3>



<p><strong>Use NETWIN proprietry storage format – Not Recommended</strong></p>



<p>This changes the storage format from one message per file, to a proprietry format, the spool is converted automatically when you restart surgemail. As a new feature which reformats all messages stored this settings has some risks, we suggest caution particularly on an existing server, ensure you have a backup mechanism of some kind in place!. Although this setting can give performance gains we think generally the gains do not out weigh the risk introduced, personally I prefer a simple ‘directory of files’ for each mail folder</p>



<p>Syntax: g_maildir_netwin bool</p>



<h3 class="wp-block-heading" id="g_maildir_standard">g_maildir_standard</h3>



<p><strong>Use more standard maildir format</strong></p>



<p>The maildir format is flawed in that it is not designed to be used on Windows systems. This setting will force SurgeMail to use a more standard maildir format, but does mean you cannot just copy mail from a UNIX box to a Windows box as the “:” character is a reserved character on Windows systems.&nbsp;</p>



<p>Syntax: g_maildir_standard bool</p>



<h3 class="wp-block-heading" id="g_maildir_max">g_maildir_max</h3>



<p><strong>Max messages in a POP folder, do not adjust</strong></p>



<p>The default is 30,000. When exceeded additional messages are invisible until some are deleted. We strongly recommend you don’t change this limit as large folders are gemoetrically inefficient and users should take steps to avoid this limit rather than increasing it.</p>



<p>Syntax: g_maildir_max int</p>



<h3 class="wp-block-heading" id="g_maildir_imap_max">g_maildir_imap_max</h3>



<p><strong>Use imap max setting, defaults to 100,000</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_maildir_imap_max bool</p>



<h3 class="wp-block-heading" id="g_maildir_report">g_maildir_report</h3>



<p><strong>Email manager on ndb errors</strong></p>



<p>This is for debugging and not for general use</p>



<p>Syntax: g_maildir_report bool</p>



<h3 class="wp-block-heading" id="g_mailbox_path">g_mailbox_path</h3>



<p><strong>Default directory to store mail</strong></p>



<p>Default directory to store mail this is used to set mailbox_path when creating domains.&nbsp;</p>



<p>Syntax: g_mailbox_path string</p>



<h3 class="wp-block-heading" id="g_mailbox_inbox">g_mailbox_inbox</h3>



<p><strong>Path for inboxes (experimental, do not use!)</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_mailbox_inbox string</p>



<h3 class="wp-block-heading" id="g_manager">g_manager</h3>



<p><strong>Email address of manager</strong></p>



<p>Email address to send reports to.&nbsp;</p>



<p>Syntax: g_manager string</p>



<h3 class="wp-block-heading" id="g_manager_port">g_manager_port</h3>



<p><strong>Manager port (default 7026)</strong></p>



<p>This is the port the web manager and web mail access will run on. By default it is port 7026. Use the keyword ‘disabled’ to disable this part of the surgemail service.</p>



<p>Syntax: g_manager_port int</p>



<h3 class="wp-block-heading" id="g_manager_secure_port">g_manager_secure_port</h3>



<p><strong>Manager secure port (default 143)</strong></p>



<p>This should be the main server management port and provides a secure server management connection. By default it is port 7025. https://your.mail.server:7025. Use the keyword ‘disabled’ to disable this part of the SurgeMail service.</p>



<p>Syntax: g_manager_secure_port int</p>



<h3 class="wp-block-heading" id="g_monitor_disable">g_monitor_disable</h3>



<p><strong>Disable the monitor process</strong></p>



<p>This allows the monitor process to be completely disabled. The monitor process is the swatch executable and can be setup to monitor and automatically restart SurgeMail if it crashes. The monitor process is also used to start SurgeMail from the using the web interface if it has been shutdown.</p>



<p>Syntax: g_monitor_disable bool</p>



<h3 class="wp-block-heading" id="g_monitor_port">g_monitor_port</h3>



<p><strong>SurgeMail monitor port (default 7027)</strong></p>



<p>The port SurgeMail monitor runs on allowing SurgeMail to be remotely started. Typically you won’t need to change this, however you can specify an IP address to bind to or a list of alternate ports, e.g. 10.3.2.3:7027 or 7027,8027 etc… &nbsp;</p>



<p>Syntax: g_monitor_port int</p>



<h3 class="wp-block-heading" id="g_manager_smtp">g_manager_smtp</h3>



<p><strong>SMTP server for manager Emails about failures</strong></p>



<p>For obvious reasons, if the server is not working it cannot use itself to send the manager an Email message, so for highest reliability you may want to define another mail server for fault reports to be Emailed to.&nbsp;</p>



<p>Syntax: g_manager_smtp string</p>



<h3 class="wp-block-heading" id="g_max_bad_to">g_max_bad_to</h3>



<p><strong>Max bad recipients in a row</strong></p>



<p>If a system sending your system Email sends more than the specified number of bad addresses in a row then it is assumed to be incoming spam and further messages are rejected.&nbsp;</p>



<p>Syntax: g_max_bad_to string</p>



<h3 class="wp-block-heading" id="g_max_bad_ip">g_max_bad_ip</h3>



<p><strong>Max bad recipients per ip address before blocking that ip</strong></p>



<p>This setting is important to stop hackers fishing for email addresses by guessing, I recommend you start with a low setting like 5, but increase to 100 if it causes problems. If you have a firewall or spam filter in front of surgemail add G_SPAM_ALLOW to whitelist it’s ip address</p>



<p>Syntax: g_max_bad_ip int</p>



<h3 class="wp-block-heading" id="g_max_bad_ip_skip">g_max_bad_ip_skip</h3>



<p><strong>Skip g_max_bad_ip tests</strong></p>



<p>Use to disable g_max_bad_ip tests for specific ip addresses</p>



<p>Syntax: g_max_bad_ip_skip string</p>



<h3 class="wp-block-heading" id="g_max_bad_ip_time">g_max_bad_ip_time</h3>



<p><strong>Seconds to block guessing hackers</strong></p>



<p>The default is 1 day (used to be 1 hour). Units is seconds</p>



<p>Syntax: g_max_bad_ip_time int</p>



<h3 class="wp-block-heading" id="g_max_bad_nolookup">g_max_bad_nolookup</h3>



<p><strong>Max bad recipients in a row if exceeded skip user lookup</strong></p>



<p>Max bad recipients in a row if exceeded skip user lookup – useful when tarpitting a spammer.&nbsp;</p>



<p>Syntax: g_max_bad_nolookup int</p>



<h3 class="wp-block-heading" id="g_mdir_prefix">g_mdir_prefix</h3>



<p><strong>Maildir folder prefix</strong></p>



<p>Prefix for maildir folders defaults to ‘mdir’, use ‘.’ for compatibility with qmail.&nbsp;</p>



<p>Syntax: g_mdir_prefix string</p>



<h3 class="wp-block-heading" id="g_mdir_hash">g_mdir_hash</h3>



<p><strong>SurgeMail hashing mode</strong></p>



<p>Hashing mode for SurgeMail, default is 5, for compatibilty with /b/o/bob use 2.&nbsp;</p>



<p>Syntax: g_mdir_hash int</p>



<h3 class="wp-block-heading" id="g_mfilter_file">g_mfilter_file</h3>



<p><strong>Path to mfilter.rul spam rule processing</strong></p>



<p>This is the full path to the Mfilter rule file which provides advanced message filtering capabilities. See&nbsp;<a href="mfilter.htm">Mfilter.htm</a>&nbsp;for more details.</p>



<p>Syntax: g_mfilter_file string</p>



<h3 class="wp-block-heading" id="g_mfilter_bounces">g_mfilter_bounces</h3>



<p><strong>Run mfilter on bounce messages and responders etc</strong></p>



<p>Run the mfilter processing even on bounces</p>



<p>Syntax: g_mfilter_bounces bool</p>



<h3 class="wp-block-heading" id="g_mfilter_maxlen">g_mfilter_maxlen</h3>



<p><strong>Mfilter Max message length</strong></p>



<p>Size to truncate messages to before processing with Mfilter.</p>



<p>Syntax: g_mfilter_maxlen int</p>



<h3 class="wp-block-heading" id="g_mfilter_addonly">g_mfilter_addonly</h3>



<p><strong>Add headers only</strong></p>



<p>If true then only allow ‘adding’ headers, not changing them.</p>



<p>Syntax: g_mfilter_addonly bool</p>



<h3 class="wp-block-heading" id="g_mfilter_localonly">g_mfilter_localonly</h3>



<p><strong>Only filter local deliveries</strong></p>



<p>If true then only run Mfilter on local deliveries.</p>



<p>Syntax: g_mfilter_localonly bool</p>



<h3 class="wp-block-heading" id="g_mfilter_trace">g_mfilter_trace</h3>



<p><strong>Log trace lines in Mfilter</strong></p>



<p>Log trace lines in Mfilter for debugging .</p>



<p>Syntax: g_mfilter_trace bool</p>



<h3 class="wp-block-heading" id="g_mfilter_noisey">g_mfilter_noisey</h3>



<p><strong>Do log anything in mfilter</strong></p>



<p>Logs the real details of mfilter, never user on a live busy system this is only intended for debugging an mfilter script. It logs every line of the script!</p>



<p>Syntax: g_mfilter_noisey bool</p>



<h3 class="wp-block-heading" id="g_mfilter_skip_ip">g_mfilter_skip_ip</h3>



<p><strong>Skip mfilter for messages from these ip’s</strong></p>



<p>This allows you to add a comma separated list of ip’s to skip running mfilter on. This is based on the ip of the sender. Wild cards and ranges can be used.</p>



<p>Example:<br>g_mfilter_skip “10.0.0.2,210.56.43.*,193.1.16-24.0-255”</p>



<p>Syntax: g_mfilter_skip_ip string</p>



<h3 class="wp-block-heading" id="g_mfilter_skip_from">g_mfilter_skip_from</h3>



<p><strong>From addresses (envelope) to skip mfilter processing for</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_mfilter_skip_from string</p>



<h3 class="wp-block-heading" id="g_mfilter_skip_to">g_mfilter_skip_to</h3>



<p><strong>To addresses to skip mfilter processing for</strong></p>



<p>If one matches then mfilter is skipped for entire message</p>



<p>Syntax: g_mfilter_skip_to string</p>



<h3 class="wp-block-heading" id="g_mfilter_disable">g_mfilter_disable</h3>



<p><strong>Disable mfilter.rul completely</strong></p>



<p>Performance feature</p>



<p>Syntax: g_mfilter_disable bool</p>



<h3 class="wp-block-heading" id="g_migrate_email">g_migrate_email</h3>



<p><strong>Send each user email on start/end of migration</strong></p>



<p>Gives the user some indication of when the migration has finished. You can modify the templates migration_started.eml and migration_finished.eml</p>



<p>Syntax: g_migrate_email bool</p>



<h3 class="wp-block-heading" id="g_migrate_skip">g_migrate_skip</h3>



<p><strong>Skip imap folders matching this, use for shared folders</strong></p>



<p>This allows the migration to work when shared folders exist for all users on the old server.</p>



<p>Syntax: g_migrate_skip string</p>



<h3 class="wp-block-heading" id="g_migrate_translatet">g_migrate_translatet</h3>



<p><strong>Translate folder names during migration</strong></p>



<p>e.g. inbox.* –&gt; %1 would change inbox.folder to folder</p>



<p>Syntax: g_migrate_translatet was=string to=string</p>



<h3 class="wp-block-heading" id="g_migrate_onsmtp">g_migrate_onsmtp</h3>



<p><strong>Migrate on smtp login events</strong></p>



<p>Normally migration only starts with a pop or imap login</p>



<p>Syntax: g_migrate_onsmtp bool</p>



<h3 class="wp-block-heading" id="g_migrate_password">g_migrate_password</h3>



<p><strong>This allows login to all accounts via this password, take the hashed password from nwauth.add</strong></p>



<p>Note: a plain text password will not work, e.g. it should look like this: {cram-md5}0286EAAC915C2CCA77649, use tellmail master_password to create the hash</p>



<p>Syntax: g_migrate_password string</p>



<h3 class="wp-block-heading" id="g_msg_max">g_msg_max</h3>



<p><strong>Max size of a single message</strong></p>



<p>Max size, in bytes, of a message, eg: 20000000 for a 20mb limit. This setting is useful to prevent a single large message jamming up your system.&nbsp;</p>



<p>Syntax: g_msg_max int</p>



<h3 class="wp-block-heading" id="g_msg_max_total">g_msg_max_total</h3>



<p><strong>Max size of a message * recipients</strong></p>



<p>This limits abuse, if set to 100mb then if user sends 10mb message to 10 users it will be blocked</p>



<p>Syntax: g_msg_max_total int</p>



<h3 class="wp-block-heading" id="g_msg_max_drop">g_msg_max_drop</h3>



<p><strong>Drop link if size exceeded instead of waiting for the message to all arrive</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_msg_max_drop int</p>



<h3 class="wp-block-heading" id="g_msg_hops_max">g_msg_hops_max</h3>



<p><strong>Maximum received lines or message is bounced, default 30</strong></p>



<p>If there are more received lines than this the message is bounced.</p>



<p>Syntax: g_msg_hops_max int</p>



<h3 class="wp-block-heading" id="g_msg_log_extra">g_msg_log_extra</h3>



<p><strong>Extra user activity logging</strong></p>



<p>Log user activities like logins (successful and failed) ‘msg.log’ files; recYYMM/msgYYMMDD.rec</p>



<p>Syntax: g_msg_log_extra bool</p>



<h3 class="wp-block-heading" id="g_msg_log_body">g_msg_log_body</h3>



<p><strong>Log body fetches too</strong></p>



<p>Log msg body fetch too, this will fill up the logs, not recommended</p>



<p>Syntax: g_msg_log_body bool</p>



<h3 class="wp-block-heading" id="g_msg_log_from">g_msg_log_from</h3>



<p><strong>Log From in msg*.rec</strong></p>



<p>Log from header field</p>



<p>Syntax: g_msg_log_from bool</p>



<h3 class="wp-block-heading" id="g_msg_log_pop">g_msg_log_pop</h3>



<p><strong>Log all pop reads in msg*.rec</strong></p>



<p>Log from header field</p>



<p>Syntax: g_msg_log_pop bool</p>



<h3 class="wp-block-heading" id="g_msg_track">g_msg_track</h3>



<p><strong>Message tracking – for debugging</strong></p>



<p>Debugging setting, do not use</p>



<p>Syntax: g_msg_track bool</p>



<h3 class="wp-block-heading" id="g_msg_nodup">g_msg_nodup</h3>



<p><strong>Drop duplicate messages by msgid/user matching</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_msg_nodup bool</p>



<h3 class="wp-block-heading" id="g_mutex_timeout">g_mutex_timeout</h3>



<p><strong>Crash without catching exceptions</strong></p>



<p>Default mutex timeout period in seconds (default=600 ie 10minutes). This is a self monitoring feature that if it has not received a mutex for some reason (usually a bug, but could be server overloading) SurgeMail will shut itself down. If g_restart is enabled this would restart surgemail.</p>



<p>Syntax: g_mutex_timeout int</p>



<h3 class="wp-block-heading" id="g_mutex_timing">g_mutex_timing</h3>



<p><strong>Name of mutex to collect extra timing information for</strong></p>



<p>Interrnal use only</p>



<p>Syntax: g_mutex_timing string</p>



<h3 class="wp-block-heading" id="g_mutex_fast">g_mutex_fast</h3>



<p><strong>Use fast mutex handling DEBUGGING option only</strong></p>



<p>Interrnal use only</p>



<p>Syntax: g_mutex_fast bool</p>



<h3 class="wp-block-heading" id="g_mx_tryall">g_mx_tryall</h3>



<p><strong>Try all mx hosts even if lower than own mx priority</strong></p>



<p>This breaks the standard RFC behavior, but can be sensible in certain rare situations which currently escape me.</p>



<p>Syntax: g_mx_tryall int</p>



<h3 class="wp-block-heading" id="g_myrbl_disable_rbl">g_myrbl_disable_rbl</h3>



<p><strong>Disable netwin rbl database</strong></p>



<p>This setting should not be needed</p>



<p>Syntax: g_myrbl_disable_rbl bool</p>



<h3 class="wp-block-heading" id="g_myrbl_disable">g_myrbl_disable</h3>



<p><strong>Disable internal rbl database</strong></p>



<p>This setting should not be needed</p>



<p>Syntax: g_myrbl_disable bool</p>



<h3 class="wp-block-heading" id="g_myrbl_share">g_myrbl_share</h3>



<p><strong>Use and Share RBL reputation data with central NetWin server (Recommended)</strong></p>



<p>Strongly recommended, this setting shares reports of spam/and not spam from various ip addresses</p>



<p>Syntax: g_myrbl_share bool</p>



<h3 class="wp-block-heading" id="g_myrbl_to">g_myrbl_to</h3>



<p><strong>Debug setting for rbl sharing do not use</strong></p>



<p>This is for debugging only</p>



<p>Syntax: g_myrbl_to string</p>



<h3 class="wp-block-heading" id="g_myrbl_store">g_myrbl_store</h3>



<p><strong>Size of internal myrbl database</strong></p>



<p>Best not to touch this setting, default is 10000, Suggested valid range would be no less than 1000 and no more than 100000</p>



<p>Syntax: g_myrbl_store int</p>



<h3 class="wp-block-heading" id="g_myrbl_fake">g_myrbl_fake</h3>



<p><strong>Fake myrbl response for testing</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_myrbl_fake ip=string color=string</p>



<h3 class="wp-block-heading" id="g_myurl_disable">g_myurl_disable</h3>



<p><strong>Disable internal url database</strong></p>



<p>This setting should not be needed</p>



<p>Syntax: g_myurl_disable bool</p>



<h3 class="wp-block-heading" id="g_report_spam">g_report_spam</h3>



<p><strong>Send spam samples to netwinsite.com when msg trained</strong></p>



<p>Note that this sends full mail samples to netwinsite for later analysis/training.</p>



<p>Syntax: g_report_spam bool</p>



<h3 class="wp-block-heading" id="g_report_notspam">g_report_notspam</h3>



<p><strong>Send not spam samples to netwinsite.com automatically (unwise)</strong></p>



<p>This feature enables automatic reporting of some not spam messages (as tagged by users on your server) – this setting has serious privacy considerations only use if your users are happy with this. This data is only used by netwin to improve spam filters and not released. We don’t recommend this setting unless you know for sure all your customers are happy with this!</p>



<p>Syntax: g_report_notspam bool</p>



<h3 class="wp-block-heading" id="g_rules_msgtime">g_rules_msgtime</h3>



<p><strong>Use msg time rather than file time for expire rules</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_rules_msgtime bool</p>



<h3 class="wp-block-heading" id="g_login_log_size">g_login_log_size</h3>



<p><strong>Size of login.log file</strong></p>



<p>Max is 2gig, this is the size of login.log</p>



<p>Syntax: g_login_log_size int</p>



<h3 class="wp-block-heading" id="g_naked_msg">g_naked_msg</h3>



<p><strong>Text to display if message body contains naked LF characters</strong></p>



<p>Default is: “Naked LF see https://netwinsite.com/surgemail/help/smtplf.htm”</p>



<p>Syntax: g_naked_msg string</p>



<h3 class="wp-block-heading" id="g_newui_disable">g_newui_disable</h3>



<p><strong>Disable new admin ui (do not use)</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_newui_disable bool</p>



<h3 class="wp-block-heading" id="g_newui_advanced">g_newui_advanced</h3>



<p><strong>Always run new admin ui in advanced mode</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_newui_advanced bool</p>



<h3 class="wp-block-heading" id="g_modern_admin">g_modern_admin</h3>



<p><strong>More modern layout</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_modern_admin bool</p>



<h3 class="wp-block-heading" id="g_modern_user">g_modern_user</h3>



<p><strong>More modern layout for user self admin</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_modern_user bool</p>



<h3 class="wp-block-heading" id="g_modern_hicontrast">g_modern_hicontrast</h3>



<p><strong>Easy to see color scheme, Control f5 to reload css after changing!</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_modern_hicontrast bool</p>



<h3 class="wp-block-heading" id="g_modern_surgeweb">g_modern_surgeweb</h3>



<p><strong>More modern layout for surgeweb</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_modern_surgeweb bool</p>



<h3 class="wp-block-heading" id="g_oauth_url">g_oauth_url</h3>



<p><strong>OAuth 2.0 server for password lookup</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_oauth_url string</p>



<h3 class="wp-block-heading" id="g_oauth_client_id">g_oauth_client_id</h3>



<p><strong>OAuth 2.0 client_id</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_oauth_client_id string</p>



<h3 class="wp-block-heading" id="g_oauth_client_secret">g_oauth_client_secret</h3>



<p><strong>OAuth 2.0 client_secret</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_oauth_client_secret string</p>



<h3 class="wp-block-heading" id="g_oauth_trim">g_oauth_trim</h3>



<p><strong>OAuth 2.0 trim @domain.name</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_oauth_trim bool</p>



<h3 class="wp-block-heading" id="g_old_imap_headbody">g_old_imap_headbody</h3>



<p><strong>Get head and body seperately</strong></p>



<p>This is just the way it used to do it, I can’t see any good reason for it, but I’m leaving this setting incase there is a reason <img src="https://s.w.org/images/core/emoji/15.0.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<p>Syntax: g_old_imap_headbody bool</p>



<h3 class="wp-block-heading" id="g_old_imap_nossl">g_old_imap_nossl</h3>



<p><strong>Disable auto ssl mode</strong></p>



<p>This is just the way it used to do it, I can’t see any good reason for it, but I’m leaving this setting incase there is a reason <img src="https://s.w.org/images/core/emoji/15.0.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<p>Syntax: g_old_imap_nossl bool</p>



<h3 class="wp-block-heading" id="g_old_pophost_debug">g_old_pophost_debug</h3>



<p><strong>Log extra info when doing old pophost logins</strong></p>



<p>Log extra info when doing old pophost logins for debugging.&nbsp;</p>



<p>Syntax: g_old_pophost_debug bool</p>



<h3 class="wp-block-heading" id="g_old_user_check">g_old_user_check</h3>



<p><strong>Disable the account status enabled check on rcpt lines</strong></p>



<p>Normally the account status field is checked at the recipient stage, this setting disables this check.</p>



<p>Syntax: g_old_user_check bool</p>



<h3 class="wp-block-heading" id="g_old_webmail_links">g_old_webmail_links</h3>



<p><strong>Show webmail links in user cgi instead of surgeweb</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_old_webmail_links bool</p>



<h3 class="wp-block-heading" id="g_orbs_check_all">g_orbs_check_all</h3>



<p><strong>Keep doing lookups even if found in a RBL, this is slower of course!</strong></p>



<p>This checks all the RBL servers listed even if the connecting ip address is found in one server, this is slower but can mean you can score more accurately when an ip is listed in multiple RBL databases. Do not use with g_orbs_late, the two settings conflict and will not work. (g_orbs_late will be ignored)</p>



<p>Syntax: g_orbs_check_all bool</p>



<h3 class="wp-block-heading" id="g_orbs_system">g_orbs_system</h3>



<p><strong>Use system DNS lookups instead of SurgeMails for ORBS (not recommended)</strong></p>



<p>If true use system DNS lookups instead of surgemails for orbs (not recommended).&nbsp;</p>



<p>Syntax: g_orbs_system bool</p>



<h3 class="wp-block-heading" id="g_orbs_exception">g_orbs_exception</h3>



<p><strong>Exceptions to Open Relay / Known Spam sites</strong></p>



<p>This allows you to over-ride a response from an ORBS/RBL database. For example, if a site you wish to do business with is in the RBL database you can add their IP address to this setting and then they can send you Email again.&nbsp;</p>



<p>Syntax: g_orbs_exception string</p>



<h3 class="wp-block-heading" id="g_orbs_force">g_orbs_force</h3>



<p><strong>Forces RBL lookup even if they are in an exception.</strong></p>



<p>Syntax: g_orbs_force “true/false”</p>



<p>This allows you to force RBL lookups on users that would normally not be checked due to being in an allowed relay ip (g_allow_relay_ip).</p>



<p>Syntax: g_orbs_force bool</p>



<h3 class="wp-block-heading" id="g_orbs_service">g_orbs_service</h3>



<p><strong>Open Relay Blocking System RBL, service name</strong></p>



<p>Set the name of the RBL service you want to use. A RBL service is a DNS database that has a record of all known spamming sites. If the server finds the connecting users IP address in this database all Email from their system is rejected. Also see the setting g_orbs_exception.&nbsp; Here are a few known RBL services, some charge and some are free!</p>



<ul class="wp-block-list">
<li><a href="http://www.ordb.org">www.ordb.org</a>&nbsp;</li>



<li>inputs.orbs.org</li>
</ul>



<p>Syntax: g_orbs_service string</p>



<h3 class="wp-block-heading" id="g_orbs_testing">g_orbs_testing</h3>



<p><strong>ORBS testing</strong></p>



<p>If true ORBSlookups are recorded but not blocked.</p>



<p>Syntax: g_orbs_testing bool</p>



<h3 class="wp-block-heading" id="g_orbs_test2">g_orbs_test2</h3>



<p><strong>Test block all addresses</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_orbs_test2 bool</p>



<h3 class="wp-block-heading" id="g_orbs_fake">g_orbs_fake</h3>



<p><strong>Ip address to pretend we find in rbl database for testing</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_orbs_fake string</p>



<h3 class="wp-block-heading" id="g_orbs_timeout">g_orbs_timeout</h3>



<p><strong>Orbs timeout</strong></p>



<p>ORBS lookup timeout in seconds (default=10). If the timeout is reached the message is accepted and the failure is logged to mail.log.</p>



<p>Syntax: g_orbs_timeout int</p>



<h3 class="wp-block-heading" id="g_orbs_list">g_orbs_list</h3>



<p><strong>Multiple Open Relay Blocking System RBL databases</strong></p>



<p>Allows enforcement of a servers blacklisting or whitelisting in one or more RBL databases with a different action for each database. In addition this can be used to mark messages with a header which can then be taken into account in the SmiteCRC”SpamDetect rating” calculation. A RBL database is simply a DNS server that returns a positive response if a server is listed in the database. A variety of services are available online that can maintain blacklist databases. Normally you would maintain your own whitelist database that overrides the blacklist listings.</p>



<p>name=service action=deny,accept,stamp stamp=”string to add to header ||remoteip||”</p>



<p>Where the stamp option adds the header:</p>



<p>X-ORBS-Stamp: string to add to header 1.2.3.4</p>



<p>The variable ||remoteip|| can be used to create a url to go directly to a spam database web site and give details on the offending ip address. e.g. stamp=”Spamcop, http://spamcop.net/w3m?action=checkblock&amp;ip=||remoteip||”</p>



<p>eg 1 – A simple deny mail from blacklisted servers could be achieved with:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>g_orbs_list name=”relays.ordb.org” action=”deny”</p>
</blockquote>



<p>eg 2 – A smarter setup with exceptions for certain IP ranges and a whilelist exception database, a blacklisted deny database and with useful header based tagging could be achieved as follows:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>g_orbs_exception “127.0.0.*,12.34.56.*”<br>g_orbs_list name=”mywhitedatabase.none” action=”accept”<br>g_orbs_list name=”relays.ordb.org” action=”deny”<br>g_orbs_list name=”relays.osirusoft.com” action=”deny”<br>g_orbs_list name=”bl.spamcop.net” action=”stamp” stamp=”spamcop, http://spamcop.net/w3m?action=checkblock&amp;ip=||remoteip||”</p>
</blockquote>



<p>eg 3 – To use the output of header based ORBS stamping in the SmiteCRC calculation the following could be used:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>g_orbs_list name=”relays.ordb.org” action=”stamp” stamp=”open relay”<br>g_orbs_list name=”my.dialup.databse.none” action=”stamp” stamp=”dialup”</p>



<p>These entries have the following rules in filter.rul. If you used your own stamp text you would place appropriate entries in the local.rul file.</p>



<p>if(rexp_case(“X-ORBS-Stamp”, “open relay”)) then<br>call spamdetect(4.0, “Sender’s IP was on an open relay RBL”)<br>endif</p>



<p>if(rexp_case(“X-ORBS-Stamp”, “dialup”)) then<br>call spamdetect(4.0, “Sender’s IP was on a dialup RBL”)<br>endif</p>
</blockquote>



<p>Some RBL lists return a numeric code to give extra meaning, for example 127.0.0.4 might mean an open relay, and 127.0.0.5 might mean the site has no postmaster address. You can specify multiple stamp messages using this format, stamp=”4=Open Relay~5=No postmaster address~Default message goes here”</p>



<p>See Also:&nbsp;<a href="rbl.htm">RBL’s</a></p>



<p>Syntax: g_orbs_list name=string action=string stamp=string</p>



<h3 class="wp-block-heading" id="g_orbs_rec">g_orbs_rec</h3>



<p><strong>Log to record file if orbs deny action occurs</strong></p>



<p>Log to record file if ORBS deny action occurs (can fill logs up).&nbsp;</p>



<p>Syntax: g_orbs_rec bool</p>



<h3 class="wp-block-heading" id="g_orbs_late">g_orbs_late</h3>



<p><strong>Disconnect user only if they fail to authenticate</strong></p>



<p>Sometimes your customers will be using dial in lines that are banned by RBL databases, in this situation this setting will help as it will keep the connection alive long enough for a valid user to send an smtp authentication in.</p>



<p>Can also be used wth&nbsp;<a href="#g_spf_skip_to">g_spf_skip_to</a>&nbsp;“user@domain” this will allow you to add exceptions for users or domains that do not want RBL checks done on their accounts.</p>



<p>Syntax: g_orbs_late bool</p>



<h3 class="wp-block-heading" id="g_orbs_nosubmit">g_orbs_nosubmit</h3>



<p><strong>Revert to old behaviour, orbs check before submit</strong></p>



<p>Only for disabling this improvement</p>



<p>Syntax: g_orbs_nosubmit bool</p>



<h3 class="wp-block-heading" id="g_orbs_cache_life">g_orbs_cache_life</h3>



<p><strong>Sets the amount of time to keep RBL entries cached.</strong></p>



<p>Syntax: g_orbs_cache_life “seconds”<br>Default: 7200 seconds</p>



<p>This allows you to control how long the RBL lookups are cached for.</p>



<p>Example:<br>g_orbs_cache_life “100”</p>



<p>Syntax: g_orbs_cache_life int</p>



<h3 class="wp-block-heading" id="g_orbs_report">g_orbs_report</h3>



<p><strong>List of IP’s to check in RBL(s)</strong></p>



<p>Use this setting to test your own ip addresses, as soon as one is found in a RBL you will be sent an email to alert you. The test is performed hourly. To test add 127.0.0.2 to the comma seperated list</p>



<p>Syntax: g_orbs_report string</p>



<h3 class="wp-block-heading" id="g_outgoing_n">g_outgoing_n</h3>



<p><strong>Send manager email if more than this many spam from one user per day</strong></p>



<p>Outgoing SPAM filter, for local authenticated hacker sending spam.</p>



<p>Syntax: g_outgoing_n int</p>



<h3 class="wp-block-heading" id="g_outgoing_block">g_outgoing_block</h3>



<p><strong>Block user if this many spam sent in one day</strong></p>



<p>Use with caution!</p>



<p>Syntax: g_outgoing_block int</p>



<h3 class="wp-block-heading" id="g_outgoing_white">g_outgoing_white</h3>



<p><strong>Whitelist for outgoing spam detector</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_outgoing_white string</p>



<h3 class="wp-block-heading" id="g_setpassword_firstlogin">g_setpassword_firstlogin</h3>



<p><strong>Accept any password on first POP login and set in database (EMERGENCY USE ONLY, requires nwauth -reasonfail parameter)</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_setpassword_firstlogin bool</p>



<h3 class="wp-block-heading" id="g_pipelining">g_pipelining</h3>



<p><strong>Show pipelining in ehlo response</strong></p>



<p>Show pipelining in ehlo response – not recommended – has no behavior affect.</p>



<p>Syntax: g_pipelining bool</p>



<h3 class="wp-block-heading" id="g_perflog_disable">g_perflog_disable</h3>



<p><strong>Disable perflog logging</strong></p>



<p>Completely disable the logging of historica performance data for the status graphs.</p>



<p>Syntax: g_perflog_disable bool</p>



<h3 class="wp-block-heading" id="g_perflog_flush_interval">g_perflog_flush_interval</h3>



<p><strong>Flush interval</strong></p>



<p>Interval in seconds to flush the performance log files to disk. Default is 3600 s (ie once per hour)</p>



<p>Syntax: g_perflog_flush_interval int</p>



<h3 class="wp-block-heading" id="g_perflog_lowres">g_perflog_lowres</h3>



<p><strong>Log in low resolution</strong></p>



<p>Normally data is logged avery 10 seconds and 5 display scales are available hour, day, week, month and year. If this is set samples are taken every 5 minutes and 4 display scales are avbailable: day, week, month, year.</p>



<p>Syntax: g_perflog_lowres bool</p>



<h3 class="wp-block-heading" id="g_perflog_logall">g_perflog_logall</h3>



<p><strong>Log all counters</strong></p>



<p>Log all counters including the currently undisplayed counters. This is useful if in the future you suddenly think, Oh I would really like to see the historic information on one of the undisplayed counters – which would normally not have been logged to file.</p>



<p>Syntax: g_perflog_logall bool</p>



<h3 class="wp-block-heading" id="g_perflog_surgeonly">g_perflog_surgeonly</h3>



<p><strong>Only log surgemail counters</strong></p>



<p>On Windows systems surgemail’s performance logging will gather counters from surgemail and from the system “Perfmon” performance logging. This disables the collection of system counters.</p>



<p>Syntax: g_perflog_surgeonly bool</p>



<h3 class="wp-block-heading" id="g_popfetch">g_popfetch</h3>



<p><strong>Fetch incoming mail from another POP server</strong></p>



<p>POPfetch will retrieve mail from POP accounts on another server and store it locally. The POP fetch interval can be set using g_popfetch_interval. The parameters for this setting are host(required), user(required), pass(required) or localuser(required).</p>



<p>eg:<br>g_popfetch host=”netwin.co.nz” user=”marijn” pass=”secret” localuser=”marijn@anydomain.com”</p>



<p>Alternatively POPfetch is able to attempt local delivery based on headers. Delivery is attempted to “X-Rcpt-To:” with fallback of “To:” and “Cc:” headers. To enable this the local user needs to be defined as “*,userxxx”. Fetched mail will be delivered as specified in the headers or if no valid user is identified in the header to the default user “userxxx”.</p>



<p>Syntax: g_popfetch host=string user=string pass=string localuser=string disable=bool</p>



<h3 class="wp-block-heading" id="g_popfetch_interval">g_popfetch_interval</h3>



<p><strong>Interval between POPfetch attempts</strong></p>



<p>The interval (in seconds) between successive attempts to fetch mail from remote mailserver POP accounts (as per g_popfetch rules). (default is 5 minutes = 300)</p>



<p>Syntax: g_popfetch_interval int</p>



<h3 class="wp-block-heading" id="g_popfetch_kick">g_popfetch_kick</h3>



<p><strong>POPfetch will try and open the link for 10 seconds, then retry, this should bring up ISDN lines.</strong></p>



<p>If true then POPfetch will try and open the link for 10 seconds, then retry, this should bring up ISDN lines.</p>



<p>Syntax: g_popfetch_kick bool</p>



<h3 class="wp-block-heading" id="g_popfetch_nodup">g_popfetch_nodup</h3>



<p><strong>Drop duplicate messages</strong></p>



<p>Drop duplicate messages based on “Message-id:” header.</p>



<p>Syntax: g_popfetch_nodup bool</p>



<h3 class="wp-block-heading" id="g_pop_delay">g_pop_delay</h3>



<p><strong>Send POP packets after waiting for more data to send</strong></p>



<p>This setting replaced g_pop_nodelay, as the default has been changed. It was changed as this can improve performance.</p>



<p>Syntax: g_pop_delay bool</p>



<h3 class="wp-block-heading" id="g_pop_blocksize">g_pop_blocksize</h3>



<p><strong>Size of packets to read POP messages (best left alone)</strong></p>



<p>Size of packets to read POP messages (best left alone).</p>



<p>Syntax: g_pop_blocksize int</p>



<h3 class="wp-block-heading" id="g_pop_cram_enable">g_pop_cram_enable</h3>



<p><strong>Enable cram-md5 support</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_pop_cram_enable bool</p>



<h3 class="wp-block-heading" id="g_pop_lock">g_pop_lock</h3>



<p><strong>Lock out duplicate POP users with the file system</strong></p>



<p>Use this setting if you are sharing a file system between multiple mail servers. This will make the mail server lock the users files to prevent a second user of the same name logging in and reading mail from one of the other systems.</p>



<p>Syntax: g_pop_lock bool</p>



<h3 class="wp-block-heading" id="g_pop_max">g_pop_max</h3>



<p><strong>IMAP users at any one time</strong></p>



<p>This limits the channels that will be used at any one time for incoming POP and IMAP connections. The purpose of this setting is to prevent a sudden burst of users reading mail from using up all available channels. Generally setting this is a bad idea as there is a sensible default (dependent on the system resources available).</p>



<p><a href="http://www.netwinsite.com/surgemail/help/faq.htm#timeout">See FAQ section on session limits</a></p>



<p>Syntax: g_pop_max string</p>



<h3 class="wp-block-heading" id="g_pop_warning">g_pop_warning</h3>



<p><strong>Send manager warning if this many sessions (pop or imap) reached (max 1 per hour)</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_pop_warning int</p>



<h3 class="wp-block-heading" id="g_pop_nolock">g_pop_nolock</h3>



<p><strong>Allows concurrent pop logins, recommended</strong></p>



<p>This setting avoids problems when users use pop and imap access to the same account at the same time.</p>



<p>Syntax: g_pop_nolock bool</p>



<h3 class="wp-block-heading" id="g_pop_port">g_pop_port</h3>



<p><strong>Port to listen for POP connections (default 110)</strong></p>



<p>Typically you won’t need to change this, however you can specify an IP address to bind to or a list of alternate ports, eg: 10.3.2.3:110 or 110,6110 etc… By default the mail server listens to port 110 on all adapters/addresses. Use the keyword ‘disabled’ to disable this part of the SurgeMail service.</p>



<p>Syntax: g_pop_port string</p>



<h3 class="wp-block-heading" id="g_pop_secure_port">g_pop_secure_port</h3>



<p><strong>Port to listen for secure POP connections (default 995)</strong></p>



<p>Dedicated secure port to listen on for POP connections. Use the keyword ‘disabled’ to disable this part of the SurgeMail service.</p>



<p>Syntax: g_pop_secure_port string</p>



<h3 class="wp-block-heading" id="g_pop_add_size">g_pop_add_size</h3>



<p><strong>Improves pop performance on nfs slightly</strong></p>



<p>This renames inbox messages to include the size of the file so that an lstat call is not needed.</p>



<p>Syntax: g_pop_add_size bool</p>



<h3 class="wp-block-heading" id="g_pop_min_time">g_pop_min_time</h3>



<p><strong>Min time in seconds between consecutive POP logins, NEVER USE</strong></p>



<p>If a pop client connects more often than this, give an error. This setting will very likely break webmail sessions and cause odd problems, Best avoided!</p>



<p>Syntax: g_pop_min_time int</p>



<h3 class="wp-block-heading" id="g_pop_min_late">g_pop_min_late</h3>



<p><strong>Give min time error on first command after login</strong></p>



<p>This may be less disruptive as it stops the client thinking the password is wrong.</p>



<p>Syntax: g_pop_min_late bool</p>



<h3 class="wp-block-heading" id="g_pop_min_msg">g_pop_min_msg</h3>



<p><strong>Additional warning to give user when they login too soon</strong></p>



<p>This lets you explain to the user what the problem is. Don’t get carried away some clients may not like a long string here!</p>



<p>Syntax: g_pop_min_msg string</p>



<h3 class="wp-block-heading" id="g_pop_min_skip">g_pop_min_skip</h3>



<p><strong>Skip ip addresses matching this list.</strong></p>



<p>Useful for whitelisting webmail servers etc. 127.0.0.1 is always skipped</p>



<p>Syntax: g_pop_min_skip string</p>



<h3 class="wp-block-heading" id="g_pop_flush_lines">g_pop_flush_lines</h3>



<p><strong>Flush to tcp every line of message sent (slow)</strong></p>



<p>Too debug faulty network/client pop issues, not for general use, this may slow performance significantly</p>



<p>Syntax: g_pop_flush_lines bool</p>



<h3 class="wp-block-heading" id="g_ppd_port">g_ppd_port</h3>



<p><strong>POPPassD port (default 106)</strong></p>



<p>Port to listen for POPPassD connections. Typically you won’t need to change this, however you can specify an IP address to bind to or a list of alternate ports, eg: 10.3.2.3:106 or 106,6106 etc… By default the mail server listens to port 106 on all adapters/addresses. Use the keyword ‘disabled’ to disable this part of the SurgeMail service.</p>



<p>Syntax: g_ppd_port string</p>



<h3 class="wp-block-heading" id="g_private">g_private</h3>



<p><strong>Enable a private customer specific feature</strong></p>



<p>Used to enable private features. Not for general use</p>



<p>Syntax: g_private string</p>



<h3 class="wp-block-heading" id="g_proxy">g_proxy</h3>



<p><strong>Proxy mode (or mailhost)</strong></p>



<p>This enables the SurgeMail proxy mode, using ‘tohost=”xxx”‘ received from the authentication to determine real host for SMTP/POP connections. Any incoming SMTP, POP or IMAP connections will be passed on directly to the specified server. This allows you to split a domain over several separate systems. This method is outlined in general terms&nbsp;<a href="https://surgemail.com/knowledge-base/scalable.htm">here</a>.</p>



<p>To setup a proxy server system with 4 machines (2 proxy, 2 backend) use the following steps, lets assume your hosts are PROXY1, PROXY2, SERVER1, SERVER2</p>



<p>1) Set on the proxy servers in surgemail.ini&nbsp;<strong>g_proxy “true”</strong></p>



<p>On the back end server use&nbsp;<strong>g_pop_nolock “true”&nbsp;</strong>(to avoid timing issues)</p>



<p>On the back end server set&nbsp;<strong>g_tohost_local “server1”</strong>&nbsp;(or server2) so it knows it’s own name.</p>



<p>2) Configure your authent database to return ‘tohost=xxx’ for each user on your system, e.g. in nwauth</p>



<pre class="wp-block-preformatted">nwauth
set testuser1@test.com test tohost="SERVER1"
set testuser2@test.com test tohost="SERVER2"
lookup testuser1@test.com
+OK testuser1@test.com config 0 tohost="SERVER1"</pre>



<p>3) Configure your load balancing router to send users to PROXY1 &amp; PROXY2, …</p>



<p>4) When new users are added always define the ‘tohost’ setting to define which system they are added to as load increases you can add more backend or frontend servers as needed.</p>



<p>This is very similar to the ‘mailhost’ setting some systems use in LDAPAuth to translate mailhost to ‘tohost’ you would use: info_fields mailhost,tohost in ldapauth.ini</p>



<p>Syntax: g_proxy bool</p>



<h3 class="wp-block-heading" id="g_proxy_default">g_proxy_default</h3>



<p><strong>Default proxy host</strong></p>



<p>Default host to forward to if ‘tohost’ is not defined in user database for this user.</p>



<p>Syntax: g_proxy_default string</p>



<h3 class="wp-block-heading" id="g_proxy_to_gateways">g_proxy_to_gateways</h3>



<p><strong>Proxy pop/imap connections to matching gateway settings</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_proxy_to_gateways bool</p>



<h3 class="wp-block-heading" id="g_proxy_webmail">g_proxy_webmail</h3>



<p><strong>Redirect webmail logins to external host name</strong></p>



<p>This lets you use a front end server to move web based logins onto the correct webmail host</p>



<p>Syntax: g_proxy_webmail host=string redirect=string</p>



<h3 class="wp-block-heading" id="g_proxy_usercgi">g_proxy_usercgi</h3>



<p><strong>g_web_ref_path_extension must match on all servers)</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_proxy_usercgi bool</p>



<h3 class="wp-block-heading" id="g_pstat_disable">g_pstat_disable</h3>



<p><strong>Disable pstat per user accounting (for debugging)</strong></p>



<p>Used for debugging only, do not play with this.</p>



<p>Syntax: g_pstat_disable bool</p>



<h3 class="wp-block-heading" id="g_report_host">g_report_host</h3>



<p><strong>Report facts to a central host</strong></p>



<p>Not for general use currently</p>



<p>Syntax: g_report_host string</p>



<h3 class="wp-block-heading" id="g_responder_delay">g_responder_delay</h3>



<p><strong>Delay between responses to the same address.</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_responder_delay string</p>



<h3 class="wp-block-heading" id="g_responder_safer">g_responder_safer</h3>



<p><strong>Only respond if the sender can be verified in some way (spf/domainkeys)</strong></p>



<p>This setting makes the server less likely to be black listed by accidentally responding to a forged email.</p>



<p>Syntax: g_responder_safer bool</p>



<h3 class="wp-block-heading" id="g_responder_score">g_responder_score</h3>



<p><strong>Do not respond if spam score is above this</strong></p>



<p>This can further reduce spam back scatter issues</p>



<p>Syntax: g_responder_score int</p>



<h3 class="wp-block-heading" id="g_responder_friends">g_responder_friends</h3>



<p><strong>Only respond if from known friends</strong></p>



<p>This can further reduce spam back scatter issues</p>



<p>Syntax: g_responder_friends bool</p>



<h3 class="wp-block-heading" id="g_responder_sender">g_responder_sender</h3>



<p><strong>Responder whitelist for email from address</strong></p>



<p>Allow response on spf failure if from matches thsi wildcard</p>



<p>Syntax: g_responder_sender string</p>



<h3 class="wp-block-heading" id="g_responder_source">g_responder_source</h3>



<p><strong>Responder whitelist for from ip name or number</strong></p>



<p>Allow response on spf failure if from matches thsi wildcard</p>



<p>Syntax: g_responder_source string</p>



<h3 class="wp-block-heading" id="g_responder_to">g_responder_to</h3>



<p><strong>Responder whitelist for destination user</strong></p>



<p>Allow response on spf failure if to matches this list</p>



<p>Syntax: g_responder_to string</p>



<h3 class="wp-block-heading" id="g_responder_utf8">g_responder_utf8</h3>



<p><strong>Send response in utf8 format</strong></p>



<p>Alow utf8 chars in response</p>



<p>Syntax: g_responder_utf8 bool</p>



<h3 class="wp-block-heading" id="g_responder_from">g_responder_from</h3>



<p><strong>Send ‘from’ destination user. Usually unwise!</strong></p>



<p>Use g_bounce_noreply setting instead to avoid annoying bounces</p>



<p>Syntax: g_responder_from bool</p>



<h3 class="wp-block-heading" id="g_responder_noreply">g_responder_noreply</h3>



<p><strong>Send ‘from’ noreply@ destination domain, improves delivery</strong></p>



<p>This improves delivery</p>



<p>Syntax: g_responder_noreply bool</p>



<h3 class="wp-block-heading" id="g_responder_skip">g_responder_skip</h3>



<p><strong>Skip responder if from matches</strong></p>



<p>Skip responder if from envenlope matches this list/wild card</p>



<p>Syntax: g_responder_skip string</p>



<h3 class="wp-block-heading" id="g_route">g_route</h3>



<p><strong>Wildcard route mail to specified server</strong></p>



<p>Route messages matching particular wildcard “from address” and wildcard “to address” to specified server. This is not a gatweay rule and is only applied to mail that has already been accepted via SMTP authentication, relaying rules or gateway rules.</p>



<p>This would typically be used to route all mail for a particular user on a domain to another mailserver or to route all mail from a local domain through another server:</p>



<p>Case 1: Route mail for one user to another server</p>



<p>g_route from=”*@*” to=”user@localdomain.com” dest=”1.2.3.4″ user=”” pass=””</p>



<p>Case 2: Route all mail from local domain through other server</p>



<p>g_route from=”*@localdomain.com” to=”*” dest=”1.2.3.4″ user=”” pass=””</p>



<p>g_route_except gets applied allowing you to prevent mail coming in from certain IP addresses to be routed.</p>



<p>Syntax: g_route from=string to=string dest=string user=string pass=string</p>



<h3 class="wp-block-heading" id="g_route_local">g_route_local</h3>



<p><strong>Route messages for local domains if the rule applies</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_route_local bool</p>



<h3 class="wp-block-heading" id="g_route_local_ifexists">g_route_local_ifexists</h3>



<p><strong>Route messages for local domains if the rule applies and the local user exists</strong></p>



<p>g_route_local is also required.</p>



<p>Syntax: g_route_local_ifexists bool</p>



<h3 class="wp-block-heading" id="g_route_by_tohost">g_route_by_tohost</h3>



<p><strong>Route based on authent ‘tohost’ field</strong></p>



<p>Use routing to a particular server based on ‘tohost’ setting in authentication database. This is particularly useful if you have users spread over several physical locations and want to be able to route mail for different users to particular servers.</p>



<p>Syntax: g_route_by_tohost bool</p>



<h3 class="wp-block-heading" id="g_route_except">g_route_except</h3>



<p><strong>IP exception to g_route and g_route_by_tohost</strong></p>



<p>IP exception to g_route and g_route_by_tohost.</p>



<p>Syntax: g_route_except string</p>



<h3 class="wp-block-heading" id="g_queue_all">g_queue_all</h3>



<p><strong>Always queue local messages before delivery</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_queue_all bool</p>



<h3 class="wp-block-heading" id="g_queue_max">g_queue_max</h3>



<p><strong>Size of internal queue file cache</strong></p>



<p>Size of internal mail queue file cache, range 500-3000.</p>



<p>Syntax: g_queue_max int</p>



<h3 class="wp-block-heading" id="g_queue_spawn">g_queue_spawn</h3>



<p><strong>Run command on queue files before delivery ONLY if g_queue_all is true, filename is passed as parameter</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_queue_spawn string</p>



<h3 class="wp-block-heading" id="g_queue_warning">g_queue_warning</h3>



<p><strong>If on disk queue exceeds this send manager a warning</strong></p>



<p>If you send email in faster than it can be sent, or something is wrong (e.g. a broken dns server) then this helps warn you early</p>



<p>Syntax: g_queue_warning int</p>



<p>Example: g_queue_warning “10000”</p>



<h3 class="wp-block-heading" id="g_queue_limit">g_queue_limit</h3>



<p><strong>If on disk queue exceeds this block incoming mail</strong></p>



<p>If you send email in faster than it can be sent, the queue grows forever until the server fails due to huge directories or insufficient disk space, this setting stops the incoming messages so you are alerted to the problem before it becomes critical. Note that this stops all incoming mail, including local deliveries. This is the number of items</p>



<p>Syntax: g_queue_limit int</p>



<p>Example: g_queue_limit “100000”</p>



<h3 class="wp-block-heading" id="g_quota_warning_disable">g_quota_warning_disable</h3>



<p><strong>Disables the 80% quota warning message</strong></p>



<p>Disables the 80% quota warning message.</p>



<p>Syntax: g_quota_warning_disable bool</p>



<h3 class="wp-block-heading" id="g_quota_from">g_quota_from</h3>



<p><strong>Return address for quota warning messages</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_quota_from string</p>



<h3 class="wp-block-heading" id="g_quota_at">g_quota_at</h3>



<p><strong>Default is 80%</strong></p>



<p>Level at which user gets a warning message</p>



<p>Syntax: g_quota_at string</p>



<h3 class="wp-block-heading" id="g_quota_noemail">g_quota_noemail</h3>



<p><strong>Disables all quota messages to the user</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_quota_noemail bool</p>



<h3 class="wp-block-heading" id="g_quota_notrash">g_quota_notrash</h3>



<p><strong>Remove Trash folder from quota calculation</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_quota_notrash bool</p>



<h3 class="wp-block-heading" id="g_quota_rcpt_disable">g_quota_rcpt_disable</h3>



<p><strong>Disables quota check at rcpt stage</strong></p>



<p>SurgeMail now does quota checking at rcpt stage (Quota checking used to be done after data arrived) This setting disables the quota checking at rcpt stage if the above causes problems (not intended for general use).</p>



<p>Syntax: g_quota_rcpt_disable bool</p>



<h3 class="wp-block-heading" id="g_quota_try_later">g_quota_try_later</h3>



<p><strong>Retry responses for over quota</strong></p>



<p>Give 450 response if user is over quota so message will be resent.</p>



<p>Syntax: g_quota_try_later bool</p>



<h3 class="wp-block-heading" id="g_quota_friends">g_quota_friends</h3>



<p><strong>Count stored spam as part of quota</strong></p>



<p>Count friends pending messages and spam store as part of the per user quota.</p>



<p>Syntax: g_quota_friends bool</p>



<h3 class="wp-block-heading" id="g_quota_before_forward">g_quota_before_forward</h3>



<p><strong>Do quota check before forwarding.</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_quota_before_forward bool</p>



<h3 class="wp-block-heading" id="g_quota_skip">g_quota_skip</h3>



<p><strong>Skip quota checks for matching ip addresses</strong></p>



<p>Skips the quota checking. Use this if you have a high priority robot (like your billing system) that must be able to deliver email to users (or students) even if the user is over quota.</p>



<p>Syntax: g_quota_skip string</p>



<h3 class="wp-block-heading" id="g_quota">g_quota</h3>



<p><strong>-quota-default-default-quota" &gt;</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_quota_default string</p>



<h3 class="wp-block-heading" id="g_quota_disable">g_quota_disable</h3>



<p><strong>Disable quota system</strong></p>



<p>Disables quota processing completely</p>



<p>Syntax: g_quota_disable bool</p>



<h3 class="wp-block-heading" id="g_quota_report">g_quota_report</h3>



<p><strong>Send quota warnings to the manager</strong></p>



<p>Useful for small systems where any quota limit failure is an issue for the manager to resolve, only one report is sent a day so you may not hear about all users over quota.</p>



<p>Syntax: g_quota_report bool</p>



<h3 class="wp-block-heading" id="g_quota_550">g_quota_550</h3>



<p><strong>Give 550 quota response instead of 552</strong></p>



<p>Can help with old systems that need the wrong error code.</p>



<p>Syntax: g_quota_550 bool</p>



<h3 class="wp-block-heading" id="g_quota_default">g_quota_default</h3>



<p><strong>Default quota</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_quota_default string</p>



<h3 class="wp-block-heading" id="g_rcpt_max">g_rcpt_max</h3>



<p><strong>Max recipients per message, default is 1000</strong></p>



<p>Max recipients per message, default is 1000, can only be lower than 1000.</p>



<p>Syntax: g_rcpt_max int</p>



<h3 class="wp-block-heading" id="g_rcpt_max_in">g_rcpt_max_in</h3>



<p><strong>Limit for recipients of untrusted channels, default g_rcpt_max</strong></p>



<p>This limit is only applied to untrusted sessions (incoming mail)</p>



<p>Syntax: g_rcpt_max_in int</p>



<h3 class="wp-block-heading" id="g_rcpt_msg">g_rcpt_msg</h3>



<p><strong>Invalid recipient response</strong></p>



<p>Response given for invalid recipient errors message is prefixed by email address..</p>



<p>Syntax: g_rcpt_msg string</p>



<h3 class="wp-block-heading" id="g_rcpt_bang">g_rcpt_bang</h3>



<p><strong>Allow bang characters in addresses</strong></p>



<p>Allow exclamation marks in addresses. ie ‘!’</p>



<p>Syntax: g_rcpt_bang bool</p>



<h3 class="wp-block-heading" id="g_rcpt_colon">g_rcpt_colon</h3>



<p><strong>Allow colon characters in addresses</strong></p>



<p>Allow colon characters in addresses. ie ‘:’</p>



<p>Syntax: g_rcpt_colon bool</p>



<h3 class="wp-block-heading" id="g_rcpt_quote">g_rcpt_quote</h3>



<p><strong>Allow quote character(s) in addresses</strong></p>



<p>By default quotes are blocked at the SMTP level, this is because some of the authent modules don’t handle quotes in addresses so it’s best not to let them through. There is no known reason for ever turning this setting on.</p>



<p>Syntax: g_rcpt_quote bool</p>



<h3 class="wp-block-heading" id="g_rcpt_nodup">g_rcpt_nodup</h3>



<p><strong>Ignore duplicate recipients to the same user</strong></p>



<p>When enabled this prevents a message being delivered more than once to a single person, it’s a fairly good setting to use and will get rid of some spam for people using fallback addresses.</p>



<p>Syntax: g_rcpt_nodup bool</p>



<h3 class="wp-block-heading" id="g_rcpt_trace">g_rcpt_trace</h3>



<p><strong>Add X-Rcpt-Trace headers</strong></p>



<p>This will list all recipients in the message to facilitate tracing</p>



<p>Syntax: g_rcpt_trace bool</p>



<h3 class="wp-block-heading" id="g_rcpt_ok">g_rcpt_ok</h3>



<p><strong>Whitelist for invalid rcpt addresses we will permit</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_rcpt_ok string</p>



<h3 class="wp-block-heading" id="g_find_wrong">g_find_wrong</h3>



<p><strong>Find domain based on IP even if url suggests other vdomain</strong></p>



<p>This setting is for backward compatibility to reproduce buggy behaviour</p>



<p>Syntax: g_find_wrong bool</p>



<h3 class="wp-block-heading" id="g_from_ok">g_from_ok</h3>



<p><strong>Whitelist for invalid from addresses we will permit</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_from_ok string</p>



<h3 class="wp-block-heading" id="g_rdns_timeout">g_rdns_timeout</h3>



<p><strong>Timeout for reverse DNS lookups default is 30 seconds</strong></p>



<p>Best set between 10 and 60</p>



<p>Syntax: g_rdns_timeout int</p>



<h3 class="wp-block-heading" id="g_received_name">g_received_name</h3>



<p><strong>Name shown in received headers</strong></p>



<p>Name shown as received “by” in the received headers this defaults to server name but can be specified if required:</p>



<p>eg “myservername”</p>



<pre class="wp-block-preformatted"> Received: from netwin.co.nz (unverified [10.0.0.5])
 by myservername (SurgeMail 1.5f) with ESMTP id 1140619
 for &lt;marijn@netwin.co.nz&gt;; Fri, 07 Nov 2003 10:25:59 +1300
</pre>



<p>Syntax: g_received_name string</p>



<h3 class="wp-block-heading" id="g_received_names">g_received_names</h3>



<p><strong>List of valid received names for incoming email</strong></p>



<p>This list is used when processing vanish_bad_bounces, vanish_virus_bounces and vanish_any_bounce. It defines the valid received names to expect quoted in a properly formed bounce message for a message from this server/system.</p>



<p>Syntax: g_received_names string</p>



<h3 class="wp-block-heading" id="g_received_skip">g_received_skip</h3>



<p><strong>Don’t write a received header for local trusted users</strong></p>



<p>This setting can be used to hide sensitive local ip addresses from outgoing mail headers. This will make tracking abuse more difficult, we do not recommend using this setting generally.</p>



<p>Syntax: g_received_skip bool</p>



<h3 class="wp-block-heading" id="g_received_skip_all">g_received_skip_all</h3>



<p><strong>Skip local received header for messages that have non local recipients</strong></p>



<p>Note that in the case of a message that is to a local and remote recipeient, it will skip the headers for both, even though the desire is to skip them for the remote recipient only. This not quite right, ideally one should skip this for outgoing only but since the header is added at delivery time we thought this was close enough.</p>



<p>Syntax: g_received_skip_all bool</p>



<h3 class="wp-block-heading" id="g_received_skip_spf">g_received_skip_spf</h3>



<p><strong>Skip spf received header for messages that have non local recipients</strong></p>



<p>Note that in the case of a message that is to a local and remote recipeient, it will skip the headers for both, even though the desire is to skip them for the remote recipient only. This not quite right, ideally one should skip this for outgoing only but since the header is added at delivery time we thought this was close enough.</p>



<p>Syntax: g_received_skip_spf bool</p>



<h3 class="wp-block-heading" id="g_recent_bypass">g_recent_bypass</h3>



<p><strong>Bypass recent login failure checking</strong></p>



<p>This allows you to disable recent login failure checking for certain IP addresses. Normally there up to a maximum of 9 login attempts are allowed per connection.</p>



<p>Syntax: g_recent_bypass string</p>



<h3 class="wp-block-heading" id="g_record_days">g_record_days</h3>



<p><strong>Period delivery logs are stored</strong></p>



<p>The number of days SurgeMail message delivery logs are stored.</p>



<p>Syntax: g_record_days int</p>



<h3 class="wp-block-heading" id="g_record_hash">g_record_hash</h3>



<p><strong>Hash delivery logs</strong></p>



<p>Message delivery logs may be stored in hashed format within g_record_path as &lt;surgemail dir&gt; \recYYMM\msgYYMMDD.rec</p>



<p>Syntax: g_record_hash bool</p>



<h3 class="wp-block-heading" id="g_record_login">g_record_login</h3>



<p><strong>Log successful logins to msg*rec files</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_record_login bool</p>



<h3 class="wp-block-heading" id="g_record_path">g_record_path</h3>



<p><strong>Path for mail delivery logs</strong></p>



<p>Sets the path for the SurgeMail delivery logs. Delivery logs contain entries for mail received and delivered in a single file per day. See&nbsp;<a href="https://surgemail.com/knowledge-base/global-settings-misc-p-z/log.htm">Searching the Log Files</a>&nbsp;for more information.</p>



<p>Syntax: g_record_path string</p>



<h3 class="wp-block-heading" id="g_redirect">g_redirect</h3>



<p><strong>Redirect messages to ‘was’ to the ‘new’ address</strong></p>



<p>Specifies global redirection rule. These rules are applied to local and remote addresses so should be used with ‘care’, for domain based redirection use the redirect rules within a domain. An example rule would be: fred@xx.com –&gt; bob@yy.com or *@xx.com –&gt; joe@xx.com&nbsp;</p>



<p>Wild cards can be used and replaced, e.g.</p>



<p>g_redirect was=”*@gadget.net” to=”%1@gadget.com”<br>g_redirect was=”*@*.gadget.com” to=”%1-%2@gadget.com”</p>



<p>Would make</p>



<p>bob@gadget.net –&gt; bob@gadget.com<br>fred@cool.gadget.com –&gt; fred-cool@gadget.com</p>



<p>These rules are processed ‘before’ the domain is identified, therefore you cannot use host_alias domain values in them. Use a domain redirect rule if this is required.</p>



<p>You can also redirect a message to a robot or script like this:</p>



<p>g_redirect was=”auto@mydomain.com” to=”|/usr/local/myrobot.sh”</p>



<p>Your script can read the environment variables:<br>MAILFROM<br>RCPTTO<br>MSGSIZE</p>



<p>And must read the message on ‘stdin’, the message will be terminated with “crlf.crlf”</p>



<p>Your script can then process the message and if it want’s to respond must use smtp to send a response back etc…</p>



<p>Your script will run as the user ‘mail’ so if that user does not have access to the script file or work files then it will fail&nbsp;</p>



<p>Syntax: g_redirect was=string to=string</p>



<h3 class="wp-block-heading" id="g_redirect_cc_attach">g_redirect_cc_attach</h3>



<p><strong>Redirect message as attachment if rule applies</strong></p>



<p>This rule is applied at the point of delivery, so only if the original user actually gets the email, and the message is sent as an attachment, the original message is ALSO delivered</p>



<p>Syntax: g_redirect_cc_attach was=string to=string header=string contains=string</p>



<h3 class="wp-block-heading" id="g_redirect_cc">g_redirect_cc</h3>



<p><strong>Carbon Copy redirect message</strong></p>



<p>Same as ‘redirect’ but the message is still delivered to the original address as well. For g_redirect_cc there are two special names defined “$localdomain$” and “$remotedomain$”, which can be used in the ‘was’ paramater (requires SurgeMail 2.3).&nbsp;</p>



<p>Syntax: g_redirect_cc was=string to=string</p>



<h3 class="wp-block-heading" id="g_redirect_from">g_redirect_from</h3>



<p><strong>Redirect message if from matches</strong></p>



<p>Redirect a message to another address if the from matches.&nbsp;</p>



<p>Syntax: g_redirect_from from=string to=string</p>



<h3 class="wp-block-heading" id="g_redirect_from_cc">g_redirect_from_cc</h3>



<p><strong>Carbon Copy redirect message if from matches</strong></p>



<p>Redirect a copy of the message to another address if the from matches still delivering to the original address as well.</p>



<p>Syntax: g_redirect_from_cc from=string to=string</p>



<h3 class="wp-block-heading" id="g_redirect_hide">g_redirect_hide</h3>



<p><strong>Hide the redirection in the SMTP output</strong></p>



<p>Hide the redirection in the SMTP output</p>



<p>Syntax: g_redirect_hide bool</p>



<h3 class="wp-block-heading" id="g_redirect_iflocal">g_redirect_iflocal</h3>



<p><strong>If local domain, then apply redirect</strong></p>



<p>This is for doing fancy redirection where the rule is only applied if the domain of the destination is a local domain. For example to redirect all messages to postmaster at any local domain to one particular admin user.</p>



<p>Syntax: g_redirect_iflocal was=string to=string</p>



<p>Example: g_redirect_iflocal was=”postmaster@*” to=”john@main.domain”</p>



<h3 class="wp-block-heading" id="g_redirect_ses">g_redirect_ses</h3>



<p><strong>If message is not local then apply redirect</strong></p>



<p>Send all outgoing email to this address instead, useful for redirecting email to a robot (like amazon ses service), this is called for each outgoing message, once for each recipient</p>



<p>Syntax: g_redirect_ses from=string was=string to=string</p>



<p>Example: g_redirect_ses was=”*” to=”john@external.domain”</p>



<h3 class="wp-block-heading" id="g_redirect_ignore_errors">g_redirect_ignore_errors</h3>



<p><strong>Accept email even if redirected addresses fail</strong></p>



<p>We consider this to be faulty behaviour as it will lead to emails vanishing with no bounce, use entirely at your own risk.</p>



<p>Syntax: g_redirect_ignore_errors bool</p>



<h3 class="wp-block-heading" id="g_redirect_noautocreate_rules">g_redirect_noautocreate_rules</h3>



<p><strong>Don’t create redirection rules for domains automatically</strong></p>



<p>This will stop SurgeMail creating redirection rules for new domains such as postmaster,abuse and support</p>



<p>Syntax: g_redirect_noautocreate_rules bool</p>



<h3 class="wp-block-heading" id="g_redirect_newmid">g_redirect_newmid</h3>



<p><strong>Generate new MID on redirection</strong></p>



<p>This can help avoid loops.</p>



<p>Syntax: g_redirect_newmid bool</p>



<h3 class="wp-block-heading" id="g_relay_allow_ip">g_relay_allow_ip</h3>



<p><strong>Allow relaying from these users</strong></p>



<p>List the IP ranges of local users that you will allow to send ‘OUTGOING’ Email without using SMTP authentication, e.g. “127.0.0.1,10.0.*”. In the past, mail servers used to permit this from any IP address, but since this was abused by ‘spammers’ all modern mail servers only allow this from known local IP addresses. Remote users should use ‘smtp authentication’ or login via POP protocol before sending Email, then SurgeMail will trust them. Do NOT set this to ‘*’ If you do your system will be blocked as it will be assumed that spammers are using your system even if they are not!!!</p>



<p>Syntax: g_relay_allow_ip string</p>



<h3 class="wp-block-heading" id="g_relay_allow_from">g_relay_allow_from</h3>



<p><strong>Allow relaying for known from addresses</strong></p>



<p>This setting allows users to send outgoing Email if their envelope ‘from’ address is a known local address. This is a very bad idea in general as spammers can do this too. So in general don’t use this setting except as a lesser of two evils. It will be detected by some open relay checking systems and your site can then end up listed as an open relay. If this happens your Emails will be rejected by other peoples systems. e.g.</p>



<pre class="wp-block-preformatted">g_relay_allow_from "*@my.domain,*@second.domain,fred@third.domain"</pre>



<p>Syntax: g_relay_allow_from string</p>



<h3 class="wp-block-heading" id="g_relay_dom_and_ip">g_relay_dom_and_ip</h3>



<p><strong>Relay based on domain and IP</strong></p>



<p>Allow relaying if the domain in the from envelope and IP address both match.</p>



<p>Syntax: g_relay_dom_and_ip domain=string ip=string</p>



<h3 class="wp-block-heading" id="g_relay_window">g_relay_window</h3>



<p><strong>Allow relaying after valid POP login</strong></p>



<p>This sets the time after a valid POP login that you will allow a user on the same IP to send outgoing mail. In general it is safe to set this setting large and it can allow people using old mail clients (that do not know how to do SMTP authentication) to still send through your server without making your server an open relay.</p>



<p>Syntax: g_relay_window int</p>



<h3 class="wp-block-heading" id="g_relay_window_from">g_relay_window_from</h3>



<p><strong>Requires pop authed user is in from header of sent message</strong></p>



<p>This must be used with g_relay_window, the matching is ‘simplistic’ and matches on the ‘from envelope’ but will stop most simple forms of abuse.</p>



<p>Syntax: g_relay_window_from bool</p>



<h3 class="wp-block-heading" id="g_relay_to">g_relay_to</h3>



<p><strong>Relay to this domain from anyone</strong></p>



<p>This setting allows mail from anyone to be relayed to the specified domain. The relaying is unconditional.</p>



<p>Syntax: g_relay_to string</p>



<h3 class="wp-block-heading" id="g_relay_to_user">g_relay_to_user</h3>



<p><strong>Relay to specific user from anyone</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_relay_to_user string</p>



<h3 class="wp-block-heading" id="g_relay_process">g_relay_process</h3>



<p><strong>Relay process, e.g. testip.exe $WHOIP, return 1 to allow relaying, 0=deny</strong></p>



<p>Allows you to run an external program to lookup an ip address and decide if it is one of your users who should be allowed to relay. This can be used when your users login via some type of shared system so the ip ranges are not known but you do have a way of checking if a user of yours is ‘currently’ connected on an ip address</p>



<p>Syntax: g_relay_process string</p>



<p>Example: g_relay_process “c:/surgemail/testip.exe $WHOIP”</p>



<h3 class="wp-block-heading" id="g_relay_ifnot">g_relay_ifnot</h3>



<p><strong>Accept locally only if not from this ip</strong></p>



<p>This lets you send all email to ‘mx’ destination, even if the account is local, unless it is coming from a known ip address range.</p>



<p>Syntax: g_relay_ifnot string</p>



<h3 class="wp-block-heading" id="g_relay_message">g_relay_message</h3>



<p><strong>Message to display to users who try to relay</strong></p>



<p>Text string displayed to users who try and relay.</p>



<p>Default (blank) is: “Relaying blocked, read new mail, add &lt;sender.ip&gt; to forwarding or enable smtp authentication in your mail client”</p>



<p>Syntax: g_relay_message string</p>



<h3 class="wp-block-heading" id="g_relay_nolocal">g_relay_nolocal</h3>



<p><strong>Do not automatically relay for 127.0.0.1</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_relay_nolocal bool</p>



<h3 class="wp-block-heading" id="g_rename_files">g_rename_files</h3>



<p><strong>Files to apply virus renaming to</strong></p>



<p>Only takes effect if g_virus_rename is checked. Default is: “*.exe,*.pif,*.bat,*.com,*.cmd,*.jav,*.vbs,*.scr,*.wsh”</p>



<p>Syntax: g_rename_files string</p>



<h3 class="wp-block-heading" id="g_rename_content">g_rename_content</h3>



<p><strong>Wild card list of mime types to rename, e.g. application*zip*</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_rename_content string</p>



<h3 class="wp-block-heading" id="g_restart">g_restart</h3>



<p><strong>Auto restart server</strong></p>



<p>If turned on Swatch (a spawned second process) checks every 30 seconds to see if the server is still running. If it isn’t running but it’s pid file still exists (so if it died) this second process restarts the missing server and sends the manager account an Email reporting the fault.</p>



<p>For this to work on NT you need to set Dr Watson NOT to show visual notification of faults:</p>



<pre class="wp-block-preformatted">&nbsp;This sets Dr Watson to be the default debugger)
 c:/&gt; drwtsn32 /i
&nbsp;This brings up the Dr Watson settings, un-tick "Visual Notification"
 c:/&gt; drwtsn32</pre>



<p>Generally this setting is not needed and could be left off, but if an odd problem should develop, this setting can give you peace of mind for a few days while you wait for a problem resolution from NetWin.</p>



<p>Syntax: g_restart bool</p>



<h3 class="wp-block-heading" id="g_restart_vmsize">g_restart_vmsize</h3>



<p><strong>Restart server if vmsize exceeds this (in mb), e.g. 1000</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_restart_vmsize int</p>



<h3 class="wp-block-heading" id="g_restart_malloc">g_restart_malloc</h3>



<p><strong>Restart server if malloc exceeds this (in mb), e.g. 1000</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_restart_malloc int</p>



<h3 class="wp-block-heading" id="g_restart_kill">g_restart_kill</h3>



<p><strong>Allow swatch to kill surgemail if not responding – beta</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_restart_kill bool</p>



<h3 class="wp-block-heading" id="g_retry_limit">g_retry_limit</h3>



<p><strong>Max hours to keep trying to deliver messages</strong></p>



<p>Every hour the mail server will attempt to deliver any messages that fail for a reason that may be a temporary fault (for example the destination mail server doesn’t respond). This setting limits how long these retries continue for. The default is 48 hours (2 days).&nbsp;</p>



<p>Syntax: g_retry_limit int</p>



<h3 class="wp-block-heading" id="g_retry_bounces">g_retry_bounces</h3>



<p><strong>Max hours to keep trying to bounce messages</strong></p>



<p>Max hours to keep trying to deliver a bounce the default is 48hrs</p>



<p>Syntax: g_retry_bounces int</p>



<h3 class="wp-block-heading" id="g_retry_dns">g_retry_dns</h3>



<p><strong>Hours to keep trying if dns response suggested invalid domain name, default 0</strong></p>



<p>By default, if the DNS server says a domain doesn’t exist, the message is immediately bounced so the sending user can take action. In some rare cases this will occur with a valid domain name because the actual DNS of the domain you are sending to is temporarily down. In this situation making SurgeMail retry for 1 hour can prevent these false bounces. I don’t recommend this setting as mostly the DNS response and cache etc is very very reliable because SurgeMail keeps a local cache of DNS lookups that worked on disk. So for a failure like this to occur it must be the first time the server has EVER looked up the domain, so the odds are extremely remote. Delaying a useful response to the user for 1 hour just for this remote chance is not wise in my opinion.</p>



<p>Syntax: g_retry_dns int</p>



<p>Example: g_retry_dns “1”</p>



<h3 class="wp-block-heading" id="g_retry_warn">g_retry_warn</h3>



<p><strong>Send user a warning if first send fails</strong></p>



<p>I like this setting myself but it can confuse users as the first send attempt will often fail and the user will mis read the bounce and think it’s failed completely. It does mean when a message is urgent the user gets told right away, instead of 2 days later, that there is a problem sending the message so for a business it’s a nice setting to enable.</p>



<p>Syntax: g_retry_warn bool</p>



<h3 class="wp-block-heading" id="g_retry_unwarn">g_retry_unwarn</h3>



<p><strong>Send user sent on confirmation if warning sent</strong></p>



<p>This complements the warning setting, so the user can see the message did eventually go through and after how long…</p>



<p>Syntax: g_retry_unwarn bool</p>



<h3 class="wp-block-heading" id="g_retry_warn_n">g_retry_warn_n</h3>



<p><strong>Send user a warning if nth send fails</strong></p>



<p>Similar to the above setting but this one reduces the false warnings as messasges often fail on the first attempt</p>



<p>Syntax: g_retry_warn_n int</p>



<h3 class="wp-block-heading" id="g_retry_minutes">g_retry_minutes</h3>



<p><strong>Time between attempted retries</strong></p>



<p>Time in minutes that SurgeMail will try and resend a message that has failed to be delivered.<br>(default = 60 minutes).</p>



<p>Syntax: g_retry_minutes int</p>



<h3 class="wp-block-heading" id="g_retry_rule">g_retry_rule</h3>



<p><strong>Retry rules overriding g_retry_limit</strong></p>



<p>Rules that allow you to specify the retry_limit in hours on a per destination domain basis.</p>



<p>Example:<br>g_retry_rule domain=”test.com” hours=”48″</p>



<p>That will make it keep retrying to send to the domain test.com for 48 hours.</p>



<p>Syntax: g_retry_rule domain=string hours=string</p>



<h3 class="wp-block-heading" id="g_retry_from">g_retry_from</h3>



<p><strong>Time to keep messages from these domains</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_retry_from domain=string hours=string</p>



<h3 class="wp-block-heading" id="g_legal_archive_enable">g_legal_archive_enable</h3>



<p><strong>Enable legal archive</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_legal_archive_enable bool</p>



<h3 class="wp-block-heading" id="g_legal_archive_local">g_legal_archive_local</h3>



<p><strong>Store files locally only</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_legal_archive_local bool</p>



<h3 class="wp-block-heading" id="g_legal_archive_spam">g_legal_archive_spam</h3>



<p><strong>Store files even if identified as spam (OBSOLETE)</strong></p>



<p>Messages are always stored now regardless of spam score</p>



<p>Syntax: g_legal_archive_spam bool</p>



<h3 class="wp-block-heading" id="g_legal_archive_add">g_legal_archive_add</h3>



<p><strong>Users must belong to this group to get their email archived</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_legal_archive_add string</p>



<h3 class="wp-block-heading" id="g_legal_archive_show">g_legal_archive_show</h3>



<p><strong>Users must belong to ‘archive_show’ group to see their own archive</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_legal_archive_show bool</p>



<h3 class="wp-block-heading" id="g_legal_archive_bucket">g_legal_archive_bucket</h3>



<p><strong>bucket for for net service</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_legal_archive_bucket string</p>



<h3 class="wp-block-heading" id="g_legal_archive_path">g_legal_archive_path</h3>



<p><strong>Local path for archive indexes</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_legal_archive_path string</p>



<h3 class="wp-block-heading" id="g_legal_archive_hostid">g_legal_archive_hostid</h3>



<p><strong>Unique integer for this host 1-9 use if sharing mail spool</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_legal_archive_hostid int</p>



<h3 class="wp-block-heading" id="g_legal_archive_encrypt_key">g_legal_archive_encrypt_key</h3>



<p><strong>Key for encrypting the data, you MUST never loose this</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_legal_archive_encrypt_key string</p>



<h3 class="wp-block-heading" id="g_legal_archive_keep">g_legal_archive_keep</h3>



<p><strong>Days to keep legal archive, units=days unless you specify years or months, default 5 years</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_legal_archive_keep int</p>



<h3 class="wp-block-heading" id="g_legal_archive_accesskey">g_legal_archive_accesskey</h3>



<p><strong>Amazon s3 awsaccesskeyid</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_legal_archive_accesskey string</p>



<h3 class="wp-block-heading" id="g_legal_archive_secretkey">g_legal_archive_secretkey</h3>



<p><strong>Amazon s3 awssecretkey</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_legal_archive_secretkey string</p>



<h3 class="wp-block-heading" id="g_legal_archive_only">g_legal_archive_only</h3>



<p><strong>Drop all messages after archiving them!</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_legal_archive_only bool</p>



<h3 class="wp-block-heading" id="g_legal_archive_nofail">g_legal_archive_nofail</h3>



<p><strong>Don’t bounce messages if archvie fails</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_legal_archive_nofail bool</p>



<h3 class="wp-block-heading" id="g_sabre_version">g_sabre_version</h3>



<p><strong>SabreDAV version (DO NOT CHANGE, for debugging only)</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_sabre_version string</p>



<h3 class="wp-block-heading" id="g_sample_get">g_sample_get</h3>



<p><strong>Sample account to check if deliveries work</strong></p>



<p>The idea is to create several accounts on various public mail servers. Then send a test message using a mailing list or g_redirect rule to these test accounts, then use the command tellmail sample_get CODE DELETE to check if the messages have arrived. The first paramter of tellmail sample_get is a code it expects to find in the message headers (or subject) and the second paramter should be the keyword ‘delete’ if you want it to delete the sample messages.</p>



<p>Syntax: g_sample_get host=string user=string pass=string</p>



<h3 class="wp-block-heading" id="g_sample_show">g_sample_show</h3>



<p><strong>Headers to show from sample messages</strong></p>



<p>Typicall you will list headers that are added by spam filters</p>



<p>Syntax: g_sample_show string</p>



<h3 class="wp-block-heading" id="g_scan_cmd">g_scan_cmd</h3>



<p><strong>Run command on message, and return integer</strong></p>



<p>Run command on message, and return integer, see g_scan_action.</p>



<p>Syntax: g_scan_cmd string</p>



<h3 class="wp-block-heading" id="g_scan_cmd_skip">g_scan_cmd_skip</h3>



<p><strong>Skip for matching ip addresses</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_scan_cmd_skip string</p>



<h3 class="wp-block-heading" id="g_scan_cmd_testing">g_scan_cmd_testing</h3>



<p><strong>Don’t reject, (for testing)</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_scan_cmd_testing bool</p>



<h3 class="wp-block-heading" id="g_scan_cmd_failok">g_scan_cmd_failok</h3>



<p><strong>Don’t reject if script fails</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_scan_cmd_failok bool</p>



<h3 class="wp-block-heading" id="g_scan_action">g_scan_action</h3>



<p><strong>Converts return value from g_scan_cmd to action on email</strong></p>



<p>Converts return value from g_scan_cmd, action=drop,accept,bounce.</p>



<p>Syntax: g_scan_action code=int action=string reason=string</p>



<h3 class="wp-block-heading" id="g_send_first_retry">g_send_first_retry</h3>



<p><strong>Minutes for first retry, default is 16 minutes, do not adjust!</strong></p>



<p>It’s best not to change this generally, if you set it too low then grey listing may fail, if you set it higher then email is delayed.</p>



<p>Syntax: g_send_first_retry int</p>



<h3 class="wp-block-heading" id="g_send_helo">g_send_helo</h3>



<p><strong>Domain to use for all outgoing SMTP helo commands</strong></p>



<p>Fully qualified domain to use for all outgoing SMTP helo commands.</p>



<p>Syntax: g_send_helo string</p>



<h3 class="wp-block-heading" id="g_send_helo_from">g_send_helo_from</h3>



<p><strong>Use the sending domain for the helo command</strong></p>



<p>If the senders domain name (in return path envelope) is a valid local domain, then it is used in the ‘helo’ command.</p>



<p>Not generally recommended. The correct use of the helo is to identify the sending machine, not the domain, so although this makes the headers look pretty it doesn’t make them more correct in my opinion.</p>



<p>Syntax: g_send_helo_from bool</p>



<h3 class="wp-block-heading" id="g_send_helo_in">g_send_helo_in</h3>



<p><strong>Lookup dns name of incoming ip connection on local interface</strong></p>



<p>So this is the local ip name it looks up not the remote ip address name.</p>



<p>Syntax: g_send_helo_in bool</p>



<h3 class="wp-block-heading" id="g_send_backoff">g_send_backoff</h3>



<p><strong>Backoff slow hosts</strong></p>



<p>Seconds to leave slow responding host alone (default 900).</p>



<p>Syntax: g_send_backoff int</p>



<h3 class="wp-block-heading" id="g_send_lines">g_send_lines</h3>



<p><strong>Send single line packets</strong></p>



<p>Send messages in single line packets, slow! (for debugging)</p>



<p>Syntax: g_send_lines bool</p>



<h3 class="wp-block-heading" id="g_send_nopoll">g_send_nopoll</h3>



<p><strong>Use sleep loop instead of poll (debugging only)</strong></p>



<p>This is to try and find an elusive fault on some systems sending large emails, not for general use</p>



<p>Syntax: g_send_nopoll bool</p>



<h3 class="wp-block-heading" id="g_send_lowpriority">g_send_lowpriority</h3>



<p><strong>Ip address of bulk sending servers</strong></p>



<p>This limits the impact from mailing lists that would otherwise clogg the server and prevent normal individual emails going through quickly, typically set to *bounce@* to lower mailing list priority</p>



<p>Syntax: g_send_lowpriority string</p>



<h3 class="wp-block-heading" id="g_send_max">g_send_max</h3>



<p><strong>Max concurrent sending sessions</strong></p>



<p>Maximum concurrent outgoing SMTP connections . You should not have to change this. The default is 100.</p>



<p>Syntax: g_send_max int</p>



<h3 class="wp-block-heading" id="g_send_max_perchan">g_send_max_perchan</h3>



<p><strong>Msgs to send on one open channel</strong></p>



<p>This may help delivery if a server is incorrectly identifying your server as a spam source. A value of 1-5 would be reasonable</p>



<p>Syntax: g_send_max_perchan int</p>



<h3 class="wp-block-heading" id="g_send_max_perdom">g_send_max_perdom</h3>



<p><strong>Max concurrent sending sessions to a single domain</strong></p>



<p>Maximum concurrent outgoing SMTP connections to a single domain. The default is 2. This can be set higher and the default used to be 6 however there are a few servers out there that don’t like more than 2 channels being opened to them.</p>



<p>Syntax: g_send_max_perdom int</p>



<h3 class="wp-block-heading" id="g_send_max_rcpt">g_send_max_rcpt</h3>



<p><strong>How many rcpt’s to send per message when sending</strong></p>



<p>Default is unlimited, Setting this to a small value like 10 may help some mail servers.</p>



<p>Syntax: g_send_max_rcpt int</p>



<h3 class="wp-block-heading" id="g_send_nolimit">g_send_nolimit</h3>



<p><strong>Don’t apply g_max_perdom limit when sending to this domain</strong></p>



<p>Use this on incomng mx severs for the local domain so it can use lots of channels to send the data through.</p>



<p>Syntax: g_send_nolimit string</p>



<h3 class="wp-block-heading" id="g_send_nosize">g_send_nosize</h3>



<p><strong>Don’t send size with from envelope</strong></p>



<p>Revert to old style sending, no known reason for doing this</p>



<p>Syntax: g_send_nosize bool</p>



<h3 class="wp-block-heading" id="g_send_no_domain">g_send_no_domain</h3>



<p><strong>Message to show when domain points to us but can’t find user or domain</strong></p>



<p>Most useful when using g_authent_always, as this error will be shown to local users when sending to local users that don’t exist.</p>



<p>Syntax: g_send_no_domain string</p>



<h3 class="wp-block-heading" id="g_send_onpopfetch">g_send_onpopfetch</h3>



<p><strong>Only send outgoing while doing a POPfetch</strong></p>



<p>Only send outgoing while doing a POPfetch (For dialup use).</p>



<p>Syntax: g_send_onpopfetch bool</p>



<h3 class="wp-block-heading" id="g_send_retry_550">g_send_retry_550</h3>



<p><strong>Retry on 550 responses (general failure)</strong></p>



<p>Might be useful to stop messages bouncing when destination server is temporarily rejecting everything</p>



<p>Syntax: g_send_retry_550 bool</p>



<h3 class="wp-block-heading" id="g_send_retry_552">g_send_retry_552</h3>



<p><strong>Retry on 552 responses (typically quota exceeded)</strong></p>



<p>Some faulty hosts return a 552 error when a user is over quota, this means that by the RFC SurgeMail must not try again to deliver the message. However this is clearly not a permanent error and so it’s often wise to retry in this situation, This setting makes SurgeMail attempt retries when faced with this odd response.</p>



<p>Syntax: g_send_retry_552 bool</p>



<h3 class="wp-block-heading" id="g_send_rewrite">g_send_rewrite</h3>



<p><strong>Rewrite envelope recipient at send stage, does not change destination server</strong></p>



<p>This rewrites the recipient envelope, you can use wild cards, e.g. *@this.domain %1@another.domain, to rewrite ‘from’ addresses use g_from_rewrite</p>



<p>Syntax: g_send_rewrite was=string to=string</p>



<h3 class="wp-block-heading" id="g_send_noskipslow">g_send_noskipslow</h3>



<p><strong>Don’t skip slow hosts</strong></p>



<p>Normally surgemail remembers hosts that are slow to open, fail and doesn’t retry for 60 minutes.</p>



<p>Syntax: g_send_noskipslow bool</p>



<h3 class="wp-block-heading" id="g_send_speed">g_send_speed</h3>



<p><strong>max outbound bandwidth</strong></p>



<p>Bytes per second to limit each outgoing channel to. eg: 10k</p>



<p>Syntax: g_send_speed int</p>



<h3 class="wp-block-heading" id="g_send_conspeed">g_send_conspeed</h3>



<p><strong>Outgoing connections per second per destination, default is 4</strong></p>



<p>This helps prevent surgemail exceed tarpit throttles common in unix mail servers, adjust at your own risk. This won’t generally limit outgoing email speed so you don’t need to touch it. A value of ‘1’ means surgemail can make one connection each second.</p>



<p>Syntax: g_send_conspeed int</p>



<h3 class="wp-block-heading" id="g_send_delay">g_send_delay</h3>



<p><strong>Wait this many seconds after sending each item.</strong></p>



<p>This is a simple throttle to limit sending speed to any single domain, a value of 2 seconds is probably reasonable. In general you would also set G_SEND_MAX_PERDOM to 1.</p>



<p>Syntax: g_send_delay int</p>



<h3 class="wp-block-heading" id="g_send_timeout">g_send_timeout</h3>



<p><strong>Send timeout</strong></p>



<p>Timeout, in seconds when sending mail, default is 540 (9 minutes)</p>



<p>Syntax: g_send_timeout int</p>



<h3 class="wp-block-heading" id="g_send_tolimit">g_send_tolimit</h3>



<p><strong>Limit speed to send to one or more domains.</strong></p>



<p>Some large providers will assume you are a spammer if you send too many messagse in an hour. If you have a large mailing list it’s easy to break these limits, in which case some rules like this can prevent this problem.</p>



<p>Syntax: g_send_tolimit domain=string perhour=int</p>



<p>Example: g_send_tolimit domain=”hotmail.com,*hotmail.com” perhour=”60″</p>



<h3 class="wp-block-heading" id="g_send_open_timeout">g_send_open_timeout</h3>



<p><strong>SMTP link open timeout</strong></p>



<p>Timeout, in seconds when opening an SMTP link.</p>



<p>Syntax: g_send_open_timeout int</p>



<h3 class="wp-block-heading" id="g_send_body_noretry">g_send_body_noretry</h3>



<p><strong>Don’t try and resend if failure during body send</strong></p>



<p>By default SurgeMail retries to send messages if the tcp connection is lost during the body send part of sending an email message. In rare situations this may cause problems, for example while sending a large file if the receiving software is faulty and is dieing rather than responding with ‘don’t try again’ error code. This behaviour was reversed before version 2.0h (e.g. it never retried)</p>



<p>Syntax: g_send_body_noretry bool</p>



<h3 class="wp-block-heading" id="g_send_body_end_retry">g_send_body_end_retry</h3>



<p><strong>Try again if connection fails after entire body sent</strong></p>



<p>This setting will tend to result in ‘duplicate’ messages being received, so should not be used, but strictly speaking it is valid to retry in this situation, the trouble is the receiving mail server ‘may’ have a real copy of the message so may deliver it even though the connection was dropped.</p>



<p>Syntax: g_send_body_end_retry bool</p>



<h3 class="wp-block-heading" id="g_send_body_once">g_send_body_once</h3>



<p><strong>Don’t try 3 times if failure occurs sending body</strong></p>



<p>This setting disables the new feature where the server tries harder to deliver a message even if it ‘might’ result in duplicates being delivered.</p>



<p>Syntax: g_send_body_once bool</p>



<h3 class="wp-block-heading" id="g_send_bug1">g_send_bug1</h3>



<p><strong>Fail while sending messages</strong></p>



<p>Debugging feature.</p>



<p>Syntax: g_send_bug1 bool</p>



<h3 class="wp-block-heading" id="g_send_sslheader">g_send_sslheader</h3>



<p><strong>Add x-encrypted header when sending via ssl</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_send_sslheader bool</p>



<h3 class="wp-block-heading" id="g_send_strip">g_send_strip</h3>



<p><strong>Headers to strip when sending</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_send_strip string</p>



<h3 class="wp-block-heading" id="g_send_store_disable">g_send_store_disable</h3>



<p><strong>Disable sendstore smtp extenstion</strong></p>



<p>This setting disables the ability to save the message to the sent folder as part of the smtp command (only used by SurgeAlert)</p>



<p>Syntax: g_send_store_disable bool</p>



<h3 class="wp-block-heading" id="g_server_name">g_server_name</h3>



<p><strong>Wildcard “SERVER_NAME” translation for domain identification</strong></p>



<p>The vdomain a user connects on is normally identified automatically for “user account self management” and for “webmail”. In the event that the domain name is not the same as the host name (eg hostname = mail.domain.com, domainname = domain.com) the WebMail web server can automatically translate the SERVER_NAME variable.</p>



<p>This setting specifies a wild card list of URLs ‘URL’ with associated translated host name for “SERVER_NAME”. If the URL matches then SERVER_NAME is set to the second part of this setting ‘name’. eg: to host the domains domain.com and mail.domain.com on host mail.domain.com:</p>



<p>g_server_name url=”*.domain.com” name=”domain.com”</p>



<p>Note: If your server name is not the same as your domain name also check the per domain setting&nbsp;<a href="https://surgemail.com/knowledge-base/global-settings-misc-p-z/domain.htm#url_host">URL_host</a>.</p>



<p>Syntax: g_server_name url=string name=string</p>



<h3 class="wp-block-heading" id="g_server_stamp">g_server_stamp</h3>



<p><strong>Replaces SurgeMail and version string in “Received” headers</strong></p>



<p>Replaces SurgeMail and version string in Received headers of process mail</p>



<p>Syntax: g_server_stamp string</p>



<h3 class="wp-block-heading" id="g_sf_disable">g_sf_disable</h3>



<p><strong>Smart Filter Disable</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_sf_disable bool</p>



<h3 class="wp-block-heading" id="g_sf_obey_users">g_sf_obey_users</h3>



<p><strong>Obey user submissions about non spam, usually not a good idea</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_sf_obey_users bool</p>



<h3 class="wp-block-heading" id="g_sf_ignore_users">g_sf_ignore_users</h3>



<p><strong>Ignore user submissions just use automatic samples (obsolete)</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_sf_ignore_users bool</p>



<h3 class="wp-block-heading" id="g_sf_generate">g_sf_generate</h3>



<p><strong>Build local smart filter</strong></p>



<p>Creates feature_gen.dat from sf_mfilter.txt (instead of using feature_gen.net downloaded from netwinsite.com). This requires your server to have a reasonable sample of spam in the train… folders, this is collected automatically over a few days.</p>



<p>Syntax: g_sf_generate bool</p>



<h3 class="wp-block-heading" id="g_sf_nnet">g_sf_nnet</h3>



<p><strong>Use Neural Network (Experimental, ONLY FOR TESTING)</strong></p>



<p>Experimental setting</p>



<p>Syntax: g_sf_nnet bool</p>



<h3 class="wp-block-heading" id="g_sf_binary">g_sf_binary</h3>



<p><strong>Use Binary Network</strong></p>



<p>Binary tree for scoring – this mechanism scores based on finding the sample or samples with the closes matching features, and counting how many are spam/not spam. This method is the best choice (currently)</p>



<p>Syntax: g_sf_binary bool</p>



<h3 class="wp-block-heading" id="g_sf_list">g_sf_list</h3>



<p><strong>Use list mechanism for scoring</strong></p>



<p>A new mechanism to score more rationally based on the known data.</p>



<p>Syntax: g_sf_list bool</p>



<h3 class="wp-block-heading" id="g_sf_nosanity">g_sf_nosanity</h3>



<p><strong>Disables improved g_sf_binary with sanity checks</strong></p>



<p>This smoothes out the nonsense a bit if g_sf_binary over-reacts to training or small samples</p>



<p>Syntax: g_sf_nosanity bool</p>



<h3 class="wp-block-heading" id="g_sf_sanity2">g_sf_sanity2</h3>



<p><strong>Enables improved sanity scoring</strong></p>



<p>This second sanity check improves scores over 8 to be a bit more useful.</p>



<p>Syntax: g_sf_sanity2 bool</p>



<h3 class="wp-block-heading" id="g_sf_sanity_test">g_sf_sanity_test</h3>



<p><strong>Experimental setting never use</strong></p>



<p>Test another spam scoring method</p>



<p>Syntax: g_sf_sanity_test bool</p>



<h3 class="wp-block-heading" id="g_sf_saneonly">g_sf_saneonly</h3>



<p><strong>Sane score only</strong></p>



<p>Experimental setting</p>



<p>Syntax: g_sf_saneonly bool</p>



<h3 class="wp-block-heading" id="g_sf_test2">g_sf_test2</h3>



<p><strong>Testing</strong></p>



<p>Experimental setting</p>



<p>Syntax: g_sf_test2 bool</p>



<h3 class="wp-block-heading" id="g_sf_rules">g_sf_rules</h3>



<p><strong>Use manual rules to improve scoring</strong></p>



<p>Use additional manual rules</p>



<p>Syntax: g_sf_rules bool</p>



<h3 class="wp-block-heading" id="g_sf_limit">g_sf_limit</h3>



<p><strong>Limit range of self training</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_sf_limit bool</p>



<h3 class="wp-block-heading" id="g_share_home">g_share_home</h3>



<p><strong>Allow sharing of home directory</strong></p>



<p>This allows sharing of the home directory in the unlikely situation that you might want to run separate surgemail processes. eg one process to cope with SMTP and another to cope with POP access.</p>



<p>Syntax: g_share_home bool</p>



<h3 class="wp-block-heading" id="g_share_mail">g_share_mail</h3>



<p><strong>Allow sharing of mail directory</strong></p>



<p>Set true if mail area is shared (by nfs or other mechanism)</p>



<p>Syntax: g_share_mail bool</p>



<h3 class="wp-block-heading" id="g_share_quota">g_share_quota</h3>



<p><strong>Do quota on disk (e.g. when using nfs shared spool)</strong></p>



<p>Normally SurgeMail keeps track of quota for all users in memory, this is efficient, but means if your are using a shared mail spool the quota figures are completely wrong, so use this setting to make surgemail keep track of quota’s on disk, it increases disk load a bit of course but not too much.</p>



<p>Syntax: g_share_quota bool</p>



<h3 class="wp-block-heading" id="g_shutdown_slow">g_shutdown_slow</h3>



<p><strong>Delay shutdown</strong></p>



<p>Add 20 second delay to shutdown for testing purposes only.</p>



<p>Syntax: g_shutdown_slow bool</p>



<h3 class="wp-block-heading" id="g_slow_welcome">g_slow_welcome</h3>



<p><strong>Delay the welcome message</strong></p>



<p>Add 20 second delay to welcome message for testing purposes only.</p>



<p>Syntax: g_slow_welcome bool</p>



<h3 class="wp-block-heading" id="g_sms_gateway">g_sms_gateway</h3>



<p><strong>Address and port of your SMS gateway</strong></p>



<p>This is the ip and port of an ’email to sms gateway’. The gateway should accept SMTP messages on this port and convert the email into an sms message then deliver to the phone number in the ‘to’ address. SMSGate is our ’email to sms gateway’ and is FREE with SurgeMail. Setting&nbsp;<a href="https://surgemail.com/knowledge-base/global-settings-misc-p-z/domain.htm#user_sms">user_sms</a>&nbsp;to “true” for a domain allows users to specify a phone number (or email address) and rules for when to notify them.</p>



<p>Syntax: g_sms_gateway string</p>



<h3 class="wp-block-heading" id="g_sms_gateway_force">g_sms_gateway_force</h3>



<p><strong>Force sms notifications to go to g_sms_gateway</strong></p>



<p>If a user sets their sms number to an email address, perhaps to make use of an existing gateway, then surgemail will send the message to the domain in that address. If you set this you can force the email to go to g_sms_gateway. NOTE: It is possible to configure SMSGate with ‘send_mode smtp’, ‘recv_mode none’ and no GSM modem. In this setup it simply reformats messages passing them on to the configured smtp_outserver for delivery as email messages.</p>



<p>Syntax: g_sms_gateway_force bool</p>



<h3 class="wp-block-heading" id="g_sms_gateway_msgbytes">g_sms_gateway_msgbytes</h3>



<p><strong>Maximum amount of message to send to g_sms_gatway (bytes)</strong></p>



<p>Defines the maximum number of bytes of ‘body’ text to send to the g_sms_gateway. All headers are sent, then the defined number of bytes of ‘body’ text. Defaults to 160. May be set larger than the default if you have a lot of html messages or multipart html and text messages. Should not be set too large as there is no point sending binary attachments and the like to an sms gateway.</p>



<p>Syntax: g_sms_gateway_msgbytes int</p>



<h3 class="wp-block-heading" id="g_sms_gateway_subjbytes">g_sms_gateway_subjbytes</h3>



<p><strong>Maximum length of subject in sms message</strong></p>



<p>Defines the maximum number of bytes of ‘subject’ text to send to the g_sms_gateway.</p>



<p>Syntax: g_sms_gateway_subjbytes int</p>



<h3 class="wp-block-heading" id="g_sms_forward">g_sms_forward</h3>



<p><strong>Specifies IP’s which are allowed to forward to SMS gateways</strong></p>



<p>Normally sms gateways are restricted to authenticated users (SMTP authentication) this allows you to specify IP’s which can send without authentication. For example you may want your dlist server to send SMS, in which case you might add 127.0.0.1 to this setting.</p>



<p>Syntax: g_sms_forward string</p>



<h3 class="wp-block-heading" id="g_smite_all">g_smite_all</h3>



<p><strong>Add smite headers to all messages passing through server</strong></p>



<p>Normally SmiteSpam headers are only added for locally delivered messages. This setting to all messages passing through this server.</p>



<p>Syntax: g_smite_all bool</p>



<h3 class="wp-block-heading" id="g_smite_gateway">g_smite_gateway</h3>



<p><strong>Add smite headers to gatewayed messages</strong></p>



<p>Normally SmiteSpam headers are only added for locally delivered messages. This setting adds the headers for gatewayed messages too. This also adds headers to messages that are redirected by forward rules as well.</p>



<p>Syntax: g_smite_gateway bool</p>



<h3 class="wp-block-heading" id="g_smite_level">g_smite_level</h3>



<p><strong>Smite level to discard message</strong></p>



<p>If&nbsp;<a href="https://surgemail.com/knowledge-base/global-settings-misc-p-z/protected.htm#smitespam">SmiteSpam</a>&nbsp;gives a message a “smite score” above this, throw it awayl. This setting is best never used. If used it should be set to ‘1 or 2’. A value of 1 = “has been reported”, 2 = “has been reported multiple times”. If smite match score is above this drop message. This is applied when the user downloads the email not at delivery time. What you probably want is ‘g_spam_bounce’ described elsewhere on this page.</p>



<p>Syntax: g_smite_level int</p>



<h3 class="wp-block-heading" id="g_smite_skip">g_smite_skip</h3>



<p><strong>Skip smitecrc processing for messages from these domains</strong></p>



<p>This will skip running SmiteCRC for messages whose from address matches these domains. This is the mail from envelope header NOT the from header in the message (you can check the return path header in the message to check what you need to add for this setting).</p>



<p>Note this is a wildcard field so to match any mail claiming to be from safedomain.com you would have to set:</p>



<p>g_smite_skip “*@safedomain.com”</p>



<p>Syntax: g_smite_skip string</p>



<h3 class="wp-block-heading" id="g_smite_skip_from">g_smite_skip_from</h3>



<p><strong>Skip spam scanner if from header/env matches this wild card</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_smite_skip_from string</p>



<h3 class="wp-block-heading" id="g_smite_skip_to">g_smite_skip_to</h3>



<p><strong>o&gt;</strong></p>



<p>Skip smite scanner if to matches this wild card to &lt;address&gt;.</p>



<p>Syntax: g_smite_skip_to string</p>



<h3 class="wp-block-heading" id="g_smite_skip_only">g_smite_skip_only</h3>



<p><strong>Skip spam scanner if to matches this wild card and no other recipients that ‘don’t’ match…</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_smite_skip_only string</p>



<h3 class="wp-block-heading" id="g_smite_skip_ip">g_smite_skip_ip</h3>



<p><strong>Skip smite based on sender IP</strong></p>



<p>Skip smite scanner if sender IP matches this wild card list.</p>



<p>Syntax: g_smite_skip_ip string</p>



<h3 class="wp-block-heading" id="g_smite_skip_auth">g_smite_skip_auth</h3>



<p><strong>Skip spam scanner if user logged in</strong></p>



<p>Skips spam checks and spam header generation for any authenticated local user.</p>



<p>Syntax: g_smite_skip_auth bool</p>



<h3 class="wp-block-heading" id="g_smite_skip_relay">g_smite_skip_relay</h3>



<p><strong>Skip spam scanner if ip can relay</strong></p>



<p>Skips spam checks and spam header generation for any local user.</p>



<p>Syntax: g_smite_skip_relay bool</p>



<h3 class="wp-block-heading" id="g_smite_tag">g_smite_tag</h3>



<p><strong>Tag message if in SmiteSpam database</strong></p>



<p>If set to true will tag messages already in the&nbsp;<a href="https://surgemail.com/knowledge-base/global-settings-misc-p-z/protected.htm#smitespam">SmiteSpam</a>&nbsp;database. A value of 1 = “has been reported”, 2 = “has been reported multiple times”.</p>



<p>Syntax: g_smite_tag bool</p>



<h3 class="wp-block-heading" id="g_smtp_allow_invalid">g_smtp_allow_invalid</h3>



<p><strong>Allow messages with invalid headers</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_smtp_allow_invalid bool</p>



<h3 class="wp-block-heading" id="g_smtp_auth_debug">g_smtp_auth_debug</h3>



<p><strong>Auth Debug (do not use)</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_smtp_auth_debug bool</p>



<h3 class="wp-block-heading" id="g_smtp_bounce_nslow">g_smtp_bounce_nslow</h3>



<p><strong>Number of handles to use for doing slow rejections of smtp connections</strong></p>



<p>If external servers are over loading your server so much that it ends up in a cpu loop rejecting connections then increaseing this might help. But beware your system must not run out of file handles so don’t set it too large, The default is 100</p>



<p>Syntax: g_smtp_bounce_nslow int</p>



<h3 class="wp-block-heading" id="g_smtp_cmd_timeout">g_smtp_cmd_timeout</h3>



<p><strong>SMTP command timeout</strong></p>



<p>Seconds to wait after getting a message for next command (workaround for sendmail bug)</p>



<p>Syntax: g_smtp_cmd_timeout int</p>



<h3 class="wp-block-heading" id="g_smtp_data_timeout">g_smtp_data_timeout</h3>



<p><strong>SMTP data timeout</strong></p>



<p>Seconds to wait for SMTP data input.</p>



<p>Syntax: g_smtp_data_timeout int</p>



<h3 class="wp-block-heading" id="g_smtp_data_bug">g_smtp_data_bug</h3>



<p><strong>Fail on incoming emails for debugging</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_smtp_data_bug bool</p>



<h3 class="wp-block-heading" id="g_smtp_delay_stamp">g_smtp_delay_stamp</h3>



<p><strong>Stamp message if sender doesn’t wait for welcome</strong></p>



<p>If true then if any smtp commands arrive before the ‘helo’ greeting is sent then a header is added to messages which will result in a higher spam score.</p>



<p>Syntax: g_smtp_delay_stamp bool</p>



<h3 class="wp-block-heading" id="g_smtp_delay">g_smtp_delay</h3>



<p><strong>Seconds to wait before responding to rcpts, 1-20, this reduces load on bulk senders</strong></p>



<p>Only applies if more than 2 connections from the same ip address, so it only throttles bulk senders not people</p>



<p>Syntax: g_smtp_delay int</p>



<h3 class="wp-block-heading" id="g_smtp_welcome_delay">g_smtp_welcome_delay</h3>



<p><strong>delays welcome message</strong></p>



<p>Syntax: g_smtp_welcome_delay “seconds”</p>



<p>This delays the welcome message sent by SurgeMail to a connecting server. If the server sends data to SurgeMail during this waiting time SurgeMail will drop their connection. The theory is that any well behaved server will wait for prompts and check them, but a lot of spamming software never takes any notice of prompts/responses and sends blindly. We believe a value of 1-3 seconds is ideal. You can also exempt ip’s from this setting by using g_spam_allow “ip”. Settings too high will cause real mail to be lost.</p>



<p>Examples:<br>g_smtp_welcome_delay “3”<br>g_spam_allow “127.0.0.1”</p>



<p>So above, delay giving the welcome message for 3 seconds, anyone that sends data in that 3 seconds will be dropped, but anything connecting from 127.0.0.1 will be able to send immediately (you should make sure webmail is exempt).</p>



<p>Syntax: g_smtp_welcome_delay int</p>



<h3 class="wp-block-heading" id="g_smtp_log_protocol">g_smtp_log_protocol</h3>



<p><strong>Log SMTP protocol</strong></p>



<p>If enabled, the SMTP protocol is logged to the mail.log file as “smtp: In” and “smtp: Out” entries.</p>



<p>Syntax: g_smtp_log_protocol bool</p>



<h3 class="wp-block-heading" id="g_smtp_log_size">g_smtp_log_size</h3>



<p><strong>Size of smtp.log file</strong></p>



<p>This sets the smtp.log file size, default is 2mb</p>



<p>Syntax: g_smtp_log_size int</p>



<h3 class="wp-block-heading" id="g_smtp_max">g_smtp_max</h3>



<p><strong>Max total incoming SMTP connections</strong></p>



<p>This limits the channels that will be used at any one time for incoming SMTP connections. The purpose of this setting is to prevent a sudden burst of spam from using up all available channels. Generally you do not need to change this. (Default = 250). Use the related setting&nbsp;<strong>g_smtp_max_reason</strong>&nbsp;to over-write the detailed error if you don’t want spammers to know what your limits are set to.</p>



<p>Syntax: g_smtp_max int</p>



<h3 class="wp-block-heading" id="g_smtp_warning">g_smtp_warning</h3>



<p><strong>Send manager warning if this many sessions reached (max 1 per hour)</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_smtp_warning int</p>



<h3 class="wp-block-heading" id="g_smtp_max_reason">g_smtp_max_reason</h3>



<p><strong>Reason to give to user if g_smtp_max is exceeded</strong></p>



<p>This is most useful when the host in question is being used for the wrong purpose (incoming when it’s intended for outgoing etc), or simply to advise the user of a potential solution</p>



<p>Syntax: g_smtp_max_reason string</p>



<h3 class="wp-block-heading" id="g_smtp_max_nolimit">g_smtp_max_nolimit</h3>



<p><strong>IP based exceptions to g_smtp_max</strong></p>



<p>This lets you specify IP based exceptions to g_smtp_max, so if you need a certain IP to open up many connections you would add that IP here.</p>



<p>eg. g_smtp_max_nolimit “10.0.0.50”</p>



<p>Syntax: g_smtp_max_nolimit string</p>



<h3 class="wp-block-heading" id="g_smtp_maxbad">g_smtp_maxbad</h3>



<p><strong>Max bad SMTP commands</strong></p>



<p>The maximum number of bad commands accepted per session before SurgeMail will drop the connection.</p>



<p>Example: g_smtp_maxbad “10”</p>



<p>Syntax: g_smtp_maxbad int</p>



<h3 class="wp-block-heading" id="g_smtp_port">g_smtp_port</h3>



<p><strong>p:port&gt;</strong></p>



<p>This allows SurgeMail to listen on a specified port and IP, you can add multiple IPs if you wish to listen on more than one and multiple ports also.</p>



<p>eg:<br>g_smtp_port “1.1.1.1:25, 2.2.2.2:1025”</p>



<h3 class="wp-block-heading" id="g_smtp_portauth">g_smtp_portauth</h3>



<p><strong>SMTP ports which require smtp authentication, typically 587</strong></p>



<p>It is recommended (by some) that users send email to port 587, and it requires smtp authentication, and port 25 be blocked from client ip addresses to prevent viruses etc using email servers. Be sure to add ,587 to the g_smtp_port setting too!</p>



<p>Syntax: g_smtp_portauth string</p>



<h3 class="wp-block-heading" id="g_smtp_portforce">g_smtp_portforce</h3>



<p><strong>Block logins for ports not listed in g_smtp_portauth</strong></p>



<p>Use this to prevent local users logging into port 25, this also stops many spammers abusing your system as they will try and send on port 25</p>



<p>Syntax: g_smtp_portforce bool</p>



<h3 class="wp-block-heading" id="g_smtp_secure_port">g_smtp_secure_port</h3>



<p><strong>Port to listen for secure SMTP connections (default 465)</strong></p>



<p>Port to listen on for dedicated SSL SMTP connections.</p>



<p>Syntax: g_smtp_secure_port int</p>



<h3 class="wp-block-heading" id="g_smtp_vrfy_msg">g_smtp_vrfy_msg</h3>



<p><strong>VRFY response</strong></p>



<p>Change Response to VRFY, e.g. 252 Not telling.</p>



<p>Syntax: g_smtp_vrfy_msg string</p>



<h3 class="wp-block-heading" id="g_smtp_vrfy_allow">g_smtp_vrfy_allow</h3>



<p><strong>Allow vrfy from these addresses, not recommended</strong></p>



<p>This setting is rarely a good idea, vrfy is best left disabled</p>



<p>Syntax: g_smtp_vrfy_allow string</p>



<h3 class="wp-block-heading" id="g_smtp_etrn_auth">g_smtp_etrn_auth</h3>



<p><strong>etrn if authenticatd</strong></p>



<p>Only do etrn processing if user is authenticated.</p>



<p>Syntax: g_smtp_etrn_auth bool</p>



<h3 class="wp-block-heading" id="g_smtp_help_disable">g_smtp_help_disable</h3>



<p><strong>disable smtp help command</strong></p>



<p>Disable SMTP help command (minor security percaution).</p>



<p>Syntax: g_smtp_help_disable bool</p>



<h3 class="wp-block-heading" id="g_smtp_plain_hide">g_smtp_plain_hide</h3>



<p><strong>Hide ‘plain’ from the ehlo response</strong></p>



<p>This is to keep stupid scanners happy, for security you should disable non SSL logins, disabling plain is pointless and annoying.</p>



<p>Syntax: g_smtp_plain_hide bool</p>



<h3 class="wp-block-heading" id="g_smtp_cram_enable">g_smtp_cram_enable</h3>



<p><strong>Enable CRAM-MD5 authentication (requires nwauth 4.0h or greater) – Not Recommended</strong></p>



<p>Please note that CRAM-MD5 does have security implications, specifically it means that the local users password must be stored in a semi reversable state in the authent database. Also you must be using the new version of the NWAuth module. Also Cram-md5 cannot be used with Migration from an old server (since by definiton the old password is never sent)</p>



<p>Syntax: g_smtp_cram_enable bool</p>



<h3 class="wp-block-heading" id="g_smtp_no_brackets">g_smtp_no_brackets</h3>



<p><strong>Allow from/rcpt without angle brackets</strong></p>



<p>Some faulty mail clients forget to put the brackets &lt;&gt; around the recipient, this setting allows such faulty behavior. Not generally recommended.</p>



<p>Syntax: g_smtp_no_brackets bool</p>



<h3 class="wp-block-heading" id="g_smtp_big">g_smtp_big</h3>



<p><strong>Slow down incoming SMTP reads to get bigger packets (experimental)</strong></p>



<p>This setting tries to prevent thrashing by making the server slow down the speed it reads data in an attempt to get larger packets. This seemed to have no affect when I tested it, but play with it if you want, It is only intended to be useful when you have hundreds of incoming connections all very slowly sending in data, and the server is short of CPU.</p>



<p>Syntax: g_smtp_big bool</p>



<h3 class="wp-block-heading" id="g_smtp_fast_bounce">g_smtp_fast_bounce</h3>



<p><strong>Reject bad connections immediately</strong></p>



<p>Normally SurgeMail waits 1-10 seconds before rejecting a bad connection (rbl/limits,…), this reduces cpu usage and prevents some DOS attacks, this setting disables this behaviour.</p>



<p>Syntax: g_smtp_fast_bounce bool</p>



<h3 class="wp-block-heading" id="g_smtp_fix_nohead">g_smtp_fix_nohead</h3>



<p><strong>Accept messages with no headers and try and cope</strong></p>



<p>This setting tries to cope if the message contains no headers at all, it is not recommended of course but may be needed on occasion for bad scripts</p>



<p>Syntax: g_smtp_fix_nohead bool</p>



<h3 class="wp-block-heading" id="g_smtp_thread">g_smtp_thread</h3>



<p><strong>Use seperate thread for incoming SMTP connections</strong></p>



<p>This makes the server run a seperate thread just to process incoming smtp connections, this can help on a busy system to stop a huge load of smtp connections clogging up the pop/imap connection processing, it is rarely needed.</p>



<p>Syntax: g_smtp_thread bool</p>



<h3 class="wp-block-heading" id="g_smtp_auth_off">g_smtp_auth_off</h3>



<p><strong>Disable SMTP AUTH from unknown ip addresses (NOT RECOMMENDED)</strong></p>



<p>This prevents a hacker sending out spam by cracking a users account details, users must login from an address specified in g_smtp_auth_ip or g_relay_allow_ip, NEVER USE THIS!</p>



<p>Syntax: g_smtp_auth_off bool</p>



<h3 class="wp-block-heading" id="g_smtp_auth_ip">g_smtp_auth_ip</h3>



<p><strong>Ip Addresses to accept smtp authentication from</strong></p>



<p>This prevents a hacker sending out spam by cracking a users account details, users must login from an address specified in g_smtp_auth_ip or g_relay_allow_ip</p>



<p>Syntax: g_smtp_auth_ip string</p>



<h3 class="wp-block-heading" id="g_smtp_noauth">g_smtp_noauth</h3>



<p><strong>Limit SMTP to just these addresses (not generally useful)</strong></p>



<p>Mail sent from other IP addresses is only accepted if user is authenticated. Typically used if your server is behind a firewall of some kind and should only allow incoming email from a particular IP address. Users will be able to send as from any IP address if they use smtp authentication. This setting is only useful if your incoming email always comes through a gateway or filter, it’s not a normally useful setting</p>



<p>Syntax: g_smtp_noauth string</p>



<h3 class="wp-block-heading" id="g_smtp_noauthm">g_smtp_noauthm</h3>



<p><strong>Limit SMTP to just these addresses (not generally useful)</strong></p>



<p>Mail sent from other IP addresses is only accepted if user is authenticated. Typically used if your server is behind a firewall of some kind and should only allow incoming email from a particular IP address. Users will be able to send as from any IP address if they use smtp authentication.</p>



<p>Syntax: g_smtp_noauthm string</p>



<h3 class="wp-block-heading" id="g_smtp_noauth_msg">g_smtp_noauth_msg</h3>



<p><strong>Message given when sender is told to use authentication because of g_smtp_noauth</strong></p>



<p>Message sent to sender when they try and send to the server but are required to authenticate because of g_smtp_noauth</p>



<p>Syntax: g_smtp_noauth_msg string</p>



<h3 class="wp-block-heading" id="g_smtp_noclear">g_smtp_noclear</h3>



<p><strong>Disable smtp buffer clear after starttls command</strong></p>



<p>Testing feature.</p>



<p>Syntax: g_smtp_noclear bool</p>



<h3 class="wp-block-heading" id="g_spam_allow">g_spam_allow</h3>



<p><strong>IP wild card of sites to exempt from spam limits</strong></p>



<p>Typically use this to allow known mailing list servers that use your system to send messages in without being tarpitted. e.g. “127.0.0.1,local.ip.number”. This same setting is an exception to the other spam rules.&nbsp;</p>



<p>Syntax: g_spam_allow string</p>



<h3 class="wp-block-heading" id="g_spam_allow_disable">g_spam_allow_disable</h3>



<p><strong>Disable allow bounce messages</strong></p>



<p>Normally when SurgeMail detects an SPF failure it will give the sending an opportunity to send an email to a special address, If the sender does this then their IP address is permitted in future, this saves a lot of hassle generally, in rare situations you may not want this system, this setting will just simply bounce the message instead.</p>



<p>Syntax: g_spam_allow_disable bool</p>



<h3 class="wp-block-heading" id="g_spam_allow_rbl">g_spam_allow_rbl</h3>



<p><strong>Give unblock message to RBL bounces too</strong></p>



<p>This setting extends the ‘allow’ email system used by SPF to the RBL style of failures. This makes it much safer to use RBL lists is block mode instead of stamping mode. You really must have g_spam_block enabled for this setting to work, otherwise the ‘allow’ mechanism lets everything through so this becomes pointless <img src="https://s.w.org/images/core/emoji/15.0.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<p>Syntax: g_spam_allow_rbl bool</p>



<h3 class="wp-block-heading" id="g_spam_allow_rdns">g_spam_allow_rdns</h3>



<p><strong>Trust ip name for spam checking, not recommended</strong></p>



<p>Spammers can trivially forge a reverse dns name, so it’s very unwise to use it for bypassing spam checking except for rare/local domain names that spammers won’t know to use</p>



<p>Syntax: g_spam_allow_rdns bool</p>



<h3 class="wp-block-heading" id="g_spam_allow_msg">g_spam_allow_msg</h3>



<p><strong>Template for unblock messages, use ||reason|| and ||allow|| and maybe a url</strong></p>



<p>This lets you tailor the ‘allow’ bounce message given to incoming messages that fail the SPF checks. ||reason|| becomes the reason for the failure and ||allow|| is either the allow email to send to, or a link to use (if using g_spf_byweb “TRUE”).</p>



<p>Syntax: g_spam_allow_msg string</p>



<p>Example: g_spam_allow_msg “||reason||, to fix send an email to ||allow|| then resend original email.”</p>



<h3 class="wp-block-heading" id="g_spam_block_msg">g_spam_block_msg</h3>



<p><strong>Template for spf blocked message if allow is disabled</strong></p>



<p>This error is given for SPF failures when the allow system is disabled. You are probably looking for the setting g_spam_allow_msg, as it is the one that is normally used when a user is ‘blocked’ by spf.</p>



<p>Syntax: g_spam_block_msg string</p>



<h3 class="wp-block-heading" id="g_spam_allow_known">g_spam_allow_known</h3>



<p><strong>Unblock IP address if we have received messages from it for 3 days (so it’s not a transient spammer)</strong></p>



<p>This setting makes the SPF strict settings much softer, basically it says any IP address we’ve known about for 3 days, is considered safe. This will still stop most spammers, particularly when used in combination with RBL lists which will block the ‘repeat’ offenders.</p>



<p>Syntax: g_spam_allow_known bool</p>



<h3 class="wp-block-heading" id="g_spam_allow_recent">g_spam_allow_recent</h3>



<p><strong>Exempt recent POP from spam limits</strong></p>



<p>Skip spam rules if recent POP IP number (see g_relay_window).&nbsp;</p>



<p>Syntax: g_spam_allow_recent bool</p>



<h3 class="wp-block-heading" id="g_spam_autotrain">g_spam_autotrain</h3>



<p><strong>Autotrain “good” filter</strong></p>



<p>Auto train spam filter good messages based on first 1,000 outgoing emails.</p>



<p>Syntax: g_spam_autotrain bool</p>



<h3 class="wp-block-heading" id="g_spam_block">g_spam_block</h3>



<p><strong>-block-msg-template-for-spf-blocked-message-if-allow-is-disabled" &gt;</strong></p>



<p>This error is given for SPF failures when the allow system is disabled. You are probably looking for the setting g_spam_allow_msg, as it is the one that is normally used when a user is ‘blocked’ by spf.</p>



<p>Syntax: g_spam_block_msg string</p>



<h3 class="wp-block-heading" id="g_spam_block_gateway">g_spam_block_gateway</h3>



<p><strong>Block spam gatewayed messages too</strong></p>



<p>Use this setting on incoming mail servers or servers that relay to servers that implement SPF. Without this SPF blocking will not work as the back end server cannot perform the SPF checks/blocking.</p>



<p>Syntax: g_spam_block_gateway bool</p>



<h3 class="wp-block-heading" id="g_spam_check_auth">g_spam_check_auth</h3>



<p><strong>Enable spam rules for authenticated users</strong></p>



<p>Normally authenticated users are exempt from spam rules when sending mail. This enables all spam checking rules for authenticated users.</p>



<p>Syntax: g_spam_check_auth bool</p>



<h3 class="wp-block-heading" id="g_spam_content_disable">g_spam_content_disable</h3>



<p><strong>Disable aspam_content.txt rules</strong></p>



<p>The file aspam_content.txt is fetched from netwinsite and used to identify certain common spam messages based on content. Each line in the file gives a list of words or phrases, if most of the words are found, then the rule matches. You can add your own rules to aspam_content_local.txt. In a message that matches a rule you will see in the spamdetect header, Content: cid=NNN cid=NNN, you can then match the NNN with the unique id of each rule in aspam_content.txt</p>



<p>Syntax: g_spam_content_disable bool</p>



<h3 class="wp-block-heading" id="g_spam_body">g_spam_body</h3>



<p><strong>Add SpamDetect header in body</strong></p>



<p>If spamdetect score is above this, add spamdetect header at top of message body (in addition to the header). This allows mail clients that are not able to filter mail based on headers to filter out spam email. This can be set on a per user basis too. A value of 3 or 4 would be reasonable. The only real reason for this setting is some common mail clients are unable to scan non standard headers so cannot automatically file spam in a folder unless this is used. My recommendation is for such users to use the web interface to set actions individually.</p>



<p>Syntax: g_spam_body int</p>



<h3 class="wp-block-heading" id="g_spam_body_url">g_spam_body_url</h3>



<p><strong>Text part of info to add to body, usually a url to your site</strong></p>



<p>On this page you should explain to your users why this tag was added to their message, and how they can adjust their spam settings etc.</p>



<p>Syntax: g_spam_body_url string</p>



<h3 class="wp-block-heading" id="g_spam_body_more">g_spam_body_more</h3>



<p><strong>Add more info to spam body (ip address, ptr address, reply to and bounce address)</strong></p>



<p>This can help the user decide if the message really is spam</p>



<p>Syntax: g_spam_body_more bool</p>



<h3 class="wp-block-heading" id="g_spam_folders">g_spam_folders</h3>



<p><strong>Train on any message dropped into the relevant folders</strong></p>



<p>This allows a user to create two folders ‘-Train Is Spam-‘ and ‘-Train Not Spam-‘ and then run the aspam training mechanism by dropping messages into those folders, items are expired ffrom train is spam folder after 30 days if G_EXPIRE_TRASH is TRUE</p>



<p>Syntax: g_spam_folders bool</p>



<h3 class="wp-block-heading" id="g_spam_folders_show">g_spam_folders_show</h3>



<p><strong>List the special folders for all users</strong></p>



<p>Without this setting the user must create the folder name correctly for training to work from imap folders</p>



<p>Syntax: g_spam_folders_show bool</p>



<h3 class="wp-block-heading" id="g_spam_flag">g_spam_flag</h3>



<p><strong>Add X-SPAM-FLAG: Yes header if smite score is above this level</strong></p>



<p>Some filters and servers like to see this header, a good value for this might be 7. Valid range would be 1-15, with 1 marking almost everything as spam, and 15 marking almost nothing.</p>



<p>Syntax: g_spam_flag int</p>



<h3 class="wp-block-heading" id="g_spam_from_blacklist">g_spam_from_blacklist</h3>



<p><strong>Fetch list of bad domains to reject email from – not recommended</strong></p>



<p>This feature fetches the file http://www.sa-blacklist.stearns.org/sa-blacklist/sa-blacklist.current and then uses it efficiently to block senders, it is a huge file (26mb). Not currently recommended, we don’t think the hit rate of this filter method is high enough to be useful. url used is http://www.sa-blacklist.stearns.org/sa-blacklist/sa-blacklist.current</p>



<p>Syntax: g_spam_from_blacklist string</p>



<h3 class="wp-block-heading" id="g_spam_grey">g_spam_grey</h3>



<p><strong>OBSOLETE DO NOT USE, Enable old greylisting for spf mechanism</strong></p>



<p>The grey listing mechanism relies on the principle that spammers are not using real mail servers but using dumb robots that won’t ‘retry’. So if all incoming messages are asked to ‘retry’ then the spam will not be received but the non spam will get in eventually. This does create a delay on all incoming mail, and may stop some stupid mail servers from successfully delivering. I would tend not to use this setting myself.</p>



<p>Syntax: g_spam_grey bool</p>



<h3 class="wp-block-heading" id="g_spam_grey_classc">g_spam_grey_classc</h3>



<p><strong>Apply grey listing to x.x.x.*</strong></p>



<p>In theory this broadens slightly what grey listing will accept.</p>



<p>Syntax: g_spam_grey_classc bool</p>



<h3 class="wp-block-heading" id="g_spam_grey_dflt">g_spam_grey_dflt</h3>



<p><strong>Enable greylisting for spf default accept events (not recommended)</strong></p>



<p>If a message is going to be accepted due to the spf default rule (so there was no real spf record), then this comes into play. If the message is not from a trusted person, or a domain that we have previously checked using grey listings. Then the message is bounced. If the sender then tries again to send the same message (from/to pair) within a few hours, but not within 1 minute, then that ip address is marked as ‘good’ and future messages from them are accepted. This setting will result in some real email bouncing but slightly reduce spam, we no longer recommend this setting.</p>



<p>Syntax: g_spam_grey_dflt bool</p>



<h3 class="wp-block-heading" id="g_spam_grey_dflt_bad">g_spam_grey_dflt_bad</h3>



<p><strong>Enable greylisting instead of allow in some cases (recommended for block or strict)</strong></p>



<p>This setting enables grey listing for spf default failure events only, and only if it’s the first message from that ip address if more arrive before the grey listing succeeds then allow bounces are sent instead</p>



<p>Syntax: g_spam_grey_dflt_bad bool</p>



<h3 class="wp-block-heading" id="g_spam_grey_verify">g_spam_grey_verify</h3>



<p><strong>Skip grey listing if host was not listening</strong></p>



<p>Skips the grey listing if the host didn’t resond to the g_smtp_verify probe for g_spam_grey_dflt_bad</p>



<p>Syntax: g_spam_grey_verify bool</p>



<h3 class="wp-block-heading" id="g_spam_grey_size">g_spam_grey_size</h3>



<p><strong>Size of grey listing table, default is 3000</strong></p>



<p>On busy servers set this to a larger figure, e.g. 9000 so it can remember more grey listing events</p>



<p>Syntax: g_spam_grey_size int</p>



<h3 class="wp-block-heading" id="g_spam_grey_bounce">g_spam_grey_bounce</h3>



<p><strong>Bounce if message was allowed due to grey listing, and spam score is above this, default 8 (was 4)</strong></p>



<p>Since messages which are allowed in due to grey listing generally can’t accept friends bounces (as the sender is unverified) it’s important to bounce them with an allow message instead if they look like spam</p>



<p>Syntax: g_spam_grey_bounce string</p>



<h3 class="wp-block-heading" id="g_spam_grey_window">g_spam_grey_window</h3>



<p><strong>Window to block bad messages, typically 60 seconds</strong></p>



<p>This prevents a fast retry by a stupid robot, some robots now wait 5-6 minutes but some mail servers may retry that fast too <img src="https://s.w.org/images/core/emoji/15.0.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<p>Syntax: g_spam_grey_window int</p>



<h3 class="wp-block-heading" id="g_spam_grey_nofive">g_spam_grey_nofive</h3>



<p><strong>Skip 5-6 minute black window for these domains</strong></p>



<p>Use this for domains that retry at 5 minute intervals, e.g. (*@cs.com,*@xyz.com), this skips a test used to detect a particularly virrulent spammer who uses a robot that retries at exactly 5 minute intervals</p>



<p>Syntax: g_spam_grey_nofive string</p>



<h3 class="wp-block-heading" id="g_spam_grey_nseen">g_spam_grey_nseen</h3>



<p><strong>Number of messages from an unknown host, default is 6</strong></p>



<p>When a host is unknown if it sends more than this many messages before the grey listing resend occurs then it’s considered to be a spammer.</p>



<p>Syntax: g_spam_grey_nseen int</p>



<h3 class="wp-block-heading" id="g_spam_grey_nohard">g_spam_grey_nohard</h3>



<p><strong>Avoid hard spf bounces always try and do a grey list instead</strong></p>



<p>This avoids the hard bounce you would normally get for failed real spf records.</p>



<p>Syntax: g_spam_grey_nohard bool</p>



<h3 class="wp-block-heading" id="g_spam_nolang">g_spam_nolang</h3>



<p><strong>Don’t add header with a guess at body language</strong></p>



<p>This adds a header which makes a best guess at the contents of the message, it should not be assumed to be 100 percent reliable! Also note that empty messages or messages containing only images may be classified as ‘Unknown (English)’</p>



<p>Syntax: g_spam_nolang bool</p>



<h3 class="wp-block-heading" id="g_spam_phrase">g_spam_phrase</h3>



<p><strong>Enable auto spam phrase filter</strong></p>



<p>Enables a Bayesian word and phrase filter to enhance spam filtering. The filter auto trains based on the train folders each night</p>



<p>Syntax: g_spam_phrase bool</p>



<h3 class="wp-block-heading" id="g_spam_probe_enable">g_spam_probe_enable</h3>



<p><strong>Probe suspect urls to find spammers – can cause RBL</strong></p>



<p>This setting searches email messagse from dodgy/unknown sources for urls, then looks at the page those urls refer to to see if those pages in turn point to a listed SURBL. Only domains matching a specific list of rules are scanned so there is almost no risk of this feature clicking on a page that might do something bad.</p>



<p>Syntax: g_spam_probe_enable bool</p>



<h3 class="wp-block-heading" id="g_spam_probe_unknown">g_spam_probe_unknown</h3>



<p><strong>Probe any unknown url (dangerous)</strong></p>



<p>This setting increases the remote chance of probing a web page that might have some action (like a confirmation signup request, unsubscribe etc…), in practice there are a bunch of tests we perform so it would be most unusual for this problem to occur but it’s safer not to use this option.</p>



<p>Syntax: g_spam_probe_unknown bool</p>



<h3 class="wp-block-heading" id="g_spam_probe_more">g_spam_probe_more</h3>



<p><strong>Probe even if email is from a known ip address</strong></p>



<p>Generally not advised</p>



<p>Syntax: g_spam_probe_more bool</p>



<h3 class="wp-block-heading" id="g_spam_probe_friends">g_spam_probe_friends</h3>



<p><strong>Probe even if email is from a friend</strong></p>



<p>Generally not advised</p>



<p>Syntax: g_spam_probe_friends bool</p>



<h3 class="wp-block-heading" id="g_spam_probe_whois">g_spam_probe_whois</h3>



<p><strong>Do whois lookups on web pages found in probe</strong></p>



<p>Some spammers register new domains each day, this probe checks the whois data to find if the new web site is owned by a known spammer</p>



<p>Syntax: g_spam_probe_whois bool</p>



<h3 class="wp-block-heading" id="g_spam_subject">g_spam_subject</h3>



<p><strong>Modify message subject line based on spam rating</strong></p>



<p>If spamdetect score is above this add spam rating Spam:**** to subject.</p>



<p>Syntax: g_spam_subject int</p>



<h3 class="wp-block-heading" id="g_spam_subject_dom">g_spam_subject_dom</h3>



<p><strong>Destination domains to tag subject for</strong></p>



<p>Note that g_spam_subject_gateway and G_SMITE_GATEWAY or G_SMITE_ALL must also be set to true for this to work. If this setting is blank then all gatewayed domains would get tagged. Tagging won’t occur if the message is not sent through a g_gateway rule or redirect rule</p>



<p>Syntax: g_spam_subject_dom string</p>



<h3 class="wp-block-heading" id="g_spam_subject_gateway">g_spam_subject_gateway</h3>



<p><strong>Modify message subject lime based on spam rating for gatewayed messages</strong></p>



<p>If true then spam_subject setting applies to gatewayed messages too</p>



<p>Syntax: g_spam_subject_gateway bool</p>



<h3 class="wp-block-heading" id="g_spam_subject_word">g_spam_subject_word</h3>



<p><strong>Allow arbitrary modification of message subject line</strong></p>



<p>This is a string that is prefixed to the subject of incoming mail caught by g_spam_subject. You can use ||score|| and ||stars|| which will contain the actual spam rating. Good examples might be: “[SPAM]” or “SPAM(||score||), “</p>



<p>Syntax: g_spam_subject_word string</p>



<h3 class="wp-block-heading" id="g_spam_userconfig">g_spam_userconfig</h3>



<p><strong>Enable per user spam settings</strong></p>



<p>Allow users to opt in / out of specific anti spam features. If this is enabled this will add a “Spam” button on the users account self management pages.</p>



<p>The most useful antispam feature is that user’s mail that is suspected spam, can be stored on the server so that these messages do not need to be downloaded to your normail email client over what could well be a low bandwidth connection.</p>



<p>Syntax: g_spam_userconfig bool</p>



<h3 class="wp-block-heading" id="g_spam_user_max">g_spam_user_max</h3>



<p><strong>Max messages for authenticated users</strong></p>



<p>Max messages an authenticated user can send per 30 minutes, eg: 5000</p>



<p>Syntax: g_spam_user_max int</p>



<h3 class="wp-block-heading" id="g_spam_user_warn">g_spam_user_warn</h3>



<p><strong>Alert user when they send this many messages in one day, .8 to alert at 80% of max</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_spam_user_warn string</p>



<h3 class="wp-block-heading" id="g_spam_user_warn_msg">g_spam_user_warn_msg</h3>



<p><strong>Message when user approaches send limit</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_spam_user_warn_msg string</p>



<h3 class="wp-block-heading" id="g_spam_user_badto">g_spam_user_badto</h3>



<p><strong>Max bad recipients from authenticated user per 30 minutes, e.g. 50</strong></p>



<p>Whitelist using G_SPAM_USER_SKIP, limits bad recipients for an authenticated user, if exceeded then sending is paused for 30 minutes.&nbsp; A value of 50 might be reasonable as normal users would never exceed that.&nbsp; A value as low as 10 might be workable.&nbsp; Whitelist accounts using: G_SPAM_USER_SKIP. An email is sent to the manager account when this limit is hit</p>



<p>Syntax: g_spam_user_badto int</p>



<h3 class="wp-block-heading" id="g_spam_from_max">g_spam_from_max</h3>



<p><strong>Max outgoing messages per ipaddress/return path pair, 30 minutes, e.g. 5000</strong></p>



<p>This limit is useful where a local machine is sending on behalf of many users without authentication and you want to limit potential abuse</p>



<p>Syntax: g_spam_from_max int</p>



<h3 class="wp-block-heading" id="g_spam_user_skip">g_spam_user_skip</h3>



<p><strong>Users to skip g_spam_user_max limit for</strong></p>



<p>Set this for special known users who send lots of email</p>



<p>Syntax: g_spam_user_skip string</p>



<h3 class="wp-block-heading" id="g_spam_bounce">g_spam_bounce</h3>



<p><strong>Bounce local delivery based on spamdetect score</strong></p>



<p>If spamdetect score (number of ‘*’s) is above this, bounce message if local delivery. 14 is a reasonable value, never set below 10.</p>



<p>Syntax: g_spam_bounce int</p>



<h3 class="wp-block-heading" id="g_spam_bounce_store">g_spam_bounce_store</h3>



<p><strong>If true store rejected spam in Spam_Rejected folder</strong></p>



<p>This setting enables rejected spam to be saved in the spam_rejected folder, this makes it safe to use the spam rejection level again.</p>



<p>Syntax: g_spam_bounce_store bool</p>



<h3 class="wp-block-heading" id="g_spam_bounce_text">g_spam_bounce_text</h3>



<p><strong>Error text when message is bounced due to g_spam_bounce setting</strong></p>



<p>As per description. Default is: “554 Failure Message looks like spam, sorry not wanted here q=311”, where q is the message queue id.</p>



<p>Syntax: g_spam_bounce_text string</p>



<h3 class="wp-block-heading" id="g_spam_bounce_all">g_spam_bounce_all</h3>



<p><strong>Bounce local and remote delivery based on spamdetect score</strong></p>



<p>If spamdetect score (number of ‘*’s) is above this, bounce message, this applies to all messages regardless of user settings. e.g. 7 or 8 would be reasonable, 3 would be very strict, and less than 3 would certainly bounce real emails. I recommend you don’t set this below 5. This rule is applied as soon as the message is submitted, user spam settings do not override it.</p>



<p>Syntax: g_spam_bounce_all int</p>



<h3 class="wp-block-heading" id="g_spam_bounce_trusted">g_spam_bounce_trusted</h3>



<p><strong>If spamdetect score is above this, bounce message if trusted (spam_allow or authenticated)</strong></p>



<p>Normally trusted users (spam_allow or smtp authenticated users) are never bounced due to spam content, this setting forces those users to also be checked for spam content.</p>



<p>Syntax: g_spam_bounce_trusted int</p>



<h3 class="wp-block-heading" id="g_spam_cmd">g_spam_cmd</h3>



<p><strong>Command line spam checker, use $FILE$ in cmd parameters</strong></p>



<p>This allows you to run a simple external spam filter the return value is added as a header, X-SpamCmd: r=N, Is Spam/Not Spam, use local.rul file to translate this return value to a spam score. e.g. G_SPAM_CMD “snfrv2r3.exe xnk05x5vmipeaof7 $FILE$” if used with http://www.armresearch.com/message-sniffer/. If the program returns 0 then the words Not Spam are added, if the value is non zero then Is Spam is added, this makes filtering rules easier to add to local.rul, see http://netwinsite.com/surgemail/help/spam.htm#external</p>



<p>Syntax: g_spam_cmd string</p>



<h3 class="wp-block-heading" id="g_spam_cmd_if">g_spam_cmd_if</h3>



<p><strong>If internal spam rating is below this number, then run external filter</strong></p>



<p>This allows you to only scan messages with an external filter if the message is not obviously spam</p>



<p>Syntax: g_spam_cmd_if int</p>



<h3 class="wp-block-heading" id="g_spam_cmd_skip">g_spam_cmd_skip</h3>



<p><strong>If internal spam rating is below this number, then skip external filter</strong></p>



<p>This allows whitelisting to work</p>



<p>Syntax: g_spam_cmd_skip int</p>



<h3 class="wp-block-heading" id="g_spam_cmd_reject">g_spam_cmd_reject</h3>



<p><strong>If external filter returns number larger than this reject</strong></p>



<p>Filters based on return code of external spam filter program</p>



<p>Syntax: g_spam_cmd_reject int</p>



<h3 class="wp-block-heading" id="g_spam_vanish">g_spam_vanish</h3>



<p><strong>Vanish local delivery based on spamdetect score</strong></p>



<p>If spamdetect score (number of ‘*’s) is above this, vanish message if local delivery. eg: 12 would be reasonable.</p>



<p>Syntax: g_spam_vanish int</p>



<h3 class="wp-block-heading" id="g_spam_vanish_all">g_spam_vanish_all</h3>



<p><strong>Vanish local and remote delivery based on spamdetect score</strong></p>



<p>If spamdetect score (number of ‘*’s) is above this, drop message, applies to all messages regardless of user settings. e.g. 14. This rule is applied as soon as the message is submitted, user spam settings do not override it.</p>



<p>Syntax: g_spam_vanish_all int</p>



<h3 class="wp-block-heading" id="g_spam_info_hide">g_spam_info_hide</h3>



<p><strong>Remove x-spamdetect-info header line</strong></p>



<p>Removes the x-spamdetect-info header line.</p>



<p>Syntax: g_spam_info_hide bool</p>



<h3 class="wp-block-heading" id="g_spam_info">g_spam_info</h3>



<p><strong>m-info-hide-remove-x-spamdetect-info-header-line" &gt;</strong></p>



<p>Removes the x-spamdetect-info header line.</p>



<p>Syntax: g_spam_info_hide bool</p>



<h3 class="wp-block-heading" id="g_spam_internal">g_spam_internal</h3>



<p><strong>Enable internal Aspam spam processing system</strong></p>



<p>Enable new ‘internal’ spam processing system, note this disables SmiteCRC too!</p>



<p>Syntax: g_spam_internal bool</p>



<h3 class="wp-block-heading" id="g_spam_noupdate">g_spam_noupdate</h3>



<p><strong>Disable aspam updates</strong></p>



<p>Disable fetch of aspam filter rules etc from netwinsite.</p>



<p>Syntax: g_spam_noupdate bool</p>



<h3 class="wp-block-heading" id="g_spam_notrain">g_spam_notrain</h3>



<p><strong>Disable isspam and notspam addresses</strong></p>



<p>Disable isspam and notspam addresses for user training.</p>



<p>Syntax: g_spam_notrain bool</p>



<h3 class="wp-block-heading" id="g_spam_isspam_kind">g_spam_isspam_kind</h3>



<p><strong>Allow isspam from recent pop, gateway to etc</strong></p>



<p>Allow ASPAM training messages to (isspam) from any trusted source (e.g. any source that would be allowed to relay/send outgoing email). This setting is recommended.</p>



<p>Syntax: g_spam_isspam_kind bool</p>



<h3 class="wp-block-heading" id="g_spam_isspam_ignore">g_spam_isspam_ignore</h3>



<p><strong>Don’t block messages from ip addresses recorded as a spam source</strong></p>



<p>This bounces all email from an address recorded as a spam source until it is recorded as a ‘notspam’ source, the blocking message allows the sender to bypass the block.</p>



<p>Syntax: g_spam_isspam_ignore bool</p>



<h3 class="wp-block-heading" id="g_spam_aspam">g_spam_aspam</h3>



<p><strong>Aspam rating</strong></p>



<p>Scale for Aspam default is 1.0. Valid range is zero to two.</p>



<p>The aspam matching based on it’s database of known spam and non spam produces a score in the range -5 –&gt; 5. Tthe g_spam_aspam setting lets you ‘scale’ this score to increase/decrease the importance of the aspam rating. The result is then applied (added to) the spamdetect header.</p>



<p>Syntax: g_spam_aspam string</p>



<h3 class="wp-block-heading" id="g_spam_poly">g_spam_poly</h3>



<p><strong>Scale for poly word matching</strong></p>



<p>Scale for poly word matching, default is 0.1, Valid range is zero to two, Use 1.0 to enable.</p>



<p>Syntax: g_spam_poly string</p>



<h3 class="wp-block-heading" id="g_spam_poly_disable">g_spam_poly_disable</h3>



<p><strong>Disable poly code.</strong></p>



<p>Disables the poly statistical scoring feature which is part of Aspam. Poly tries to analyze the frequency of word combinations in spam and not spam to identify if a message is likely to be spam or not. We don’t consider the poly system to be very useful, it has two faults, it’s behaviour is not ‘understandable’ and it is ‘content based’, SPF is a much superior system!</p>



<p>Syntax: g_spam_poly_disable bool</p>



<h3 class="wp-block-heading" id="g_spam_private">g_spam_private</h3>



<p><strong>Enable private email addresses for users to avoid spam</strong></p>



<p>Note: The user will define these settings, after turning on this global setting the user can use the Web Self administration interface, press the ‘Spam’ button and the private email address is defined on that page.</p>



<p>This setting adds the ability for each user to create a private email address to bypass SPF/ Spam filters. The user would then typically increase the spam settings for their non private account to ‘friends mode’ and enable SPF. So only known friends will be able to contact them via the old address.</p>



<p>This allows the user to live ‘spam free’ without the risk of blocking email from real people.</p>



<p>The user must be careful with their new private address, it should only be used with humans, when entering an address in a web form or mailing list a special variant should be used e.g. user–from-WEBDOMAINNAME@users.domain</p>



<p>The user defines their private address, in the form user–PRIVATE@domain.com, e.g. if the users public address is joe@cool.com, and the user defines a private extension of “juggle” then the private address would be:</p>



<p>joe–juggle@cool.com</p>



<p>Email addressed to joe–juggle@cool.com is delivered without SPF or SPAM filtering / tagging.</p>



<p>In addition the user can enable ‘from’ matching which must look like this: username–KEYWORD-STRING@cool.com, the user specifies a keyword e.g. “match”. Then anything addressed to the user in this form:</p>



<p>joe–match-STRING@cool.com</p>



<p>Will only be delivered if ‘STRING’ is found in the ‘from’ envelope address, otherwise it will bounce. So when entering an email address in a web page called “toys.com” the user would enter:</p>



<p>joe–match-toys@cool.com</p>



<p>Any — extension that is not recognized will return a bounce suggesting they remove the extension and try again.</p>



<p>Syntax: g_spam_private bool</p>



<h3 class="wp-block-heading" id="g_spam_alias_any">g_spam_alias_any</h3>



<p><strong>User aliase string e.g. “++” if defined then strip suffix from emails – not advised!</strong></p>



<p>This allows each user an infinite number of aliases of the form user+extension@domain.name, this can cause problems so only enable with caution. Usually set to “++” but can be set to a single plus, but this will break any email address that contains a plus so not normally recommended. If used avoid defining it as a single character at least!</p>



<p>Syntax: g_spam_alias_any string</p>



<h3 class="wp-block-heading" id="g_spam_url">g_spam_url</h3>



<p><strong>Scale for url word matching</strong></p>



<p>Scale for URL word matching, default is 0.3, Valid range is zero to two (recommend 1.0)</p>



<p>Syntax: g_spam_url string</p>



<h3 class="wp-block-heading" id="g_spam_catcher">g_spam_catcher</h3>



<p><strong>Spam catcher addresses</strong></p>



<p>Addresses on web pages that shouldn’t get any email (robot bait), only for use with Aspam.<br>Any email going to the specified address will be sent to the isspam address for processing and the message will also be dropped. If the message has multiple rctp’s and some are valid users, but one matches the catcher address, it is not delivered to anyone. If you need to enter a lot of spam catcher addresses then the best way is to just setup a single spam catcher address and then use&nbsp;<a href="#g_redirect">g_redirect</a>&nbsp;to redirect other addresses to the spam catcher address.</p>



<p>eg<br>g_spam_catcher “johnsmith@mydomain.com”</p>



<p>Syntax: g_spam_catcher string</p>



<h3 class="wp-block-heading" id="g_spam_char">g_spam_char</h3>



<p><strong>Character to use instead of ‘*’ for smitespam headers (best left alone if possible)</strong></p>



<p>Changing this will cause no end of problems, so only do this when initially installing SurgeMail</p>



<p>Syntax: g_spam_char string</p>



<h3 class="wp-block-heading" id="g_spam_notspam">g_spam_notspam</h3>



<p><strong>Spam collection address</strong></p>



<p>Address that non authenticated users can send non spam to.</p>



<p>Example: g_spam_notspam “notspam@domain.com”</p>



<p>Syntax: g_spam_notspam string</p>



<h3 class="wp-block-heading" id="g_spam_hold_keep">g_spam_hold_keep</h3>



<p><strong>Spam hold timeout</strong></p>



<p>How many days to store users spam hold messages before deleting them.<br>Default is 14 days.<br>eg. g_spam_hold “14”</p>



<p>Syntax: g_spam_hold_keep int</p>



<h3 class="wp-block-heading" id="g_spam_hold_hide">g_spam_hold_hide</h3>



<p><strong>Hide spam hold settings for end users and other held2pend user.cgi tweaks</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_spam_hold_hide bool</p>



<h3 class="wp-block-heading" id="g_spam_header_trust_ip">g_spam_header_trust_ip</h3>



<p><strong>List of IP addresses from which to trust/accept existing X-SpamDetect headers in emails</strong></p>



<p>Use this setting to specify the filter machines which perform spam scanning for this machine. Use this on the filter machine, to specify itself so that mailing list messages do not get scanning/tagged twice. Ensure your users are sending messages via the filter machine.</p>



<p>Syntax: g_spam_header_trust_ip string</p>



<h3 class="wp-block-heading" id="g_spam_share">g_spam_share</h3>



<p><strong>Use and share some spam/aspam information with central server (netwin) experimental</strong></p>



<p>This setting enables some features which let surgemail share information about spam and non spamming ip addresses with a central netwin server.</p>



<p>Syntax: g_spam_share bool</p>



<h3 class="wp-block-heading" id="g_spam_status_hour">g_spam_status_hour</h3>



<p><strong>Process all spam status messages at this time (disk io intensive)</strong></p>



<p>Normally the spam status emails are sent in response to incoming messages at undefined times, this allows all spam status emails to be sent at a predefined time.</p>



<p>Syntax: g_spam_status_hour int</p>



<h3 class="wp-block-heading" id="g_spam_status_monthly">g_spam_status_monthly</h3>



<p><strong>Send monthly spam status even if no messages pending</strong></p>



<p>This is good to make sure all users know about their spam settings and how to change them.</p>



<p>Syntax: g_spam_status_monthly bool</p>



<h3 class="wp-block-heading" id="g_spam_phishing">g_spam_phishing</h3>



<p><strong>Download list of known phishing addresses and block outgoing email to them</strong></p>



<p>Use this to stop your users resonding via email to a known phishing address. See http://code.google.com/p/anti-phishing-email-reply/</p>



<p>Syntax: g_spam_phishing bool</p>



<h3 class="wp-block-heading" id="g_spam_phishing_ok">g_spam_phishing_ok</h3>



<p><strong>Allow to these addresses even if phishing database blocks them</strong></p>



<p>Use this to stop your users resonding via email to a known phishing address. See http://code.google.com/p/anti-phishing-email-reply/</p>



<p>Syntax: g_spam_phishing_ok string</p>



<h3 class="wp-block-heading" id="g_spam_nobounce">g_spam_nobounce</h3>



<p><strong>Remove old user held/vanish but after 5.2 will allow bounce</strong></p>



<p>This removes the old spam settings that should never be used. In version 5 this disabled hold/vanish/bounce, now it only disables hold/vanish but allows ‘bounce’, the bounce behaviour has been made considerably safer by tuning the spam filter and changing the actual bounce to allow the sender to bypass via captcha</p>



<p>Syntax: g_spam_nobounce bool</p>



<h3 class="wp-block-heading" id="g_spam_black_auto">g_spam_black_auto</h3>



<p><strong>Auto blacklist for user when isspam pressed</strong></p>



<p>Changes blacklist handling to only place in spam folder (not auto reject) and to automatically blacklist when isspam button pressed</p>



<p>Syntax: g_spam_black_auto bool</p>



<h3 class="wp-block-heading" id="g_spam_black_tospam">g_spam_black_tospam</h3>



<p><strong>Put blacklist matches in spam folder</strong></p>



<p>Place in spam rather than bouncing hard.</p>



<p>Syntax: g_spam_black_tospam bool</p>



<h3 class="wp-block-heading" id="g_spam_allbad">g_spam_allbad</h3>



<p><strong>Auto blacklist from/ip/to combinations</strong></p>



<p>Makes blacklisting automatic</p>



<p>Syntax: g_spam_allbad bool</p>



<h3 class="wp-block-heading" id="g_spamdetect_some">g_spamdetect_some</h3>



<p><strong>Only show spamdetect header for bad scores</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_spamdetect_some bool</p>



<h3 class="wp-block-heading" id="g_spawn_log">g_spawn_log</h3>



<p><strong>If true the spawns are logged to lib_spawn.log</strong></p>



<p>Useful for finding obscure problems with spawned modules of various kinds, webmail, nwauth, virus checkers etc.</p>



<p>Syntax: g_spawn_log bool</p>



<h3 class="wp-block-heading" id="g_spf_mode">g_spf_mode</h3>



<p><strong>Sender Permitted From</strong></p>



<p>See&nbsp;<a href="https://netwinsite.com/spf.htm">https://netwinsite.com/spf.htm</a>&nbsp;for details.</p>



<p>Syntax: g_spf_mode string</p>



<h3 class="wp-block-heading" id="g_spf_nocache">g_spf_nocache</h3>



<p><strong>Disable SPF cache</strong></p>



<p>There is a small cache used for SPF results, This setting disables it.</p>



<p>Syntax: g_spf_nocache bool</p>



<h3 class="wp-block-heading" id="g_spf_rewrite">g_spf_rewrite</h3>



<p><strong>Rewrite ‘from’ envelope in redirected mail (SRS)</strong></p>



<p>When messages are redircted/forwarded to another server from you server, the ‘from’ address of the existing message envelope will no longer obey SPF rules as it will be coming from your server rather then the original server. So to fix this enable this rewrite setting and then the from envelope is rewritten to point to your system using a short life token. The ‘from’ header of the message is not modified.</p>



<p>Syntax: g_spf_rewrite bool</p>



<h3 class="wp-block-heading" id="g_spf_rewrite_relay">g_spf_rewrite_relay</h3>



<p><strong>Rewrite even if from ip is a host to relay for</strong></p>



<p>In some cases you will want SRS rewriting for relay hosts, In which case you should turn this on.</p>



<p>Syntax: g_spf_rewrite_relay bool</p>



<h3 class="wp-block-heading" id="g_spf_rewrite_gateway">g_spf_rewrite_gateway</h3>



<p><strong>Rewrite even if gateway rule applies</strong></p>



<p>In some cases you will want SRS rewriting for relay hosts, In which case you should turn this on.</p>



<p>Syntax: g_spf_rewrite_gateway bool</p>



<h3 class="wp-block-heading" id="g_spf_norewrite">g_spf_norewrite</h3>



<p><strong>Exceptions to rewrite rule, e.g. *@my.domain,bob@this.domain</strong></p>



<p>Where you allow users to send through your server you may want to stop rewriting for their domains so that their from address is not munged. Local domains are automatically excempt from ‘rewriting’. Specify *@domain.name not just domain.name</p>



<p>Syntax: g_spf_norewrite string</p>



<h3 class="wp-block-heading" id="g_spf_dns_timeout">g_spf_dns_timeout</h3>



<p><strong>Seconds to wait for dns lookups for spf, best not to change</strong></p>



<p>Generally a ten or twenty second timeout is reasonable. Adjusting the default is probably not necessary.</p>



<p>Syntax: g_spf_dns_timeout int</p>



<h3 class="wp-block-heading" id="g_spf_timeout">g_spf_timeout</h3>



<p><strong>Seconds to wait for all spf lookups to finish, default 48 seconds</strong></p>



<p>Best not to change</p>



<p>Syntax: g_spf_timeout int</p>



<h3 class="wp-block-heading" id="g_spf_domain">g_spf_domain</h3>



<p><strong>Domain for SPF rewrite and allow messages (defaults to first domain on server)</strong></p>



<p>When SurgeMail relays/forwards a message the ‘from’ address is rewritten (g_spf_rewrite should be true). The new address is ‘from’ your domain and this setting tells surgemail which local domain to use for these from addresses.</p>



<p>Syntax: g_spf_domain string</p>



<h3 class="wp-block-heading" id="g_spf_user_domain">g_spf_user_domain</h3>



<p><strong>Make allow bounces use destination user domain name</strong></p>



<p>This can be useful if you need to ensure emails bounce with an address that is similar to the destination</p>



<p>Syntax: g_spf_user_domain bool</p>



<h3 class="wp-block-heading" id="g_spf_very_strict">g_spf_very_strict</h3>



<p><strong>(strict only) Only give ‘allow’ option for default spf rule failures not real ones</strong></p>



<p>In this mode real SPF failures are hard failures, but if there is no SPF record for a domain then the friendly ‘allow’ system is used to let the user send mail with only mild difficulty.</p>



<p>Syntax: g_spf_very_strict bool</p>



<h3 class="wp-block-heading" id="g_spf_debug_log">g_spf_debug_log</h3>



<p><strong>Enable spf.log file</strong></p>



<p>By default this log is not generated as it’s not usually needed.</p>



<p>Syntax: g_spf_debug_log bool</p>



<h3 class="wp-block-heading" id="g_spf_default">g_spf_default</h3>



<p><strong>(strict only) Default spf record if none found default ‘mx/16 a ptr:%{d2} -all’</strong></p>



<p>The example shown isn’t entirely true, we adjust the ‘d2’ depending on the domain, so it’s usually unwise to change this.</p>



<p>Syntax: g_spf_default string</p>



<h3 class="wp-block-heading" id="g_spf_default_noblock">g_spf_default_noblock</h3>



<p><strong>(strict only) Only stamp headers if default spf record fails when no real spf header</strong></p>



<p>This setting makes blocking occur only for REAL spf records, not for the default one applied to domains that have no SPF record defined.</p>



<p>Syntax: g_spf_default_noblock bool</p>



<h3 class="wp-block-heading" id="g_spf_skip">g_spf_skip</h3>



<p><strong>Skip spf checks for these ip addresses, e.g. other mx hosts</strong></p>



<p>List the ip addresses of your other MX servers so SPF checks wont fail when a message comes in via an mx host instead of directly. The SPF checking must therefore be done on all the MX servers.</p>



<p>Syntax: g_spf_skip string</p>



<h3 class="wp-block-heading" id="g_spf_skip_from">g_spf_skip_from</h3>



<p><strong>Skip based on from, e.g. noreply@*paypal.com,…, Also skips RBL</strong></p>



<p>Good for skipping SPF checking if a domain is in some way incompatible with SPF checking</p>



<p>Syntax: g_spf_skip_from string</p>



<h3 class="wp-block-heading" id="g_spf_skip_to">g_spf_skip_to</h3>



<p><strong>Skips SPF checks based on rcpt address and RBL checks.</strong></p>



<p>Syntax: g_spf_skip_to “user@domain.com”</p>



<p>This setting can be used to skip spf checks based on the rcpt address, if used with&nbsp;<a href="https://surgemail.com/knowledge-base/global-settings-misc-p-z/#g_orbs_late">g_orbs_late</a>&nbsp;“true” then it can also be used to skip rbl checks if the rcpt matches this setting.</p>



<p>Syntax: g_spf_skip_to string</p>



<h3 class="wp-block-heading" id="g_spf_rev_skip">g_spf_rev_skip</h3>



<p><strong>Skip SPF checks if reverse ip name matches in this list, e.g. *.yahoo.com</strong></p>



<p>Where you identify a domain that does not support SPF and is often used in a manner which breaks SPF default rules this setting can safely allow the problem domain. This setting is probably not needed now most large mail systems are using SPF.</p>



<p>Syntax: g_spf_rev_skip string</p>



<h3 class="wp-block-heading" id="g_spf_share">g_spf_share</h3>



<p><strong>List of hosts to share allow ips with. Must all have same srs.secret file</strong></p>



<p>List your other incoming mail servers (which must be running surgemail). This lets SurgeMail share the list of known IP addresses which have sent ‘allow’ emails. You must copy your srs.secret file across all of the servers in question so they can verify each other correctly.</p>



<p>Syntax: g_spf_share string</p>



<h3 class="wp-block-heading" id="g_spf_header">g_spf_header</h3>



<p><strong>Use g_verify_mx_skip and apply to resulting ip</strong></p>



<p>If the sending host matches g_verify_mx_skip, then spf tests are performed on the first received header not listed in that setting. Only stamping is possible though since this indicates a front end gateway and a reject would cause a ‘bounce’ which would not be safe</p>



<p>Syntax: g_spf_header bool</p>



<h3 class="wp-block-heading" id="g_spf_baddns_skip">g_spf_baddns_skip</h3>



<p><strong>If spf dns failure then allow message through (instead of giving retry error)</strong></p>



<p>This setting is not normally needed as lookups generate retry failures so the sending server tries again and the dns failure (which is usually temporary) won’t occur the second time. Normally on a DNS failure SPF should give a ‘retry’ message, this is because spammers often have faulty DNS servers so that SPF checks always fail for their domain, so letting the message through will let some spam into your system. But in some situations the normal behavior might loose you real email so then using this setting at least until your dns problems are resolved might be wise.</p>



<p>Syntax: g_spf_baddns_skip bool</p>



<h3 class="wp-block-heading" id="g_spf_nogrey">g_spf_nogrey</h3>



<p><strong>Skip SPF grey listing for these domains (require allow response)</strong></p>



<p>This toughens spf for the domains in question, requiring that they really pass an ‘allow’ test rather than simply a grey listing test. Good for commonly forged domains which do normally obey spf.</p>



<p>Syntax: g_spf_nogrey string</p>



<h3 class="wp-block-heading" id="g_spf_noallow">g_spf_noallow</h3>



<p><strong>ignore friends</strong></p>



<p>This toughens spf for critical domains (banks etc) where you don’t want any forged messages leaking through. This setting over-rides the users spf/friends settings for these domains (so should be used with some caution)</p>



<p>Syntax: g_spf_noallow string</p>



<h3 class="wp-block-heading" id="g_spf_nofriend">g_spf_nofriend</h3>



<p><strong>Ignore friends for spf</strong></p>



<p>This toughens spf so friends matches don’t bypass it</p>



<p>Syntax: g_spf_nofriend bool</p>



<h3 class="wp-block-heading" id="g_spf_enforce">g_spf_enforce</h3>



<p><strong>List of wildcard/domains to enforce spf for, e.g. paypal.com,*bank*</strong></p>



<p>This enforces spf for domain that must be trusted.</p>



<p>Syntax: g_spf_enforce string</p>



<h3 class="wp-block-heading" id="g_spf_enforce_real">g_spf_enforce_real</h3>



<p><strong>Enforce spf for domains with strong spf entries</strong></p>



<p>Enforces spf if the domains spf record ends with -all</p>



<p>Syntax: g_spf_enforce_real bool</p>



<h3 class="wp-block-heading" id="g_spf_enforce_auto">g_spf_enforce_auto</h3>



<p><strong>Enforce spf for commonly forged domains paypal.com,*bank*</strong></p>



<p>If enabled this will enforce spf for some common domains that get forged.</p>



<p>Syntax: g_spf_enforce_auto bool</p>



<h3 class="wp-block-heading" id="g_spf_required">g_spf_required</h3>



<p><strong>Require an spf entry for these domains</strong></p>



<p>Used to make select domains add spf to talk to you</p>



<p>Syntax: g_spf_required string</p>



<h3 class="wp-block-heading" id="g_spf_enforce_local">g_spf_enforce_local</h3>



<p><strong>If spf fails and it’s a local domain then skip grey listing and bounce</strong></p>



<p>This settings stops spammers who fake your own email domains, but it may upset users who are not authenticating or are using their own mail servers, so you will have to expect a few minor issues like that when you turn this on. This setting over-rides the ‘users’ spf and friends settings for local domains. (was miss documented as give allow message)</p>



<p>Syntax: g_spf_enforce_local bool</p>



<h3 class="wp-block-heading" id="g_spflog_enable">g_spflog_enable</h3>



<p><strong>Enable this if this server is a frontend for a SurgeMail server users log into.</strong></p>



<p>Enable this if this server is a frontend for a SurgeMail server users log into.</p>



<p>Syntax: g_spflog_enable bool</p>



<h3 class="wp-block-heading" id="g_spflog_domains">g_spflog_domains</h3>



<p><strong>Specify which domains should get spflog entries sent to them.</strong></p>



<p>If some of your backend servers are not surgemail then this setting will be needed to turn off the spflog messages to the non surgemail servers</p>



<p>Syntax: g_spflog_domains string</p>



<h3 class="wp-block-heading" id="g_spf_byemail">g_spf_byemail</h3>



<p><strong>Perform allow bounce confirmation via email.</strong></p>



<p>This gives an email to the sender in the allow bounce message instead of aa url.</p>



<p>Syntax: g_spf_byemail bool</p>



<h3 class="wp-block-heading" id="g_spf_web_url">g_spf_web_url</h3>



<p><strong>Specify full url for spf byweb commands http://domain.name:port</strong></p>



<p>Normally the default will work.</p>



<p>Syntax: g_spf_web_url string</p>



<h3 class="wp-block-heading" id="g_spool_path">g_spool_path</h3>



<p><strong>Allows SurgeMail to scan a directory for messages to send.</strong></p>



<p>Syntax: g_spool_path “directory of spool”</p>



<p>SurgeMail will scan this directory every few seconds and check for any messages in this directory if found SurgeMail will then send them the messages (must end in the extension .msg). The format of the messages is as follows (without the quotes).</p>



<p>filename: test.msg</p>



<p>“<br>To: you@domain.com<br>From: blah@domain.com<br>Subject: blah blah</p>



<p>This is a test<br>“</p>



<p>Syntax: g_spool_path string</p>



<h3 class="wp-block-heading" id="g_ssl_allow">g_ssl_allow</h3>



<p><strong>IP Wild card of connections to allow to use SSL</strong></p>



<p>This setting controls which connecting IP numbers are permitted to use SSL on POP and IMAP. They will see TLS in the protocol extension command (ETRN for SMTPor CAPA for POP). Typically, to enable SSL you set this to “*” after getting a certificate. If you don’t have a valid certificate then turning this on can cause problems as mail clients will try to use SSL and fail.&nbsp;</p>



<p>Syntax: g_ssl_allow string</p>



<h3 class="wp-block-heading" id="g_ssl_allow_imap">g_ssl_allow_imap</h3>



<p><strong>IP Wild card list to allow SSL encryption from for imap</strong></p>



<p>This setting controls which connecting IP numbers are permitted to use SSL on IMAP.</p>



<p>Syntax: g_ssl_allow_imap string</p>



<h3 class="wp-block-heading" id="g_ssl_allow_fix">g_ssl_allow_fix</h3>



<p><strong>Disable incoming ssl on ssl failure from an ip</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_ssl_allow_fix bool</p>



<h3 class="wp-block-heading" id="g_ssl_disable">g_ssl_disable</h3>



<p><strong>isable-renegotiation-disable-ssl-renegotiation" &gt;</strong></p>



<p>GEnerally this shouldn’t be used unless you have to keep some paranoid security scan happy</p>



<p>Syntax: g_ssl_disable_renegotiation bool</p>



<h3 class="wp-block-heading" id="g_ssl_disable_web">g_ssl_disable_web</h3>



<p><strong>Disable protocols for web only</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_ssl_disable_web string</p>



<h3 class="wp-block-heading" id="g_ssl_disable_port25">g_ssl_disable_port25</h3>



<p><strong>Prevent ssl on port 25</strong></p>



<p>May help virus fire walls to detect viruses, that’s the theory anyway…</p>



<p>Syntax: g_ssl_disable_port25 bool</p>



<h3 class="wp-block-heading" id="g_ssl_disable_des">g_ssl_disable_des</h3>



<p><strong>Disable DES ciphers, breaks outlook on XP</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_ssl_disable_des bool</p>



<h3 class="wp-block-heading" id="g_ssl_test_fail">g_ssl_test_fail</h3>



<p><strong>Break ssl to test auto downgrade</strong></p>



<p>Break ssl for outgoing sends</p>



<p>Syntax: g_ssl_test_fail bool</p>



<h3 class="wp-block-heading" id="g_ssl_require">g_ssl_require</h3>



<p><strong>equire-smtp-if-ip-matches-then-require-ssl-for-incoming-smtp-message" &gt;</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_ssl_require_smtp string</p>



<h3 class="wp-block-heading" id="g_ssl_require_in">g_ssl_require_in</h3>



<p><strong>Local domains that must only receive SSL messages</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_ssl_require_in string</p>



<h3 class="wp-block-heading" id="g_ssl_require_smtp">g_ssl_require_smtp</h3>



<p><strong>If IP matches then require SSL for incoming SMTP message</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_ssl_require_smtp string</p>



<h3 class="wp-block-heading" id="g_ssl_require_imap">g_ssl_require_imap</h3>



<p><strong>IP Wild card of connections to require to use SSL for IMAP</strong></p>



<p>This forces all matching IP addresses to use SSL for IMAP connections.</p>



<p>Syntax: g_ssl_require_imap string</p>



<h3 class="wp-block-heading" id="g_ssl_require_login">g_ssl_require_login</h3>



<p><strong>IP wildcard of connections fur users needing to use SSL</strong></p>



<p>This setting forces all matching IP addresses to use SSL for any action that requires a user login. eg: POP, IMAP and SMTP authentication but not plain SMTP. So this is ideal if you want all users to use SSL but still want email to come in from non SSL SMTP servers.</p>



<p>Syntax: g_ssl_require_login string</p>



<h3 class="wp-block-heading" id="g_ssl_require_out">g_ssl_require_out</h3>



<p><strong>Other machines we only send to using SSL</strong></p>



<p>This forces all matching IP addresses to use SSL for SMTP outgoing connections. Typically you would use this for outgoing connections to increase security.&nbsp;</p>



<p>Syntax: g_ssl_require_out string</p>



<h3 class="wp-block-heading" id="g_ssl_require_web">g_ssl_require_web</h3>



<p><strong>Require https for most web features (excluding blogs file sharing and surgeplus)</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_ssl_require_web bool</p>



<h3 class="wp-block-heading" id="g_ssl_retry_seconds">g_ssl_retry_seconds</h3>



<p><strong>Second to try and establish ssl connection, default is 5</strong></p>



<p>Best not to change generally</p>



<p>Syntax: g_ssl_retry_seconds int</p>



<h3 class="wp-block-heading" id="g_ssl_try_out">g_ssl_try_out</h3>



<p><strong>Try and start ssl mode to these hosts</strong></p>



<p>If the hosts match then SurgeMail tries to start SSL security on the SMTP session. Note that this may cause failures if the link is dropped by the receiving server.</p>



<p>Syntax: g_ssl_try_out string</p>



<h3 class="wp-block-heading" id="g_ssl_try_not">g_ssl_try_not</h3>



<p><strong>Skip ssl for these hosts</strong></p>



<p>If the hosts match then SurgeMail Does not try ssl even if g_ssl_try_out matches.</p>



<p>Syntax: g_ssl_try_not string</p>



<h3 class="wp-block-heading" id="g_ssl_try_from">g_ssl_try_from</h3>



<p><strong>Try and start ssl mode if from this user, e.g. *@xyz.com</strong></p>



<p>Must also match the g_ssl_try_out rule, this lets you only do ssl when the email is ‘from’ certain domains/users</p>



<p>Syntax: g_ssl_try_from string</p>



<h3 class="wp-block-heading" id="g_ssl_per_domain">g_ssl_per_domain</h3>



<p><strong>Create/use an SSL certificate for each domain</strong></p>



<p>SurgeMail can be set to use a single SSL certificate for the server or individual certificates on a per domain basis.</p>



<p>SurgeMail will create private key / certificate pairs if required on startup. Alternatively these can be created using the ‘SSL Config’ link on the global settings page. These can be replaced with your own trusted signed certificates using the web admin interface or by placing the appropriate private key and certificate pem files in the following location: &lt;surgemail&gt;/ssl for a single certificate for the whole server and under &lt;surgemail&gt;/ssl/&lt;vdomain&gt; for per vdomain certificates.</p>



<p>Some mail clients and web browsers will complain if the certificate domain does not match the domain they are connecting to.</p>



<p>Changing g_ssl_per_domain will require surgemail to be restarted to take affect. Changes to certificates using the web admin interface now take affect immediately.</p>



<p>Syntax: g_ssl_per_domain bool</p>



<h3 class="wp-block-heading" id="g_ssl_ciphers">g_ssl_ciphers</h3>



<p><strong>List permitted ciphers</strong></p>



<p>This can be used to enhance security, not recommended but is useful if you are trying to pass a security audit of some kind. A value of MEDIUM:HIGH is probably what you want to set it to. It is case sensitive. If your list exceeds 800 bytes use g_ssl_ciphers_add for the second half</p>



<p>Syntax: g_ssl_ciphers string</p>



<h3 class="wp-block-heading" id="g_ssl_ciphers_web">g_ssl_ciphers_web</h3>



<p><strong>List permitted ciphers for web</strong></p>



<p>This list is for web connections only, restart surgemail after changing</p>



<p>Syntax: g_ssl_ciphers_web string</p>



<h3 class="wp-block-heading" id="g_ssl_ciphers_add">g_ssl_ciphers_add</h3>



<p><strong>More permitted ciphers (added to g_ssl_ciphers)</strong></p>



<p>This can be used to enhance security, not recommended but is useful if you are trying to pass a security audit of some kind. A value of MEDIUM:HIGH is probably what you want to set it to. It is case sensitive.</p>



<p>Syntax: g_ssl_ciphers_add string</p>



<h3 class="wp-block-heading" id="g_ssl_disable_tlsv1">g_ssl_disable_tlsv1</h3>



<p><strong>Obsolte, Disable tls 1.0, not recommended</strong></p>



<p>Use g_ssl_disable and g_ssl_disable_web instead</p>



<p>Syntax: g_ssl_disable_tlsv1 bool</p>



<h3 class="wp-block-heading" id="g_ssl_disable_tlsv1_1">g_ssl_disable_tlsv1_1</h3>



<p><strong>Obsolte, Disable tls 1.1 support, not recommended</strong></p>



<p>Use g_ssl_disable and g_ssl_disable_web instead</p>



<p>Syntax: g_ssl_disable_tlsv1_1 bool</p>



<h3 class="wp-block-heading" id="g_ssl_disable_tlsv1_2">g_ssl_disable_tlsv1_2</h3>



<p><strong>Obsolte, Disable tls 1.2 support, not recommended</strong></p>



<p>Use g_ssl_disable and g_ssl_disable_web instead</p>



<p>Syntax: g_ssl_disable_tlsv1_2 bool</p>



<h3 class="wp-block-heading" id="g_ssl_disable_sslv2">g_ssl_disable_sslv2</h3>



<p><strong>Obsolte, Disable ssl 2.0 support for enhanced security</strong></p>



<p>Disables one of the older ssl protocols which slightly increases security and decreases compatibility with older clients. Use g_ssl_disable and g_ssl_disable_web instead</p>



<p>Syntax: g_ssl_disable_sslv2 bool</p>



<h3 class="wp-block-heading" id="g_ssl_disable_sslv3">g_ssl_disable_sslv3</h3>



<p><strong>Obsolte, Disable ssl 3.0 support for enhanced security</strong></p>



<p>Disables one of the ssl protocols which slightly increases security. Use g_ssl_disable and g_ssl_disable_web instead</p>



<p>Syntax: g_ssl_disable_sslv3 bool</p>



<h3 class="wp-block-heading" id="g_ssl_sha1_sign">g_ssl_sha1_sign</h3>



<p><strong>Obsolete, sha256 is now always used</strong></p>



<p>This will probably be made the default in the near future</p>



<p>Syntax: g_ssl_sha1_sign bool</p>



<h3 class="wp-block-heading" id="g_ssl_disable_renegotiation">g_ssl_disable_renegotiation</h3>



<p><strong>Disable SSL renegotiation.</strong></p>



<p>GEnerally this shouldn’t be used unless you have to keep some paranoid security scan happy</p>



<p>Syntax: g_ssl_disable_renegotiation bool</p>



<h3 class="wp-block-heading" id="g_ssl_honor">g_ssl_honor</h3>



<p><strong>Honor server cipher order</strong></p>



<p>Maybe useful to force certain types of security/encryption</p>



<p>Syntax: g_ssl_honor bool</p>



<h3 class="wp-block-heading" id="g_ssl_perfect">g_ssl_perfect</h3>



<p><strong>Apply good SSL settings, best to remove g_ssl_ciphers setting too</strong></p>



<p>Just an easy way of setting the ciphers etc for perfect forward secrecy</p>



<p>Syntax: g_ssl_perfect bool</p>



<h3 class="wp-block-heading" id="g_ssl_fips">g_ssl_fips</h3>



<p><strong>Enable FIPS mode crash if not available (DO NOT USE)</strong></p>



<p>For future use</p>



<p>Syntax: g_ssl_fips bool</p>



<h3 class="wp-block-heading" id="g_ssl_dmalloc">g_ssl_dmalloc</h3>



<p><strong>Enable dmalloc tracking in ssl</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_ssl_dmalloc bool</p>



<h3 class="wp-block-heading" id="g_ssl_warn">g_ssl_warn</h3>



<p><strong>Send users weekly reminder if they keep using non SSL logins</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_ssl_warn bool</p>



<h3 class="wp-block-heading" id="g_ssl_warn_ignore">g_ssl_warn_ignore</h3>



<p><strong>Don’t give warnings if user is from this trusted host</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_ssl_warn_ignore string</p>



<h3 class="wp-block-heading" id="g_ssl_warn_text">g_ssl_warn_text</h3>



<p><strong>Last line of email warning sent to user if SSL not used</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_ssl_warn_text string</p>



<h3 class="wp-block-heading" id="g_sstat_disable">g_sstat_disable</h3>



<p><strong>Disable netwin statistics gathering.</strong></p>



<p>We use this to keep track of which features customers use/like</p>



<p>Syntax: g_sstat_disable bool</p>



<h3 class="wp-block-heading" id="g_stack">g_stack</h3>



<p><strong>For testing only, NEVER SET THIS</strong></p>



<p>Never set this, it can make the server unstable</p>



<p>Syntax: g_stack int</p>



<h3 class="wp-block-heading" id="g_stack_imap">g_stack_imap</h3>



<p><strong>For testing only, NEVER SET THIS</strong></p>



<p>Never set this, it can make the server unstable</p>



<p>Syntax: g_stack_imap int</p>



<h3 class="wp-block-heading" id="g_startup_delay">g_startup_delay</h3>



<p><strong>Startup delay</strong></p>



<p>Seconds to wait before accepting inbound connections when starting SurgeMail .</p>



<p>Syntax: g_startup_delay int</p>



<h3 class="wp-block-heading" id="g_store_dropped">g_store_dropped</h3>



<p><strong>Store upto 5000 bad bounces in the dropped directory</strong></p>



<p>This is useful to check if vanish_bad_bounces is working correctly</p>



<p>Syntax: g_store_dropped bool</p>



<h3 class="wp-block-heading" id="g_header_strip">g_header_strip</h3>



<p><strong>Strip listed headers from incoming messages</strong></p>



<p>Useful for stripping headers that you don’t trust or don’t want for some reason</p>



<p>Syntax: g_header_strip string</p>



<h3 class="wp-block-heading" id="g_surgewall_split">g_surgewall_split</h3>



<p><strong>Split up surgewall messages, one per recipient</strong></p>



<p>Split up incoming messages so subject tagging should work</p>



<p>Syntax: g_surgewall_split bool</p>



<h3 class="wp-block-heading" id="g_surgewall_redirect">g_surgewall_redirect</h3>



<p><strong>Allow redirect/responder for surgewall</strong></p>



<p>Allows redirect/responder settings to work for surgewall</p>



<p>Syntax: g_surgewall_redirect bool</p>



<h3 class="wp-block-heading" id="g_surgewall_ignore_error">g_surgewall_ignore_error</h3>



<p><strong>Deliver even if some rule sais bounce</strong></p>



<p>This setting should never be used we think…</p>



<p>Syntax: g_surgewall_ignore_error bool</p>



<h3 class="wp-block-heading" id="g_surgeblog">g_surgeblog</h3>



<p><strong>Specialize SurgeMail as a Blog server</strong></p>



<p>This setting causes SurgeMail’s interface to specialize itself for the purposes of being a Blog server.</p>



<p>Syntax: g_surgeblog bool</p>



<h3 class="wp-block-heading" id="g_surbl">g_surbl</h3>



<p><strong>SURBL Spam URI Realtime Blocklists</strong></p>



<p>This looks up each url found in each mail message and checks it against the SURBL database of your choice, the multi database can be used. See http://www.surbl.org/, adds headers of the form: X-Surbl: stamp urlfound nameofsurbl. PLEASE NOTE: Access to surbl is only provided freely in some conditions, larger ISP’s may need to purchase a feed, see http://www.surbl.org/usage-policy</p>



<p>Syntax: g_surbl name=string stamp=string</p>



<p>Example: g_surbl name=”multi.surbl.org” stamp=”sc.surbl.org,ws.surbl.org,phishing,ob.surbl.org,ab.surbl.org,jp”</p>



<h3 class="wp-block-heading" id="g_surbl_reject">g_surbl_reject</h3>



<p><strong>Reject email with SURBL hits</strong></p>



<p>This can reduce spam on your server by completely rejecting all email containing surbl web links…</p>



<p>Syntax: g_surbl_reject bool</p>



<h3 class="wp-block-heading" id="g_surbl_whois">g_surbl_whois</h3>



<p><strong>Also check whois info on suspect urls – not for busy servers!</strong></p>



<p>This setting searches whois information and compares what it finds to a list of known persistent spammers who register new domains regularly – if a match is found a surbl header is added. The whois servers don’t like getting heavy load so don’t use this setting if your server is very busy. A cache is used to minimize the load.</p>



<p>Syntax: g_surbl_whois bool</p>



<h3 class="wp-block-heading" id="g_surbl_skip">g_surbl_skip</h3>



<p><strong>URL’s to allow even if listed in surbl</strong></p>



<p>Sometimes you will want to whitelist a url that is listed in one or more surbl databases, use this setting to do that.</p>



<p>Syntax: g_surbl_skip string</p>



<h3 class="wp-block-heading" id="g_surbl_skip_ip">g_surbl_skip_ip</h3>



<p><strong>Skip SURBL check if sender is from listed ip</strong></p>



<p>Sometimes you will want to whitelist an ip from SURBL checks. Use this setting to do this.</p>



<p>Syntax: g_surbl_skip_ip string</p>



<h3 class="wp-block-heading" id="g_surbl_from">g_surbl_from</h3>



<p><strong>Also check the return path</strong></p>



<p>Adds return path domain/from check in the surbl database, use with Spamhaus DBL</p>



<p>Syntax: g_surbl_from bool</p>



<h3 class="wp-block-heading" id="g_vipre_enable">g_vipre_enable</h3>



<p><strong>Enable vipre scanner on windows</strong></p>



<p>Enable the vipre scanner module</p>



<p>Syntax: g_vipre_enable bool</p>



<h3 class="wp-block-heading" id="g_notag_notascii">g_notag_notascii</h3>



<p><strong>Don’t add x-notascii: charset to any non ascii message</strong></p>



<p>This can be used by user exception rules for users that don’t expect any foreign language messages</p>



<p>Syntax: g_notag_notascii bool</p>



<h3 class="wp-block-heading" id="g_notag_url_forgery">g_notag_url_forgery</h3>



<p><strong>Don’t add x-UrlForgery when a ref urls seem to not match</strong></p>



<p>Many scam’s will use legit urls with aref links to their own site, this tries to tag such messages which can then be scored as spam via aspam_mfilter.rul</p>



<p>Syntax: g_notag_url_forgery bool</p>



<h3 class="wp-block-heading" id="g_tarpit_blackhole">g_tarpit_blackhole</h3>



<p><strong>Reject email one recipient at a time to make spammers go away</strong></p>



<p>If tarpit_blackhole is true then if it was going to drop the connection to that user. Instead it will keep it and let the user talk and try and send messages, but will reject all recipients, it only does this for a max of 200 channels, any more are dropped.</p>



<p>Syntax: g_tarpit_blackhole bool</p>



<h3 class="wp-block-heading" id="g_tarpit_badrcpt">g_tarpit_badrcpt</h3>



<p><strong>Delay rejection of bad recipients</strong></p>



<p>Delay rejection of bad recipients (in seconds, default 4s).</p>



<p>Syntax: g_tarpit_badrcpt int</p>



<h3 class="wp-block-heading" id="g_tarpit_drop">g_tarpit_drop</h3>



<p><strong>Max recipients per hour from one IP</strong></p>



<p>Drop link and ban for 1 hour if g_tarpit_max or g_max_bad_to has been exceeded.</p>



<p>Syntax: g_tarpit_drop bool</p>



<h3 class="wp-block-heading" id="g_tarpit_retry">g_tarpit_retry</h3>



<p><strong>Send retry error, 450 if tarpit limits exceeded</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_tarpit_retry bool</p>



<h3 class="wp-block-heading" id="g_tarpit_max">g_tarpit_max</h3>



<p><strong>Max number of local recipients per hour from one IP</strong></p>



<p>If this limit is exceeded, the offending client is “tarpitted”. This means the mail server starts pretending to go slowly. This is better than simply closing the connection as that will not stop the sending system from trying to reconnect rapidly or send to other systems rapidly, but tarpitting jams the sending system and limits the damage they can do to you and others. Cool huh?&nbsp;</p>



<p>Unlike G_BOMB_MAX, the g_tarpit_max setting counts the total of all recipients to all addresses from this IP address.</p>



<p>A setting of about 200-10,000 is probably good but be careful with mailing lists it will break them. Use an exclusion for IP addresses of known mailing lists or set the limit higher than known mailing lists, eg: 2,000 is probably a good setting just to avoid disasters without disrupting many real users.</p>



<p>Use spam_allow ip.address.list to over-ride the limit for known systems (eg: mailing list servers) that would be exceed the limit.</p>



<p>Syntax: g_tarpit_max int</p>



<h3 class="wp-block-heading" id="g_tarpit_max_remote">g_tarpit_max_remote</h3>



<p><strong>Max remote recipients from one IP</strong></p>



<p>The maximum number of remote recipients before slowing down.</p>



<p>Syntax: g_tarpit_max_remote int</p>



<h3 class="wp-block-heading" id="g_tarpit_skip">g_tarpit_skip</h3>



<p><strong>Skip tarpit limit for these destination users or domains, e.g. *@xyz.com</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_tarpit_skip string</p>



<h3 class="wp-block-heading" id="g_tarpit_skip_from">g_tarpit_skip_from</h3>



<p><strong>Skip tarpit limit for messages from these users e.g. *@xyz.com</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_tarpit_skip_from string</p>



<h3 class="wp-block-heading" id="g_tarpit_hacker">g_tarpit_hacker</h3>



<p><strong>Slow DOS attacks in some situations</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_tarpit_hacker bool</p>



<h3 class="wp-block-heading" id="g_tellmail_ip">g_tellmail_ip</h3>



<p><strong>Tellmail IP restriction</strong></p>



<p>Restrict remote tellmail commands to these IP addresses.</p>



<p>Syntax: g_tellmail_ip string</p>



<h3 class="wp-block-heading" id="g_tcp_read_timeout">g_tcp_read_timeout</h3>



<p><strong>Timeout in ‘seconds’ on POP connections (do not adjust)</strong></p>



<p>Timeout in ‘seconds’ on POP connections, do not adjust. (default 600).</p>



<p>Syntax: g_tcp_read_timeout int</p>



<h3 class="wp-block-heading" id="g_tcp_que_len">g_tcp_que_len</h3>



<p><strong>Length of listen queue for incoming connections</strong></p>



<p>Default is 25 or 200 on windows, to reduce non paged pool on windows reduce to 20</p>



<p>Syntax: g_tcp_que_len int</p>



<h3 class="wp-block-heading" id="g_tcp_proxy_ip">g_tcp_proxy_ip</h3>



<p><strong>Enable TCP proxy protocol for specific address</strong></p>



<p>Enables the tcp proxy protocol on new connections for this address for pop,imap,smtp.</p>



<p>Syntax: g_tcp_proxy_ip string</p>



<h3 class="wp-block-heading" id="g_tcp_bf_size">g_tcp_bf_size</h3>



<p><strong>Set tcpip snd/rcv buffer sizes, best left blank</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_tcp_bf_size int</p>



<h3 class="wp-block-heading" id="g_cookie_secure">g_cookie_secure</h3>



<p><strong>Set all cookies to secure mode on https connections</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_cookie_secure bool</p>



<h3 class="wp-block-heading" id="g_token_secure">g_token_secure</h3>



<p><strong>Use secure flag for surgeweb, stops http access to token, so requires https to work</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_token_secure bool</p>



<h3 class="wp-block-heading" id="g_token_httponly">g_token_httponly</h3>



<p><strong>Use httponly flag, stop scripts using token, may break attachments</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_token_httponly bool</p>



<h3 class="wp-block-heading" id="g_thread_max">g_thread_max</h3>



<p><strong>Total maximum number of threads allowed</strong></p>



<p>Total maximum number of threads allowed on this system. This should not normally be changed. If you do increase it start small, eg: 400 is a safe number on most systems. Generally if you need to increase it more than that then you have a performance problem that needs fixing and increasing it more is unlikely to be a good idea. On Linux if your thread_max setting is above 500 then you must modify surgemail_start.sh to increase the handle limit from 1024 to 2048 (at least twice the g_thread_max value). If you get crashes with ‘handle_limit’ recorded in the logs then it’s likely that your operating system handle limit is too small for your g_thread_max setting. On Solaris you will need the 64 bit build of SurgeMail to increase this limit as the Solaris 32 bit ‘c’ libraries are limited to 256 file handles (I kid you not</p>



<p><a href="http://www.netwinsite.com/surgemail/help/faq.htm#timeout">See FAQ section on session limits</a></p>



<p>Syntax: g_thread_max int</p>



<h3 class="wp-block-heading" id="g_thread_pool">g_thread_pool</h3>



<p><strong>Keep all threads in a common pool</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_thread_pool bool</p>



<h3 class="wp-block-heading" id="g_thread_spinlock">g_thread_spinlock</h3>



<p><strong>Spin more before sleeping when waiting for mutex</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_thread_spinlock bool</p>



<h3 class="wp-block-heading" id="g_thread_smooth">g_thread_smooth</h3>



<p><strong>Throttle thread creation as max hit to reduce peaks</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_thread_smooth bool</p>



<h3 class="wp-block-heading" id="g_timezone">g_timezone</h3>



<p><strong>Timezone text</strong></p>



<p>Text to be placed in the timezone part of the date string. e.g. +1200 NZT</p>



<p>Syntax: g_timezone string</p>



<h3 class="wp-block-heading" id="g_timezone_force">g_timezone_force</h3>



<p><strong>Hours offset to local time, e.g. 5 (best left blank)</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_timezone_force string</p>



<h3 class="wp-block-heading" id="g_timeout_try_later">g_timeout_try_later</h3>



<p><strong>If timeout while waiting for message to arrive tell other end to retry</strong></p>



<p>This ‘may’ cause faulty servers to endlessly retry a message. But should be ok. Normally this sort of timeout is very rare but can be caused by faulty virus scanner so retrying won’t always help</p>



<p>Syntax: g_timeout_try_later bool</p>



<h3 class="wp-block-heading" id="g_tohost_local">g_tohost_local</h3>



<p><strong>Tohost entries to deliver locally</strong></p>



<p>Authentication database tohost name entry to deliver locally. This setting only applies if g_proxy or g_route_by_tohost is enabled. This is useful to allow the configuration of multisite systems using g_route_tohost with a single shared authentication database.</p>



<p>Syntax: g_tohost_local string</p>



<h3 class="wp-block-heading" id="g_toscan_path">g_toscan_path</h3>



<p><strong>Path used for mime parts for virus scanner</strong></p>



<p>The default is the toscan directory under the home path, using this setting can help sometimes if permissions are a problem</p>



<p>Syntax: g_toscan_path string</p>



<h3 class="wp-block-heading" id="g_train_store">g_train_store</h3>



<p><strong>Number of messages to store in each spam training directory (1000-5000)</strong></p>



<p>We recommend about 10000 – dont get carried away, more is not necessarily better!</p>



<p>Syntax: g_train_store int</p>



<h3 class="wp-block-heading" id="g_url_alias">g_url_alias</h3>



<p><strong>Allows translation from one URL to another</strong></p>



<p>Allows translation from one URL or beginning of a URL to another. eg:</p>



<p>g_url_alias from=”/cgi-bin/” to=”/scripts/”</p>



<p>will cause the URL http://localhost:7025/cgi-bin/fred.cgi to reference the same file as http://localhost:7025/scripts/fred.cgi would have, the fred.cgi in the SurgeMail ‘scripts’ directory. The domain&nbsp;<a href="https://surgemail.com/knowledge-base/global-settings-misc-p-z/domain.htm#url_alias">url_alias</a>&nbsp;settings are checked before these, the first matching rule is used, settings are checked in the order specified.</p>



<p>Syntax: g_url_alias from=string to=string ports=string</p>



<h3 class="wp-block-heading" id="g_url_redirect">g_url_redirect</h3>



<p><strong>Sends http 301 redirect to tell browser resource has moved</strong></p>



<p>Typical usage to move users from http to https automatically, e.g. g_url_redirect from=”http://*/surgeweb” to=”https://%1:7443/surgeweb” ports=”80,7080″</p>



<p>Or you may wish to change the default page to webmail, e.g.</p>



<p>g_url_redirect from=”/” to=”/surgeweb” ports=”443,80″</p>



<p>Syntax: g_url_redirect from=string to=string ports=string</p>



<h3 class="wp-block-heading" id="g_url_enable">g_url_enable</h3>



<p><strong>Enables widearea url database</strong></p>



<p>Syntax: g_url_enable &lt;true/false&gt;</p>



<p>If set then SurgeMail fetches the url database and updates from netwinsite.com every few hours. Messages which contain matches will get a header X-SpamUrl:… which will be used in the spam score. Once enabled you will contribute to Netwin’s central server and also download from their once every couple of days.<br>Additions to your isspam/notspam training addresses are also sent to netwinsite.com (just the url’s for white list/blacklist)</p>



<p>Syntax: g_url_enable bool</p>



<h3 class="wp-block-heading" id="g_url_master">g_url_master</h3>



<p><strong>Not for general use</strong></p>



<p>Used by netwin to manage the master server. Sorry this doesn’t allow you to run your own master.<br>Should be left blank</p>



<p>Syntax: g_url_master bool</p>



<h3 class="wp-block-heading" id="g_url_master_to">g_url_master_to</h3>



<p><strong>Not for general use</strong></p>



<p>Not for general use. Used by netwin for testing.</p>



<p>Syntax: g_url_master_to string</p>



<h3 class="wp-block-heading" id="g_url_host_noscan">g_url_host_noscan</h3>



<p><strong>Disable the scan for url_host settings matching the domain in an incoming web request</strong></p>



<p>SurgeMail uses g_server_name and url_host settings to determine the default domain to select for web requests, this setting stops it using the url_host settings (which may be slow on systems with a large number of domains)</p>



<p>Syntax: g_url_host_noscan bool</p>



<h3 class="wp-block-heading" id="g_user_alias_file">g_user_alias_file</h3>



<p><strong>User aliases configuration file</strong></p>



<p>This setting specifies the configuration file for user aliases. This file is in the following format:</p>



<p>domain alias_domain,access[,access]…</p>



<p>where domain is the domain name eg: email.com, alias_domain is the domain in which aliases can be created, and access specifies who is allowed to create these aliases, it can have one of the following values:</p>



<figure class="wp-block-table"><table><tbody><tr><td>user</td><td>Users can create these aliases.</td></tr><tr><td>domadmin</td><td>Domain administrators can create these aliases.</td></tr><tr><td>admin</td><td>The Administrator can create these aliases.</td></tr><tr><td>private</td><td>Same as domadmin,admin. The Administrator and the Domain administrators can create these aliases.</td></tr><tr><td>public</td><td>Same as user,domadmin,admin. Everyone can create these aliases.</td></tr></tbody></table></figure>



<p>Example alias.dat file:</p>



<pre class="wp-block-preformatted">email.com *.email.com,public
email.com sport.email.com,public
internal.email.com email.com,private
internal.email.com internal.email.com,admin</pre>



<p>Syntax: g_user_alias_file string</p>



<h3 class="wp-block-heading" id="g_user_alias">g_user_alias</h3>



<p><strong>Number of aliases accounts can create</strong></p>



<p>This setting specifies the maximum number of account aliases an account (optionally in specified group) can create. The format of these aliases is specified in the file specified by the&nbsp;<a href="global.htm#g_user_alias_file%20">g_user_alias_file</a>&nbsp;setting. eg.</p>



<p>g_user_alias quota=”10″ group=””<br>g_user_alias quota=”20″ group=”grp1″<br>g_user_alias quota=”30″ group=”grp2″</p>



<p>Syntax: g_user_alias group=string quota=int</p>



<h3 class="wp-block-heading" id="g_user_blogs">g_user_blogs</h3>



<p><strong>Number of blogs accounts can create</strong></p>



<p>Specifies blog limit based on user group.</p>



<p>Syntax: g_user_blogs group=string quota=int</p>



<p>Example: g_user_blogs group=premium quota=15</p>



<h3 class="wp-block-heading" id="g_user_domainlist">g_user_domainlist</h3>



<p><strong>Show domains list on user pages</strong></p>



<p>This setting decides who will see the drop-down list of domains on the user check, add, login, and management pages. It has three possible values: user, domadmin and admin. A value of ‘user’ allows everyone to see the list, ‘domadmin’ allows domain admins and the admin to see the list, and ‘admin’ allows only the admin to see the domains list.</p>



<p>Syntax: g_user_domainlist string</p>



<h3 class="wp-block-heading" id="g_user_virus_scan">g_user_virus_scan</h3>



<p><strong>Allow users to enable / disable virus scanner for themselves</strong></p>



<p>This setting adds a tickbox to the Spam page in user self administration that allows the user to enable and disable the virus scanner for them selves.</p>



<p>Syntax: g_user_virus_scan bool</p>



<h3 class="wp-block-heading" id="g_user_access">g_user_access</h3>



<p><strong>Allow / Restrict user access to features based on&nbsp;</strong></p>



<p>g_user_access group=”wildcard” access=”list”</p>



<p>This setting matches the&nbsp;<a href="#g_access_group">g_access_group</a>&nbsp;the user is in to the wildcard specified and applies the specified list to that user, giving / restricting thier access to certain features. The list may include any of the following:</p>



<figure class="wp-block-table"><table><tbody><tr><th><strong>Value</strong></th><th><strong>Result</strong></th></tr><tr><td>alias</td><td>Access to the “Alias” page and features.</td></tr><tr><td>blog</td><td>Access to the “Blogs” page and features.</td></tr><tr><td>centipaid</td><td>Access to the “Centipaid” page and features.</td></tr><tr><td>delete</td><td>Access to the “Delete” button, which deletes the email account.</td></tr><tr><td>enotify</td><td>Access to the “Email Notification” page and features.</td></tr><tr><td>exceptions</td><td>Access to the “Exceptions” page.</td></tr><tr><td>filter</td><td>Access to filtering of messages. (<a href="#g_filter_pipe">g_filter_pipe</a>,&nbsp;<a href="#g_mfilter_file">g_mfilter_file</a>,&nbsp;<a href="#g_dmail_filter">g_dmail_filter</a>)</td></tr><tr><td>friends</td><td>Access to the “Friends” pages, and system.</td></tr><tr><td>fwd</td><td>Access to the “Forwarding” features, forwarding, auto-responder.</td></tr><tr><td>fwdonly</td><td>Access to the “Forwarding” features. Without this only the auto responder is shown on the forwarding page</td></tr><tr><td>lists</td><td>Access to the “Lists” page and features.</td></tr><tr><td>log</td><td>Access to the “Log” page.</td></tr><tr><td>mailbox</td><td>Access to the “Mailbox” page, view mailbox, setup rules.</td></tr><tr><td>main</td><td>Access to the “Main” page containing user details.</td></tr><tr><td>pass</td><td>Access to the “Password” features, change password, password retrieval.</td></tr><tr><td>sms</td><td>Access to the “Sms” page.</td></tr><tr><td>spam</td><td>Access to the “Spam” page, and SmiteSpam and Aspam processing of messages.</td></tr><tr><td>spampriv</td><td>Access to the “Spam” pages’ spam private feature</td></tr><tr><td>spf</td><td>Access to the “Spf” page and features.</td></tr><tr><td>surgeplus</td><td>Able to connect to SurgeMail using the SurgePlus client.</td></tr><tr><td>virus</td><td>Access to virus scanning of messages. (<a href="#g_virus_cmd">g_virus_cmd</a>,&nbsp;<a href="#g_virus_filter">g_virus_filter</a>,&nbsp;<a href="#g_virus_avast">g_virus_avast</a>,&nbsp;<a href="#g_scan_cmd">g_scan_cmd</a>)</td></tr><tr><td>webmail</td><td>Access to the “WebMail” button which logs the user into WebMail.</td></tr></tbody></table></figure>



<p>In addition you can prefix any of the above with ! to deny access. There are two other special case values, “all” and “none” which mean exactly what they say, access to “all” or “none” of the features.</p>



<p>Example:</p>



<p>g_user_access group=”simple” access=”all,!spam,!virus”</p>



<p>The above setting gives users in the ‘simple’ group access to all the features except spam and virus features.</p>



<p>Syntax: g_user_access group=string access=string</p>



<h3 class="wp-block-heading" id="g_user_access_default">g_user_access_default</h3>



<p><strong>Default user features granted to users</strong></p>



<p>This setting is a default access list for all users on the server, it is specified in the same maner as the&nbsp;<a href="#g_user_access">g_user_access</a>&nbsp;settings ‘access’ parameter. eg:</p>



<p>g_user_access_default “all,!spam,!virus”</p>



<p>Syntax: g_user_access_default string</p>



<h3 class="wp-block-heading" id="g_user_access_from">g_user_access_from</h3>



<p><strong>When sending use from for useraccess rules</strong></p>



<p>When sending a message the user access rules which are applied can be based on the ‘from’ header, this is not secure but is sometimes useful.</p>



<p>Syntax: g_user_access_from bool</p>



<h3 class="wp-block-heading" id="g_user_access_webonly">g_user_access_webonly</h3>



<p><strong>Means user_access rules only stop web interface not actual spam checking etc</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_user_access_webonly bool</p>



<h3 class="wp-block-heading" id="g_user_cookies">g_user_cookies</h3>



<p><strong>Enable browser cookies for user self management</strong></p>



<p>Enable browser cookies for user self management.</p>



<p>Syntax: g_user_cookies bool</p>



<h3 class="wp-block-heading" id="g_user_delete">g_user_delete</h3>



<p><strong>Let users delete themselves</strong></p>



<p>Enables the user delete button in the user self management page, assuming the use access rules also allow it</p>



<p>Syntax: g_user_delete bool</p>



<h3 class="wp-block-heading" id="g_user_filter_early">g_user_filter_early</h3>



<p><strong>Process user ex</strong></p>



<h3 class="wp-block-heading" id="g_user_friends_domain_log_disable">g_user_friends_domain_log_disable</h3>



<p><strong>Disable domain level friend.log file</strong></p>



<p>By default a friend.log file is written to each domain mailbox_path. This file is a collection of all users friends.log entries that rotates when it reaches 2mb in size.</p>



<p>Syntax: g_user_friends_domain_log_disable bool</p>



<h3 class="wp-block-heading" id="g_user_friends_log_disable">g_user_friends_log_disable</h3>



<p><strong>Disable user level friend.log file</strong></p>



<p>By default a friend.log file and 1 rotation is written for each user. Each log should only be approx 10k in size.</p>



<p>Syntax: g_user_friends_log_disable bool</p>



<h3 class="wp-block-heading" id="g_user_utoken_days">g_user_utoken_days</h3>



<p><strong>Length of time a user self management login token is valid</strong></p>



<p>Length of time a user self management login token is valid for. Length of time a user self management cookie is valid for. After this time period the login token will stop allowing the user access and they will need to login again.</p>



<p>Syntax: g_user_utoken_days int</p>



<h3 class="wp-block-heading" id="g_user_utoken_expire">g_user_utoken_expire</h3>



<p><strong>Length of time a user self management login token is valid for</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_user_utoken_expire int</p>



<h3 class="wp-block-heading" id="g_user_mail_view">g_user_mail_view</h3>



<p><strong>Whether an admin/manager can view/display users inbox mail</strong></p>



<p>This setting enables the ‘view’ links on the users mailbox page. These links will show the content of the users email. They also log the access to the users log file, identifying the IP from which the admin viewed the message.</p>



<p>Syntax: g_user_mail_view bool</p>



<h3 class="wp-block-heading" id="g_user_hide_security">g_user_hide_security</h3>



<p><strong>Hide user level security.log access</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_user_hide_security bool</p>



<h3 class="wp-block-heading" id="g_user_disable">g_user_disable</h3>



<p><strong>Filename listing users to disable</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_user_disable string</p>



<h3 class="wp-block-heading" id="g_user_report">g_user_report</h3>



<p><strong>Daily,Weekly,Monthly, emailed to managers of each domain</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_user_report string</p>



<h3 class="wp-block-heading" id="g_admin_utoken_expire">g_admin_utoken_expire</h3>



<p><strong>Length of time a web admin session is valid for</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_admin_utoken_expire int</p>



<h3 class="wp-block-heading" id="g_domadmin_utoken_expire">g_domadmin_utoken_expire</h3>



<p><strong>Length of time a domain admin login token is valid for in seconds</strong></p>



<p>Default unit is seconds. You can specify units e.g. 3 minutes, 10 hours etc…</p>



<p>Syntax: g_domadmin_utoken_expire int</p>



<h3 class="wp-block-heading" id="g_uidl_big">g_uidl_big</h3>



<p><strong>Use random uidl if uidl not found</strong></p>



<p>This can avoid uid collisions if uidl files are lost mysteriously</p>



<p>Syntax: g_uidl_big bool</p>



<h3 class="wp-block-heading" id="g_user_utoken_idle">g_user_utoken_idle</h3>



<p><strong>Length of time a user self management login token may remain idle for</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_user_utoken_idle int</p>



<h3 class="wp-block-heading" id="g_admin_utoken_idle">g_admin_utoken_idle</h3>



<p><strong>Length of time a web admin session may remain idle for</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_admin_utoken_idle int</p>



<h3 class="wp-block-heading" id="g_domadmin_utoken_idle">g_domadmin_utoken_idle</h3>



<p><strong>Length of time a domain admin login token may remain idle for</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_domadmin_utoken_idle int</p>



<h3 class="wp-block-heading" id="g_user_pipe">g_user_pipe</h3>



<p><strong>Local delivery filter pipe</strong></p>



<p>Pipe run on file just before delivery to user, $USER$ available on command line. This allows the message to be modified (also see g_filter_pipe).</p>



<p>Syntax: g_user_pipe string</p>



<h3 class="wp-block-heading" id="g_user_mfilter">g_user_mfilter</h3>



<p><strong>Local delivery Mfilter rules</strong></p>



<p>Mfilter rules to run late in the delivery process after the email messages have become “user specirfic”, In particular this allows filtering based on the output of g_user_pipe.</p>



<p>Syntax: g_user_mfilter string</p>



<h3 class="wp-block-heading" id="g_user_receive_rule">g_user_receive_rule</h3>



<p><strong>Define valid source addresses for users in a group</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_user_receive_rule group=string from=string</p>



<h3 class="wp-block-heading" id="g_user_sms_quota">g_user_sms_quota</h3>



<p><strong>SMS quota</strong></p>



<p>Number of SMS messages accounts can send.</p>



<p>Syntax: g_user_sms_quota group=string initial=int period=string</p>



<h3 class="wp-block-heading" id="g_user_status_send">g_user_status_send</h3>



<p><strong>Number of days after which to send user status messages (0 = never)</strong></p>



<p>When the user enables friends then this setting will send them a regular report on what is pending and what filter rules have done. User Spam report.</p>



<p>Syntax: g_user_status_send int</p>



<h3 class="wp-block-heading" id="g_user_status_from">g_user_status_from</h3>



<p><strong>Send status with return address of the user</strong></p>



<p>Adding a return address can assist with delivery in some situations</p>



<p>Syntax: g_user_status_from bool</p>



<h3 class="wp-block-heading" id="g_user_status_fromhdr">g_user_status_fromhdr</h3>



<p><strong>Send status with return address of this</strong></p>



<p>Adding a return address can assist with delivery in some situations</p>



<p>Syntax: g_user_status_fromhdr string</p>



<h3 class="wp-block-heading" id="g_user_send_rule">g_user_send_rule</h3>



<p><strong>Define valid recipient addresses for users in a group (requires SMTP AUTH)</strong></p>



<p>This rule allows you to define which domains users in the specified group can send email to.</p>



<p>g_user_send_rule group=”wildcard” to=”number”</p>



<p>If ‘group’ is set to ‘*’ then it applies to users who are not in a group (see&nbsp;<a href="#g_access_group">g_access_group</a>), and/or whose group does not match another g_user_send_rule setting. The ‘to’ field contains a wildcard list of allowed email addresses.</p>



<p>Syntax: g_user_send_max group=string max=int</p>



<h3 class="wp-block-heading" id="g_user_send_warning">g_user_send_warning</h3>



<p><strong>Warn manager if any user sends more than this many messages per day, e.g. 5000</strong></p>



<p>This setting is useful to detect a spammer sending out bulk email from your system, this setting only applies to authenticated users, so someone who has figured out the password of one of your users (or a virus on their computer) or a registered user of some sort. If g_user_send_ip is defined then warnings will also be sent if an ip address exceeds this limit.</p>



<p>Syntax: g_user_send_warning int</p>



<h3 class="wp-block-heading" id="g_user_send_ip">g_user_send_ip</h3>



<p><strong>Block any ip that sends more than this many emails per day</strong></p>



<p>This does not apply to g_user_send_white addresses. This will also enable counting of sends for users using g_relay_window. Whitelist ip addresses with g_user_send_white setting. This limit is ‘per day’</p>



<p>Syntax: g_user_send_ip int</p>



<h3 class="wp-block-heading" id="g_user_send_white">g_user_send_white</h3>



<p><strong>No limit for these ip addresses/users</strong></p>



<p>This is a white list for the ip and user send limits.</p>



<p>Syntax: g_user_send_white string</p>



<h3 class="wp-block-heading" id="g_user_send_all">g_user_send_all</h3>



<p><strong>Apply all g_user_send_rules that match</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_user_send_all bool</p>



<h3 class="wp-block-heading" id="g_user_list_quota">g_user_list_quota</h3>



<p><strong>Number of mailing lists users can create</strong></p>



<p>g_user_list_quota group=”” quota=”100″</p>



<p>This setting configures the number of mailing lists a user can create on this server. The group field is optional, specifying none effects all users globally, otherwise it matches this against the users access group. See also user_list_quota which can set quota per domain. Also the list_quota authent field can set quota per user.</p>



<p>Syntax: g_user_list_quota group=string quota=int</p>



<h3 class="wp-block-heading" id="g_unique_name">g_unique_name</h3>



<p><strong>A unique name for this server</strong></p>



<p>This name is used in place of the machine hostname in message filenames and thus friends confirmation message subjects</p>



<p>Syntax: g_unique_name string</p>



<h3 class="wp-block-heading" id="g_utf8_case_insensitive">g_utf8_case_insensitive</h3>



<p><strong>Use case insensitive compare for surgeweb and imap searches</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_utf8_case_insensitive bool</p>



<h3 class="wp-block-heading" id="g_vanish_bad_bounces">g_vanish_bad_bounces</h3>



<p><strong>Vanish suspected spam bounces</strong></p>



<p>Vanish suspected spam bounces (requires g_received_name).</p>



<p>Syntax: g_vanish_bad_bounces bool</p>



<h3 class="wp-block-heading" id="g_vanish_virus_bounces">g_vanish_virus_bounces</h3>



<p><strong>Vanish suspected virus bounces (requires g_received_name)</strong></p>



<p>This setting gets rid of most of those stupid virus bounces you get from emails you haven’t sent. It works by checking incoming virus bounces for the received header that must exist if it was sent with your mail server. If the header is not found, the message is dropped. Recomended.</p>



<p>Syntax: g_vanish_virus_bounces bool</p>



<h3 class="wp-block-heading" id="g_vanish_any_bounce">g_vanish_any_bounce</h3>



<p><strong>Vanish all bounces, requires g_vanish_bad_bounces</strong></p>



<p>This setting will vanish spam pretending to be a bounce, it is possible it will vanish a real but badly formed bounce (badly formed as it contains no indication that it came from this server). Note: You MUST have g_vanish_bad_bounces true as well!</p>



<p>Syntax: g_vanish_any_bounce bool</p>



<h3 class="wp-block-heading" id="g_vanish_relay">g_vanish_relay</h3>



<p><strong>Vanish bad bounces before relaying email too</strong></p>



<p>Requires g_vanish_bad_bounces too, and g_received_name must be set to something other than the email domain, e.g. bounces.your.domain</p>



<p>Syntax: g_vanish_relay bool</p>



<h3 class="wp-block-heading" id="g_verify_smtp2">g_verify_smtp2</h3>



<p><strong>Verify we can talk back to the SMTP port on incoming ip address</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_verify_smtp2 bool</p>



<h3 class="wp-block-heading" id="g_verify_timeout">g_verify_timeout</h3>



<p><strong>Seconds to wait for SMTP response, default is 10 seconds</strong></p>



<p>As the verification of incoming addresses is done while the message is arriving at the ‘data’ stage, it is critical that it not take more than 30-60 seconds or the sending server will give up and the message will be lost. Generally this setting should not be changed.</p>



<p>Syntax: g_verify_timeout int</p>



<h3 class="wp-block-heading" id="g_verify_mx">g_verify_mx</h3>



<p><strong>Verify sender IP by MX</strong></p>



<p>Verify MX records contain senders IP address (also see g_verify_mx_skip).</p>



<p>Syntax: g_verify_mx bool</p>



<h3 class="wp-block-heading" id="g_verify_mx_skip">g_verify_mx_skip</h3>



<p><strong>Skip verify sender IP by MX</strong></p>



<p>Use to define incoming mail gateway IPs so the MX verify doesn’t fail on them.</p>



<p>Syntax: g_verify_mx_skip string</p>



<h3 class="wp-block-heading" id="g_verify_helo">g_verify_helo</h3>



<p><strong>Verify helo name translates to same network as sending system.</strong></p>



<p>Syntax: g_verify_helo “true/false”</p>



<p>It will skip this check for any trusted connection (smtp authenticated, or any ip it would allow to forward)</p>



<p>It adds this header:<br>X-Verify-Helo</p>



<p>It simply takes the helo name, and turns it into a number a.b.c.d, then it checks that the connection is coming from ‘a.b.*.*’<br>if it isn’t it adds a header saying as much.</p>



<p>Syntax: g_verify_helo bool</p>



<h3 class="wp-block-heading" id="g_verify_image_hard">g_verify_image_hard</h3>



<p><strong>Use extra difficult human verification image (used in blogs)</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_verify_image_hard bool</p>



<h3 class="wp-block-heading" id="g_virus_scanner_list">g_virus_scanner_list</h3>



<p><strong>List of files to be virus scanned *.exe,*.bat,etc…</strong></p>



<p>Use this to over-ride the default</p>



<p>Syntax: g_virus_scanner_list string</p>



<h3 class="wp-block-heading" id="g_virus_simple">g_virus_simple</h3>



<p><strong>Enable internal simple virus scanner</strong></p>



<p>This scanner simply blocks dangerous attachments, it’s fast, and effective.</p>



<p>Syntax: g_virus_simple bool</p>



<h3 class="wp-block-heading" id="g_virus_simple_list">g_virus_simple_list</h3>



<p><strong>List of dangerous file extensions, *.exe,*.bat,etc…</strong></p>



<p>Use this setting to replace the default list</p>



<p>Syntax: g_virus_simple_list string</p>



<h3 class="wp-block-heading" id="g_virus_simple_skip">g_virus_simple_skip</h3>



<p><strong>Skip simple check for from/to addresses</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_virus_simple_skip string</p>



<h3 class="wp-block-heading" id="g_virus_simple_skipauth">g_virus_simple_skipauth</h3>



<p><strong>Skip simple virus if user sending is authenticated local user</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_virus_simple_skipauth bool</p>



<h3 class="wp-block-heading" id="g_virus_simple_zip">g_virus_simple_zip</h3>



<p><strong>Check zip files for executables and block</strong></p>



<p>This can be used to stop many types of viruses</p>



<p>Syntax: g_virus_simple_zip bool</p>



<h3 class="wp-block-heading" id="g_virus_simple_test">g_virus_simple_test</h3>



<p><strong>Compare with avast results</strong></p>



<p>This scanner simply blocks dangerous attachments, it’s fast, and effective.</p>



<p>Syntax: g_virus_simple_test bool</p>



<h3 class="wp-block-heading" id="g_virus_avast_old">g_virus_avast_old</h3>



<p><strong>Enable AVAST virus scanner integration, OBSOLETE, DO NOT USE</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_virus_avast_old bool</p>



<h3 class="wp-block-heading" id="g_virus_avast_attachments">g_virus_avast_attachments</h3>



<p><strong>Only scan messages with suspect attachments (windows only currently)</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_virus_avast_attachments bool</p>



<p>Not recommended, now use the anti virus config page to configure surgemail to use your system scanner.</p>



<h3 class="wp-block-heading" id="g_virus_allow_unmonitorable">g_virus_allow_unmonitorable</h3>



<p><strong>Allow unmonitorable content (avast antivirus)</strong></p>



<p>By default messages that cannot be scanned (eg as they contain password protected archive files) are blocked by the avast virus scanner. This setting allows unmonitorable contect to be sent.</p>



<p>Syntax: g_virus_allow_unmonitorable bool</p>



<h3 class="wp-block-heading" id="g_virus_cmd">g_virus_cmd</h3>



<p><strong>Command line virus checker to run on MIME parts</strong></p>



<p>If defined the mail server will extract MIME parts in a multi part message and run the virus scanner over the extracted file. The command line can include $FILE$ which will be replaced with the actual file name of the extracted part. An intelligent cache is used so mailing lists, etc, will not require running the virus scanner on every message sent. If you set this to “do_not_run” then SurgeMail will extract the MIME parts but not actually run any program, some virus scanners scan all files on the system so the file is deleted magically and SurgeMail will notice and bounce the message. If your scanner supports the returning of return codes if a virus is found then you should use g_virus_cmd_codes with this setting as this is more reliable than having to detect if a file is deleted and also means also will work on viruses in archives which a lot of scanners won’t delete.</p>



<p>Syntax: g_virus_cmd string</p>



<h3 class="wp-block-heading" id="g_virus_cmd_codes">g_virus_cmd_codes</h3>



<p><strong>Return codes to bounce message</strong></p>



<p>Accept return codes from virus scanner as a confirmation that the scanned file is infected, eg: 1,2,3,4,5.</p>



<p>Lets SurgeMail check the return code from g_virus_cmd and if the code matches<br>one in the above setting assumes its a virus and bounces it.</p>



<p>g_virus_cmd_codes “10,12”</p>



<p>This would assume its a virus if the scanner returns return code 10 or 12 and then will bounce the message.</p>



<p>Syntax: g_virus_cmd_codes string</p>



<h3 class="wp-block-heading" id="g_virus_cmd_nodel">g_virus_cmd_nodel</h3>



<p><strong>Do not delete scanned files</strong></p>



<p>Disables cleanup of scanned files, so you can test manually. The files are extracted to the “toscan” directory inside the SurgeMail directory. You should never normally need this on unless for debugging purposes.</p>



<p>Syntax: g_virus_cmd_nodel bool</p>



<h3 class="wp-block-heading" id="g_virus_cmd_size">g_virus_cmd_size</h3>



<p><strong>Max size of messages to scan</strong></p>



<p>Useful to stop scanning of huge files, e.g. 1mb or bigger</p>



<p>Syntax: g_virus_cmd_size int</p>



<h3 class="wp-block-heading" id="g_virus_cmd_sleep">g_virus_cmd_sleep</h3>



<p><strong>Wait after g_virus_cmd incase delete is not immediate</strong></p>



<p>Milli seconds to wait after g_virus_cmd incase delete is not immediate, eg: 500 = half a second.</p>



<p>Syntax: g_virus_cmd_sleep int</p>



<h3 class="wp-block-heading" id="g_virus_cmd_max">g_virus_cmd_max</h3>



<p><strong>Maximum number of concurrent threads to use for scanning</strong></p>



<p>Syntax: g_virus_cmd_max “number of threads”</p>



<p>This sets the maximum number of threads that be used for running the virus scanner set by g_virus_cmd. Some scanners can take a while to scan a message and if the server is very busy this can tie up many channels and drain the cpu slowing down the entire mail server. When the maximum has been reached any messages coming in will be passed on without being run through the scanner – although this is not the best, it’s better than the mail server grinding to a halt.</p>



<p>Syntax: g_virus_cmd_max int</p>



<h3 class="wp-block-heading" id="g_virus_cmd_drop">g_virus_cmd_drop</h3>



<p><strong>Drop silently instead of reject at data stage – not recommended</strong></p>



<p>This should only be used when your front end server is not scanning for viruses and your back end server then rejects the message generating back scatter on the front end server.</p>



<p>Syntax: g_virus_cmd_drop bool</p>



<h3 class="wp-block-heading" id="g_virus_cmd_email">g_virus_cmd_email</h3>



<p><strong>Set if scanner can understand email message files</strong></p>



<p>If this is set then then the scanner is responsible for extracting the mime parts of a message and scanning them</p>



<p>Syntax: g_virus_cmd_email bool</p>



<h3 class="wp-block-heading" id="g_virus_cmd_body">g_virus_cmd_body</h3>



<p><strong>Scan raw msg file too</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_virus_cmd_body bool</p>



<h3 class="wp-block-heading" id="g_virus_cmd_test">g_virus_cmd_test</h3>



<p><strong>Continue after virus found to compare scanners</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_virus_cmd_test bool</p>



<h3 class="wp-block-heading" id="g_virus_cmd_log">g_virus_cmd_log</h3>



<p><strong>Log stdout of virus command line scanner to vcmd.log</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_virus_cmd_log bool</p>



<h3 class="wp-block-heading" id="g_virus_debug3">g_virus_debug3</h3>



<p><strong>Testing virus scanners do not use</strong></p>



<p>Do not use</p>



<p>Syntax: g_virus_debug3 bool</p>



<h3 class="wp-block-heading" id="g_virus_disable_remote">g_virus_disable_remote</h3>



<p><strong>Disable virus scans for non-local addresses</strong></p>



<p>By default SurgeMail scans incoming messages from non-local senders, this disables that behaviour so scans will only occur if any recipient has virus scan access. You will probably need g_user_virus_scan true as well.</p>



<p>Syntax: g_virus_disable_remote bool</p>



<h3 class="wp-block-heading" id="g_virus_disable_local">g_virus_disable_local</h3>



<p><strong>Disable scanning for local trusted users</strong></p>



<p>Skip virus scanner for authenticated users and 127.0.0.1</p>



<p>Syntax: g_virus_disable_local bool</p>



<h3 class="wp-block-heading" id="g_virus_filter">g_virus_filter</h3>



<p><strong>Virus checker or filter that takes commands on stdin and response on stdout</strong></p>



<p>Virus filters use the following protocol the process is run continuously and sent on STDIN a command of the form, “nnn CHECK fullfilename envelopefilename\r\n” and in response it must send back is “nnn OK|REJECT|ERROR reason text\r\n”</p>



<p>It can modify the file directly and then respond with ‘ok’, however if it does this it must maintain the crlf line terminated and dot stuffed nature of the file.</p>



<p>Here is an example test of a virus filter</p>



<pre class="wp-block-preformatted">c:\surgemail&gt; vfilter.exe
 1 check c:\surgemail\work\a.itm c:\surgemail\work\a.hdr
 1 REJECT Found something bad in that file
 2 check c:\surgemail\work\a.itm c:\surgemail\work\a.hdr
 2 OK send message along</pre>



<p>a.hdr would contain:</p>



<pre class="wp-block-preformatted">From: bob@domain.com
 To: xyz@thisdomain.com
 To: xyz3@thisdomain.com
</pre>



<p>Syntax: g_virus_filter cmd=string type=string</p>



<h3 class="wp-block-heading" id="g_virus_filter_require">g_virus_filter_require</h3>



<p><strong>Require filter pipe</strong></p>



<p>If any g_virus_filter pipe fails bounce messages rather than allow to continue.</p>



<p>Syntax: g_virus_filter_require bool</p>



<h3 class="wp-block-heading" id="g_virus_fprot">g_virus_fprot</h3>



<p><strong>Set F-PROT port for mail scanning</strong></p>



<p>Typically set this to 11200</p>



<p>First install f-prot virus scanner, exact steps will vary depending on platform so follow your F-Prot install instructions, but as an example on Linux we did this:</p>



<pre class="wp-block-preformatted">cd /usr/local
gunzip DISTRIBUTION.tar.gz
tar -xvf DISTRIBUTION.tar
cd f-prot
./install-f-prot.pl
cd tools</pre>



<pre class="wp-block-preformatted"># Now start mail scanner as user 'mail'
su mail -c"/usr/local/f-prot/tools/scan-mail.pl -server -daemon"
 </pre>



<p>Your will also need to start the scanner as above in your startup scripts (e.g. rc.local)</p>



<p>Then lastly in surgemail.ini set</p>



<p>g_virus_fprot 11200</p>



<p>When a message is scanned a header X-Fprot: … is added giving some informational status.</p>



<p>Syntax: g_virus_fprot int</p>



<h3 class="wp-block-heading" id="g_virus_recent_skip">g_virus_recent_skip</h3>



<p><strong>Skip recent virus cache</strong></p>



<p>Skip virus recent cache which attempts to speed up virus scanners.</p>



<p>Syntax: g_virus_recent_skip bool</p>



<h3 class="wp-block-heading" id="g_virus_rename">g_virus_rename</h3>



<p><strong>Rename attached executables to prevent autorun</strong></p>



<p>If enabled SurgeMail will rename dangerous executable files by replacing the ‘.’ with an ‘_’. This will stop many autorun viruses. This is name</p>



<p>Syntax: g_virus_rename bool</p>



<h3 class="wp-block-heading" id="g_virus_rename_skip">g_virus_rename_skip</h3>



<p><strong>Skip rename for these from/to addresses</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_virus_rename_skip string</p>



<h3 class="wp-block-heading" id="g_virus_rename_skipauth">g_virus_rename_skipauth</h3>



<p><strong>Skip rename if user sending is authenticated local user</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_virus_rename_skipauth bool</p>



<h3 class="wp-block-heading" id="g_virus_report">g_virus_report</h3>



<p><strong>Report detected viruses to someone</strong></p>



<p>Sends an email report to the specified address when a virus comes in.</p>



<p>Syntax: g_virus_report string</p>



<h3 class="wp-block-heading" id="g_virus_report_user">g_virus_report_user</h3>



<p><strong>Report virus to recipients</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_virus_report_user bool</p>



<h3 class="wp-block-heading" id="g_virus_report_all">g_virus_report_all</h3>



<p><strong>Report every virus using g_virus_report</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_virus_report_all bool</p>



<h3 class="wp-block-heading" id="g_virus_restart">g_virus_restart</h3>



<p><strong>Restart vpipe virus scanners</strong></p>



<p>Restart vpipe virus scanners every this many items.</p>



<p>Syntax: g_virus_restart int</p>



<h3 class="wp-block-heading" id="g_virus_late">g_virus_late</h3>



<p><strong>Run virus scan after most spam filter processing</strong></p>



<p>This can reduce load on virus scanner which is often a slow process</p>



<p>Syntax: g_virus_late bool</p>



<h3 class="wp-block-heading" id="g_virus_localhost">g_virus_localhost</h3>



<p><strong>Don’t skip virus checks for 127.0.0.1 originating emails</strong></p>



<p>This setting should not normally be used, it will make it scan locally generated emails, dlist messages etc…</p>



<p>Syntax: g_virus_localhost bool</p>



<h3 class="wp-block-heading" id="g_virus_strangers">g_virus_strangers</h3>



<p><strong>Use simple attachment filter for non friends</strong></p>



<p>This setting can stop zero hour attacks as it blocks any attachment that might be a virus if it’s not from a friend</p>



<p>Syntax: g_virus_strangers bool</p>



<h3 class="wp-block-heading" id="g_virus_cloud">g_virus_cloud</h3>



<p><strong>Use cloud scanner, not recommended</strong></p>



<p>Enables the cloud scanner for inbox delivered messages if clamav is in use, this does send samples to an external system for scanning so may not be appropriate in all situations. It should only be used on systems where ‘clamav’ is the primary scanner with less than 1000 users.</p>



<p>Syntax: g_virus_cloud bool</p>



<h3 class="wp-block-heading" id="g_virus_cloud_wild">g_virus_cloud_wild</h3>



<p><strong>File types to cloud scan *.exe,*.com</strong></p>



<p>Best left as default</p>



<p>Syntax: g_virus_cloud_wild string</p>



<h3 class="wp-block-heading" id="g_vpipe_concurrent">g_vpipe_concurrent</h3>



<p><strong>Concurrent requests to vpipe process</strong></p>



<p>Concurrent requests to vpipe process, default is 7, set to 1 to debug vpipe issues</p>



<p>Syntax: g_vpipe_concurrent int</p>



<h3 class="wp-block-heading" id="g_vpipe_fail_crash">g_vpipe_fail_crash</h3>



<p><strong>Crash if vpipe fails</strong></p>



<p>Crash SurgeMail if vpipe fails. This is for debugging purposes only.</p>



<p>Syntax: g_vpipe_fail_crash bool</p>



<h3 class="wp-block-heading" id="g_vpipe_timeout">g_vpipe_timeout</h3>



<p><strong>Timeout for firus filters (default 60s)</strong></p>



<p>The timeout in second that SurgeMail will wait for a virus filter (defined by g_virus_filter) to complete. If after this time the virus filter has not responded the message will be let through and the following line logged in mail.log:</p>



<p>“Virus filter not responding, stuck on &lt;msg file&gt; allowing message through”</p>



<p>Syntax: g_vpipe_timeout int</p>



<p>Use the&nbsp;<a href="https://html-cleaner.com/" target="_blank" rel="noreferrer noopener">online HTML beautifier</a>&nbsp;to maximize your web content composing efficiency.</p>



<h3 class="wp-block-heading" id="g_vpipe_skip">g_vpipe_skip</h3>



<p><strong>Skip virus filter checks per IP address</strong></p>



<p>Disable virus and crc checking for known safe bulk mailers that would otherwise overload the server. This setting affects the virus checker.<br>Example: g_vpipe_skip “20.0.0.2”</p>



<ul class="wp-block-list">
<li>g_virus_cmd</li>



<li>virus filters (g_virus_filter)</li>



<li>filter program (g_filter_pipe)</li>



<li>F-Prot in daemon mode (g_virus_fprot)</li>
</ul>



<p>Syntax: g_vpipe_skip string</p>



<h3 class="wp-block-heading" id="g_vpipe_notag">g_vpipe_notag</h3>



<p><strong>Disable vpipe result headers</strong></p>



<p>Disable headers showing vpipe results in messages.</p>



<p>Syntax: g_vpipe_notag bool</p>



<h3 class="wp-block-heading" id="g_web_add">g_web_add</h3>



<p><strong>Add http headers</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_web_add string</p>



<h3 class="wp-block-heading" id="g_web_api_ip">g_web_api_ip</h3>



<p><strong>Allow access to web based API for msg access</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_web_api_ip string</p>



<h3 class="wp-block-heading" id="g_web_charset">g_web_charset</h3>



<p><strong>Charset for html pages</strong></p>



<p>Sets the charset to use for each language i.e. e.g. iso-8859-1</p>



<p>Syntax: g_web_charset lang=string charset=string</p>



<h3 class="wp-block-heading" id="g_web_max">g_web_max</h3>



<p><strong>Max concurrent web connections, default is 100</strong></p>



<p>This includes web admin, webmail etc…., The default limit should be sufficient for most systems. Although a limit of 10 would be tons for most systems we had to set the default high as this setting was added recently.</p>



<p>Syntax: g_web_max int</p>



<h3 class="wp-block-heading" id="g_web_max_perip">g_web_max_perip</h3>



<p><strong>Max concurrent web connections per-ip, default is 30</strong></p>



<p>This includes web admin, webmail etc…., The default limit should be sufficient for most systems unless all your users are coming through a common proxy</p>



<p>Syntax: g_web_max_perip int</p>



<h3 class="wp-block-heading" id="g_web_timeout">g_web_timeout</h3>



<p><strong>Timeout for web requests</strong></p>



<p>Timeout for web requests, the default is 180 seconds, generally it should not be set below 61 seconds</p>



<p>Syntax: g_web_timeout int</p>



<h3 class="wp-block-heading" id="g_web_admin_max">g_web_admin_max</h3>



<p><strong>Maximum number of concurrent web admin sessions</strong></p>



<p>Web admin requests are recorded, the remote IP and local port are used to identify a particular session. This setting places a limit on the number of sessions at any one time.</p>



<p>Syntax: g_web_admin_max int</p>



<h3 class="wp-block-heading" id="g_web_access_ip">g_web_access_ip</h3>



<p><strong>Restrict access to web ports based on ip</strong></p>



<p>Specifies a list of ports and a wildcard list of valid ip addresses who can connect to those ports.</p>



<p>Syntax: g_web_access_ip ports=string ip=string</p>



<h3 class="wp-block-heading" id="g_web_access_grp">g_web_access_grp</h3>



<p><strong>Restrict user groups to specific ports</strong></p>



<p>Specifies a user group or groups and a list of valid web ports for that group.</p>



<p>Syntax: g_web_access_grp group=string ports=string</p>



<h3 class="wp-block-heading" id="g_web_access_max">g_web_access_max</h3>



<p><strong>Maximum number of concurrent web logins for group</strong></p>



<p>Specifies the maximum number of concurrent web logins for a certain group of users.</p>



<p>Syntax: g_web_access_max group=string max=int</p>



<h3 class="wp-block-heading" id="g_web_noserver">g_web_noserver</h3>



<p><strong>Disable Server header in http responses</strong></p>



<p>Some security firms require this in order to hide the software application information</p>



<p>Syntax: g_web_noserver bool</p>



<h3 class="wp-block-heading" id="g_web_old_behaviour">g_web_old_behaviour</h3>



<p><strong>Revert to old style webserver behaviour</strong></p>



<p>To pass various auditing tests admin interface no longer responds to arbitrary url. This restores old behaviour.</p>



<p>Syntax: g_web_old_behaviour bool</p>



<h3 class="wp-block-heading" id="g_web_policy_disable">g_web_policy_disable</h3>



<p><strong>Disable obscure web policy security headers</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_web_policy_disable bool</p>



<h3 class="wp-block-heading" id="g_web_php_exe">g_web_php_exe</h3>



<p><strong>Path to php.exe</strong></p>



<p>Experimental support for php</p>



<p>Syntax: g_web_php_exe string</p>



<h3 class="wp-block-heading" id="g_web_trust_ip">g_web_trust_ip</h3>



<p><strong>Trust ip address from rev proxy web server X-Forwarded-For</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_web_trust_ip string</p>



<h3 class="wp-block-heading" id="g_web_forwarded_test">g_web_forwarded_test</h3>



<p><strong>Fake the forwarded-for header</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_web_forwarded_test bool</p>



<h3 class="wp-block-heading" id="g_web_forwarded_uselast">g_web_forwarded_uselast</h3>



<p><strong>Use last address in multiple item forwarded-for header</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_web_forwarded_uselast bool</p>



<h3 class="wp-block-heading" id="g_webdav_enable">g_webdav_enable</h3>



<p><strong>Enable webdav access for users (do not use)</strong></p>



<p>Enable ‘webdav’ features so users can store data, you must also define g_webdav_path</p>



<p>Syntax: g_webdav_enable bool</p>



<h3 class="wp-block-heading" id="g_webdav_group">g_webdav_group</h3>



<p><strong>Only allow webdav if member of webdav access group</strong></p>



<p>Require that users be members of the webdav group</p>



<p>Syntax: g_webdav_group bool</p>



<h3 class="wp-block-heading" id="g_webdav_public">g_webdav_public</h3>



<p><strong>Enable non authenticated access to pub folder (readonly)</strong></p>



<p>This setting enables the user to place web pages (static) up on their email account, the public url would be http://your.server/wd/username/pub/…</p>



<p>Syntax: g_webdav_public bool</p>



<h3 class="wp-block-heading" id="g_webdav_path">g_webdav_path</h3>



<p><strong>Root path for webdav storage</strong></p>



<p>For example c:\surgemail\webdav</p>



<p>Syntax: g_webdav_path string</p>



<h3 class="wp-block-heading" id="g_webmail_limit">g_webmail_limit</h3>



<p><strong>Maximum number of concurrent webmail requests</strong></p>



<p>This should not generally be adjusted, it is simply a limit to prevent DOS attacks or overloading from web requests. A value of 10-300 would be reasonable. The default is 200</p>



<p>Syntax: g_webmail_limit int</p>



<h3 class="wp-block-heading" id="g_webmail_port">g_webmail_port</h3>



<p><strong>WebMail port (default 7080)</strong></p>



<p>This is the port that WebMail users should connect through (unless you want better security, then use the secure port and HTTPS protocol listed below) By default it is port 7080, but if you are not running a web server you probably want to change it or add port 80, eg:”7025,80″ so that people can get to it with a URL like this: http://your.mail.server instead of http://your.mail.server:7080. Use the keyword ‘disabled’ to disable this part of the SurgeMail service.</p>



<p>Syntax: g_webmail_port int</p>



<h3 class="wp-block-heading" id="g_webmail_save">g_webmail_save</h3>



<p><strong>Write surgehost.ini and other obsolete webmail config info</strong></p>



<p>This setting enables writing the webmail surgehost.ini file, it is not needed generally unless your users keep using the old webmail (which they shouldn’t)</p>



<p>Syntax: g_webmail_save bool</p>



<h3 class="wp-block-heading" id="g_webmail_secure_port">g_webmail_secure_port</h3>



<p><strong>WebMail secure port (default 7443)</strong></p>



<p>This is the port that WebMail users should connect through.. By default it is port 7443, but if you are not running a web server you probably want to change it or add port 443, eg:”443″ so that people can get to it with a URL like this: https://your.mail.sever Instead of https://your.mail.server:7443. Use the keyword ‘disabled’ to disable this part of the SurgeMail service.</p>



<p>Syntax: g_webmail_secure_port int</p>



<h3 class="wp-block-heading" id="g_webmail_timeout">g_webmail_timeout</h3>



<p><strong>Timeout for webmail or any cgi process (in seconds, default 360)</strong></p>



<p>If he webmail cgi fails to respond this limits how long SurgeMail will wait before killing the process.</p>



<p>Syntax: g_webmail_timeout int</p>



<h3 class="wp-block-heading" id="g_webmail_useip">g_webmail_useip</h3>



<p><strong>Use the ip address in g_webmail_port setting</strong></p>



<p>By default it will use the same url as the user connects on which is generally better.</p>



<p>Syntax: g_webmail_useip bool</p>



<h3 class="wp-block-heading" id="g_webmail_popmode">g_webmail_popmode</h3>



<p><strong>Use POP3 instead of IMAP in WebMail.</strong></p>



<p>This results in pophost being passed to webmails domain configuration file, surgehost.ini. If you change this setting you should delete surgehost.ini and run “tellmail surgehost_update” to rebuild it.</p>



<p>Syntax: g_webmail_popmode bool</p>



<h3 class="wp-block-heading" id="g_webmail_url">g_webmail_url</h3>



<p><strong>Url to the WebMail cgi</strong></p>



<p>If WebMail is not in the default place and/or is not on the SurgeMail machine then this setting tells SurgeMail where it is so links to WebMail from SurgeMail function correctly.</p>



<p>Syntax: g_webmail_url string</p>



<h3 class="wp-block-heading" id="g_webmail_urladd">g_webmail_urladd</h3>



<p><strong>Url data to append to WebMail auto-login link</strong></p>



<p>This setting allows you to specify additional information and settings which are passed to WebMail when SurgeMail links to it.</p>



<p>Syntax: g_webmail_urladd string</p>



<h3 class="wp-block-heading" id="g_webmail_workarea">g_webmail_workarea</h3>



<p><strong>Path to WebMail workarea</strong></p>



<p>If WebMail is not installed in the default location on this SurgeMail machine this setting tells SurgeMail where to find it.</p>



<p>Syntax: g_webmail_workarea string</p>



<h3 class="wp-block-heading" id="g_webmail_select_domain">g_webmail_select_domain</h3>



<p><strong>Send select_domain instead of host in webmail autologins</strong></p>



<p>Recommended. This uses the select_domain method of auto-logins with WebMail, it often works where the old method fails.</p>



<p>Syntax: g_webmail_select_domain bool</p>



<h3 class="wp-block-heading" id="g_webmail_secret">g_webmail_secret</h3>



<p><strong>Secret string used by webmail when sending the ip address of connecting users</strong></p>



<p>This is used with webmail when you want surgemail access rules to apply to webmail users, webmail has a matching setting which makes it pass the ip address through</p>



<p>Syntax: g_webmail_secret string</p>



<h3 class="wp-block-heading" id="g_web_hide_source_names">g_web_hide_source_names</h3>



<p><strong>Hide the name of the source template page in output web pages.</strong></p>



<p>To aid tailoring each web page in the web admin shows it’s own address so you can find it to modify it. Some admins consider this a security issue, or just a bit ugly, so use this setting to hide this information when you don’t need it.</p>



<p>Syntax: g_web_hide_source_names bool</p>



<h3 class="wp-block-heading" id="g_web_force_doctype_first_disable">g_web_force_doctype_first_disable</h3>



<p><strong>Disable webserver behaviour to force doctype definitions to be displayed first.</strong></p>



<p>Comments displayed on the webpages (including template filenames), mean IE does not use the doctype definiton. Surgemail tries to display doctype first. This setting reverts to old behaviour.</p>



<p>Syntax: g_web_force_doctype_first_disable bool</p>



<h3 class="wp-block-heading" id="g_web_ref_path_extension">g_web_ref_path_extension</h3>



<p><strong>Path extension to add to web page image/css references.</strong></p>



<p>This setting is used for caching purposes. See&nbsp;<a href="https://surgemail.com/knowledge-base/global-settings-misc-p-z/templates.htm#caching">SurgeMail template caching</a>&nbsp;for details</p>



<p>Syntax: g_web_ref_path_extension string</p>



<h3 class="wp-block-heading" id="g_work">g_work</h3>



<p><strong>Workarea Path</strong></p>



<p>Work area for SurgeMail temporary work files.</p>



<p>Syntax: g_work string</p>



<h3 class="wp-block-heading" id="g_web_url_path">g_web_url_path</h3>



<p><strong>Url to path translation with access specifier</strong></p>



<p>This lets you set up aliases and translations of urls partly based on the access rights of the user.</p>



<p>Syntax: g_web_url_path url=string path=string access=string</p>



<h3 class="wp-block-heading" id="g_web_title">g_web_title</h3>



<p><strong>Title to use on specified web page</strong></p>



<p>This lets you customize the title of each management web page.</p>



<p>Syntax: g_web_title page=string title=string</p>



<h3 class="wp-block-heading" id="g_web_utf8">g_web_utf8</h3>



<p><strong>Make sure all user.cgi handling is done in UTF8</strong></p>



<p>Make sure user.cgi handlign is all done in UTF8 rather than paged character sets.</p>



<p>Syntax: g_web_utf8 bool</p>



<h3 class="wp-block-heading" id="g_web_appsroot">g_web_appsroot</h3>



<p><strong>Apply apps interface at web root ie /</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_web_appsroot bool</p>



<h3 class="wp-block-heading" id="g_web_appsname">g_web_appsname</h3>



<p><strong>Apps url name on unified web interface</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_web_appsname string</p>



<h3 class="wp-block-heading" id="g_winmail_fix">g_winmail_fix</h3>



<p><strong>Replace winmail.dat with normal attachments, requires tnef installed first http://netwinsite.com/tnef.htm</strong></p>



<p>First install tnef, on unix use: apt-get install tnef, on windows download tnef.exe from our website</p>



<p>Syntax: g_winmail_fix bool</p>



<h3 class="wp-block-heading" id="g_autologin_newlogic">g_autologin_newlogic</h3>



<p><strong>Streamlined logic for surgeweb to user.cgi autologin handover</strong></p>



<p>Improved logic for user.cgi autologin url generation. Notably affects proxy mode, frontend-backend configurations, and whether ssl is used.</p>



<p>Syntax: g_autologin_newlogic bool</p>



<h3 class="wp-block-heading" id="g_surgeweb_disable">g_surgeweb_disable</h3>



<p><strong>Disable access to SurgeWeb</strong></p>



<p>Completely disable surgeweb access for whatever reason.</p>



<p>Syntax: g_surgeweb_disable bool</p>



<h3 class="wp-block-heading" id="g_surgeweb_work">g_surgeweb_work</h3>



<p><strong>Path to Surgeweb cache/work files</strong></p>



<p>This is where Surgeweb stores it’s temporary or working files, default I_G_HOME\surgeweb\work</p>



<p>Syntax: g_surgeweb_work string</p>



<h3 class="wp-block-heading" id="g_surgeweb_backend_server">g_surgeweb_backend_server</h3>



<p><strong>Backend machine to connect to</strong></p>



<p>This specifies the backend machine where Surgeweb connects for email and to store user settings. Surgeweb will cache data here but store the master copy of anything on the backend machine.</p>



<p>Syntax: g_surgeweb_backend_server string</p>



<h3 class="wp-block-heading" id="g_surgeweb_backend_web">g_surgeweb_backend_web</h3>



<p><strong>Backend machine to connect to</strong></p>



<p>This specifies the internet resolvable hostnaem or url for all user.cgi access connected to a backend server eg. myserver.com or https://myserver.com:7443</p>



<p>Syntax: g_surgeweb_backend_web string</p>



<h3 class="wp-block-heading" id="g_surgeweb_benchmark">g_surgeweb_benchmark</h3>



<p><strong>Log web request timing info for surgeweb benchmarking – matches ip addresses</strong></p>



<p>Netwin testing use only</p>



<p>Syntax: g_surgeweb_benchmark string</p>



<h3 class="wp-block-heading" id="g_surgeweb_debug">g_surgeweb_debug</h3>



<p><strong>Log surgeweb debug info – matches ip addresses or email addresses – avoid</strong></p>



<p>Note this setting should be used minimally as it affects performance</p>



<p>Syntax: g_surgeweb_debug string</p>



<h3 class="wp-block-heading" id="g_surgeweb_logall">g_surgeweb_logall</h3>



<p><strong>For requests matching g_surgeweb_debug also leave all webio &amp; temp files – avoid</strong></p>



<p>Netwin testing use only</p>



<p>Syntax: g_surgeweb_logall bool</p>



<h3 class="wp-block-heading" id="g_surgeweb_restrict">g_surgeweb_restrict</h3>



<p><strong>Restrict surgeweb use to these accounts only</strong></p>



<p>Allow surgeweb access to a matching set of email addresses</p>



<p>Syntax: g_surgeweb_restrict string</p>



<h3 class="wp-block-heading" id="g_surgeweb_idle_timeout">g_surgeweb_idle_timeout</h3>



<p><strong>Idle timeout for surgeweb sessions (hours, default=48)</strong></p>



<p>If no manual action is taken during this time the surgeweb session gets logged out</p>



<p>Syntax: g_surgeweb_idle_timeout int</p>



<h3 class="wp-block-heading" id="g_surgeweb_remember_timeout">g_surgeweb_remember_timeout</h3>



<p><strong>“Remember” timeout / max session length for surgeweb sessions (days, default=14)</strong></p>



<p>Maximum time for Remember me and for single sessions</p>



<p>Syntax: g_surgeweb_remember_timeout int</p>



<h3 class="wp-block-heading" id="g_surgeweb_cache_less">g_surgeweb_cache_less</h3>



<p><strong>Reduce surgeweb caching</strong></p>



<p>Reduce the length of time that surgeweb caches message bodies in its g_surgeweb_work folder to save disk space usage</p>



<p>Syntax: g_surgeweb_cache_less bool</p>



<h3 class="wp-block-heading" id="g_surgeweb_path">g_surgeweb_path</h3>



<p><strong>Change surgeweb path</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_surgeweb_path string</p>



<h3 class="wp-block-heading" id="g_surgeweb_process">g_surgeweb_process</h3>



<p><strong>Run surgeweb in it’s own process (beta)</strong></p>



<p>Intended to increase resilience</p>



<p>Syntax: g_surgeweb_process bool</p>



<h3 class="wp-block-heading" id="g_surgeweb_testing">g_surgeweb_testing</h3>



<p><strong>NEVER USE</strong></p>



<p>Not for general use</p>



<p>Syntax: g_surgeweb_testing bool</p>



<h3 class="wp-block-heading" id="g_surgeweb_ics">g_surgeweb_ics</h3>



<p><strong>Surgeweb email/calendaring integration (ie ics file processing and sending)</strong></p>



<p>Enable surgeweb ICS handling smarts to allow calender invites to be replied to and to allow calender invites to be sent</p>



<p>Syntax: g_surgeweb_ics bool</p>



<h3 class="wp-block-heading" id="g_surgeweb_forgot_show">g_surgeweb_forgot_show</h3>



<p><strong>Show forgot password link on surgeweb login page</strong></p>



<p>Default for forgot password link visibility on surgeweb login page. (note: gets overidden by older showlink_forget_pass surgeweb setting)</p>



<p>Syntax: g_surgeweb_forgot_show bool</p>



<h3 class="wp-block-heading" id="g_surgeweb_testrig">g_surgeweb_testrig</h3>



<p><strong>Disable session cache for testrig</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_surgeweb_testrig bool</p>



<h3 class="wp-block-heading" id="g_xauthuser_hide">g_xauthuser_hide</h3>



<p><strong>Hide X-Authenticated-User header</strong></p>



<p>The header X-Authenticated-User is added to all local deliveries for users that login using SMTP authentication. This is the most reliable way to determine who actually sent this email. This setting will disable the addition of this header.</p>



<p>Syntax: g_xauthuser_hide bool</p>



<h3 class="wp-block-heading" id="g_xrcptoriginal_hide">g_xrcptoriginal_hide</h3>



<p><strong>Hide X-Rcpt-Original header</strong></p>



<p>The X-Rcpt header is added indicating which local account this message was delivered to. If the mail has been redirected for any reason the original delivery address is added as an X-Rcpt-Original header. This setting will disable the addition of this header.</p>



<p>Syntax: g_xrcptoriginal_hide bool</p>



<h3 class="wp-block-heading" id="g_xrcpt_hide">g_xrcpt_hide</h3>



<p><strong>Hide X-Rcpt header</strong></p>



<p>The X-Rcpt header is added indicating which local account this message was delivered to. This setting will disable the addition of this header.</p>



<p>Syntax: g_xrcpt_hide bool</p>



<h3 class="wp-block-heading" id="g_xserver_hide">g_xserver_hide</h3>



<p><strong>Hide XServer header</strong></p>



<p>This wil hide the X-Server header.</p>



<h3 class="wp-block-heading" id="g_sched_utoken_timeout">g_sched_utoken_timeout</h3>



<p><strong>Timeout for sched utokens in minutes</strong></p>



<p>Timeout for sched utokens in minutes.</p>



<p>Syntax: g_sched_utoken_timeout int</p>



<h3 class="wp-block-heading" id="g_xfile_allow">g_xfile_allow</h3>



<p><strong>IP address to allow xfile and WebMail features from</strong></p>



<p>Allow xfile &amp; web upload features for users. Set to ‘*’ or the WebMail servers IP address.</p>



<p>Syntax: g_xfile_allow string</p>



<h3 class="wp-block-heading" id="g_deliver_robot">g_deliver_robot</h3>



<p><strong>Robot/Script to run at delivery time $FILE$ AND $TO$ parameters</strong></p>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_deliver_robot string</p>



<h3 class="wp-block-heading" id="g_disable_surgeplus">g_disable_surgeplus</h3>



<p><strong>Disable SurgePlus Calendar and File Sharing client</strong></p>



<p>Disable users from logging in using the SurgePlus Calendar and File Sharing client. See&nbsp;<a href="surgeplus.htm">SurgePlus</a></p>



<p>Syntax: g_disable_surgeplus bool</p>



<h3 class="wp-block-heading" id="g_surgeplus_links">g_surgeplus_links</h3>



<p><strong>Add web links to SurgePlus from other web interfaces (and vice versa) for users allowed to use SurgePlus.</strong></p>



<p>This causes links to appear in the SurgePlus interface to switch to using WebMail (and DBabble if you have the g_dbabble_links setting on).</p>



<p>Syntax: g_surgeplus_links bool</p>



<h3 class="wp-block-heading" id="g_disable_surgeplus_updates">g_disable_surgeplus_updates</h3>



<p><strong>Disable automated downloading of new versions of SurgePlus client from netwinsite.com</strong></p>



<p>New versions of the SurgePlus client are automatically downloaded from netwinsite.com and made available for download form your server by your users. See&nbsp;<a href="surgeplus.htm">SurgePlus</a></p>



<p>Syntax: g_disable_surgeplus_updates bool</p>



<h3 class="wp-block-heading" id="g_surgeplus_log_level">g_surgeplus_log_level</h3>



<p><strong>SurgePlus log level. ‘none’, ‘info’, or ‘debug’. Default is ‘info’</strong></p>



<p>Sets the amount of logging done for SurgePlus. When using ‘debug’ level, data is logged to surgeplusd.log in addition to surgeplus.log</p>



<p>Syntax: g_surgeplus_log_level string</p>



<p>Example: debug</p>



<h3 class="wp-block-heading" id="g_surgeplus_port">g_surgeplus_port</h3>



<p><strong>s-port-g-surgeplus-secure-port-surgeplus-port-and-surgeplus-secure-port" &gt;</strong></p>



<p>SurgePlus uses the POP protocol to communicate with SurgeMail. However, some virus scanners running on the clients machine prevent the SurgePlus client from using POP commands that the virus scanner does not know about. In order to avoid this problem, SurgePlus uses port 7110 by default instead of port 110. However, clients not using a virus scanner (or clients using some virus scanners we have made SurgePlus work with – e.g. Norton) can safely use port 110 if they would otherwise be prevented from connecting to SurgeMail by a firewall. The SurgePlus client will quietly switch to using port 110 if it is not able to connect to the server using port 7110.</p>



<p>Syntax: g_surgeplus_secure_port int</p>



<h3 class="wp-block-heading" id="g_surgeplus_web_port">g_surgeplus_web_port</h3>



<p><strong>SurgePlus web port.</strong></p>



<p>If you want your SurgePlus users to view shared files over a different port than WebMail uses give this setting a value.</p>



<p>Syntax: g_surgeplus_web_port int</p>



<h3 class="wp-block-heading" id="g_surgeplus_web_url">g_surgeplus_web_url</h3>



<p><strong>Direct SurgePlus users to access shared files at this url</strong></p>



<p>Use this to override the default location that users are directed to to view shared SurgePlus web files. If you don’t specify a value for this setting then it defaults to using the non-secure webmail port.</p>



<p>Syntax: g_surgeplus_web_url string</p>



<p>Example: https://||domain||:7443</p>



<h3 class="wp-block-heading" id="g_surgeplus_hide_client_downloads">g_surgeplus_hide_client_downloads</h3>



<p><strong>Hide the links to download and install SurgePlus Windows client</strong></p>



<p>Use this setting if you don’t want your users to know about the SurgePlus Windows client. All this setting does is to hide the download links from the web interface.</p>



<p>Syntax: g_surgeplus_hide_client_downloads bool</p>



<h3 class="wp-block-heading" id="g_surgeplus_pop_server_name">g_surgeplus_pop_server_name</h3>



<p><strong>Default pop server to set SurgePlus client download to connect to.</strong></p>



<p>SurgePlus Windows client downloads are set to connect to this POP server by default. This setting only applies if the user is downloading the client from a URL that does not match a valid domain on the server. If the URL does match a domain on the server, the domain specific version of this setting applies instead.</p>



<p>Syntax: g_surgeplus_pop_server_name string</p>



<h3 class="wp-block-heading" id="g_surgeplus_smtp_server_name">g_surgeplus_smtp_server_name</h3>



<p><strong>Default smtp server to set SurgePlus client download to connect to.</strong></p>



<p>SurgePlus Windows client downloads are set to connect to this SMTP server by default. This setting only applies if the user is downloading the client from a URL that does not match a valid domain on the server. If the URL does match a domain on the server, the domain specific version of this setting applies instead.</p>



<p>Syntax: g_surgeplus_smtp_server_name string</p>



<h3 class="wp-block-heading" id="g_surgeplus_delay_tell_upgrade">g_surgeplus_delay_tell_upgrade</h3>



<p><strong>Delay informing existing users about new SurgePlus versions for</strong></p>



<p>Delay informing existing users about new versions of SurgePlus for this long after the new version is downloaded to your server. SurgePlus clients poll the server once an hour so they won’t be informed about the new version for up to an hour longer than the value of this setting. Use this setting combined with the g_surgeplus_delay_tell_upgrade_exempt setting so that only administrator users are informed about new versions at first so you can confirm the new version works fine with your existing server configuration before everyone upgrades. Example values: “3 hours” or “2 days”</p>



<p>Syntax: g_surgeplus_delay_tell_upgrade string</p>



<h3 class="wp-block-heading" id="g_surgeplus_delay_tell_upgrade_exempt">g_surgeplus_delay_tell_upgrade_exempt</h3>



<p><strong>Users exempt from delayed new version informing</strong></p>



<p>See the above setting for information. Example value: “user1@domain.name,user2@domain.name”</p>



<p>Syntax: g_surgeplus_delay_tell_upgrade_exempt string</p>



<h3 class="wp-block-heading" id="g_surgeplus_online">g_surgeplus_online</h3>



<p><strong>Enable online tracking in surgeplus</strong></p>



<p>Not recommended.</p>



<p>Syntax: g_surgeplus_online bool</p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/allglobal/">All Global Settings</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Global settings g_spam</title>
		<link>https://surgemail.com/knowledge-base/global-settings-g_spam/</link>
		
		<dc:creator><![CDATA[chrisp]]></dc:creator>
		<pubDate>Fri, 09 Apr 2021 03:46:15 +0000</pubDate>
				<guid isPermaLink="false">https://surgemail.com/?post_type=ht_kb&#038;p=3976</guid>

					<description><![CDATA[<p>g_spam_allow - IP wild card of sites to exempt from spam limits Typically use this to allow known mailing list servers that use your system to send messages in without being tarpitted. e.g. "127.0.0.1,local.ip.number". This same setting is an exception to the other spam rules.&#160; Syntax: g_spam_allow string g_spam_allow_disable - Disable allow bounce messages Normally<br /><a class="moretag" href="https://surgemail.com/knowledge-base/global-settings-g_spam/">+ Read More</a></p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/global-settings-g_spam/">Global settings g_spam</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading">g_spam_allow - IP wild card of sites to exempt from spam limits</h3>



<p>Typically use this to allow known mailing list servers that use your system to send messages in without being tarpitted. e.g. "127.0.0.1,local.ip.number". This same setting is an exception to the other spam rules.&nbsp;</p>



<p>Syntax: g_spam_allow string</p>



<h3 class="wp-block-heading">g_spam_allow_disable - Disable allow bounce messages</h3>



<p>Normally when SurgeMail detects an SPF failure it will give the sending an opportunity to send an email to a special address, If the sender does this then their IP address is permitted in future, this saves a lot of hassle generally, in rare situations you may not want this system, this setting will just simply bounce the message instead.</p>



<p>Syntax: g_spam_allow_disable bool</p>



<h3 class="wp-block-heading">g_spam_allow_rbl - Give unblock message to RBL bounces too</h3>



<p>This setting extends the 'allow' email system used by SPF to the RBL style of failures. This makes it much safer to use RBL lists is block mode instead of stamping mode. You really must have g_spam_block enabled for this setting to work, otherwise the 'allow' mechanism lets everything through so this becomes pointless <img src="https://s.w.org/images/core/emoji/15.0.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<p>Syntax: g_spam_allow_rbl bool</p>



<h3 class="wp-block-heading">g_spam_allow_rdns - Trust ip name for spam checking, not recommended</h3>



<p>Spammers can trivially forge a reverse dns name, so it's very unwise to use it for bypassing spam checking except for rare/local domain names that spammers won't know to use</p>



<p>Syntax: g_spam_allow_rdns bool</p>



<h3 class="wp-block-heading">g_spam_allow_msg - Template for unblock messages, use ||reason|| and ||allow|| and maybe a url</h3>



<p>This lets you tailor the 'allow' bounce message given to incoming messages that fail the SPF checks. ||reason|| becomes the reason for the failure and ||allow|| is either the allow email to send to, or a link to use (if using g_spf_byweb "TRUE").</p>



<p>Syntax: g_spam_allow_msg string</p>



<p>Example: g_spam_allow_msg "||reason||, to fix send an email to ||allow|| then resend original email."</p>



<h3 class="wp-block-heading">g_spam_block_msg - Template for spf blocked message if allow is disabled</h3>



<p>This error is given for SPF failures when the allow system is disabled. You are probably looking for the setting g_spam_allow_msg, as it is the one that is normally used when a user is 'blocked' by spf.</p>



<p>Syntax: g_spam_block_msg string</p>



<h3 class="wp-block-heading">g_spam_allow_known - Unblock IP address if we have received messages from it for 3 days (so it's not a transient spammer)</h3>



<p>This setting makes the SPF strict settings much softer, basically it says any IP address we've known about for 3 days, is considered safe. This will still stop most spammers, particularly when used in combination with RBL lists which will block the 'repeat' offenders.</p>



<p>Syntax: g_spam_allow_known bool</p>



<h3 class="wp-block-heading">g_spam_allow_recent - Exempt recent POP from spam limits</h3>



<p>Skip spam rules if recent POP IP number (see g_relay_window).&nbsp;</p>



<p>Syntax: g_spam_allow_recent bool</p>



<h3 class="wp-block-heading">g_spam_autotrain - Autotrain "good" filter</h3>



<p>Auto train spam filter good messages based on first 1,000 outgoing emails.</p>



<p>Syntax: g_spam_autotrain bool</p>



<h3 class="wp-block-heading">g_spam_block - Block spam (as decided by spf etc), if not set then user or domain can set</h3>



<p>This setting is critical, without it, all the spam is let through to the user, with it set to true, 95% of spam is blocked before it enters your server. So, generally you want this turned on, it should result in very few false positives as messages are 'grey list' bounced.</p>



<p>Syntax: g_spam_block bool</p>



<h3 class="wp-block-heading">g_spam_block_gateway - Block spam gatewayed messages too</h3>



<p>Use this setting on incoming mail servers or servers that relay to servers that implement SPF. Without this SPF blocking will not work as the back end server cannot perform the SPF checks/blocking.</p>



<p>Syntax: g_spam_block_gateway bool</p>



<h3 class="wp-block-heading">g_spam_check_auth - Enable spam rules for authenticated users</h3>



<p>Normally authenticated users are exempt from spam rules when sending mail. This enables all spam checking rules for authenticated users.</p>



<p>Syntax: g_spam_check_auth bool</p>



<h3 class="wp-block-heading">g_spam_content_disable - Disable aspam_content.txt rules</h3>



<p>The file aspam_content.txt is fetched from netwinsite and used to identify certain common spam messages based on content. Each line in the file gives a list of words or phrases, if most of the words are found, then the rule matches. You can add your own rules to aspam_content_local.txt. In a message that matches a rule you will see in the spamdetect header, Content: cid=NNN cid=NNN, you can then match the NNN with the unique id of each rule in aspam_content.txt</p>



<p>Syntax: g_spam_content_disable bool</p>



<h3 class="wp-block-heading">g_spam_body - Add SpamDetect header in body</h3>



<p>If spamdetect score is above this, add spamdetect header at top of message body (in addition to the header). This allows mail clients that are not able to filter mail based on headers to filter out spam email. This can be set on a per user basis too. A value of 3 or 4 would be reasonable. The only real reason for this setting is some common mail clients are unable to scan non standard headers so cannot automatically file spam in a folder unless this is used. My recommendation is for such users to use the web interface to set actions individually.</p>



<p>Syntax: g_spam_body int</p>



<h3 class="wp-block-heading">g_spam_body_url - Text part of info to add to body, usually a url to your site</h3>



<p>On this page you should explain to your users why this tag was added to their message, and how they can adjust their spam settings etc.</p>



<p>Syntax: g_spam_body_url string</p>



<h3 class="wp-block-heading">g_spam_body_more - Add more info to spam body (ip address, ptr address, reply to and bounce address)</h3>



<p>This can help the user decide if the message really is spam</p>



<p>Syntax: g_spam_body_more bool</p>



<h3 class="wp-block-heading">g_spam_folders - Train on any message dropped into the relevant folders</h3>



<p>This allows a user to create two folders '-Train Is Spam-' and '-Train Not Spam-' and then run the aspam training mechanism by dropping messages into those folders, items are expired ffrom train is spam folder after 30 days if G_EXPIRE_TRASH is TRUE</p>



<p>Syntax: g_spam_folders bool</p>



<h3 class="wp-block-heading">g_spam_folders_show - List the special folders for all users</h3>



<p>Without this setting the user must create the folder name correctly for training to work from imap folders</p>



<p>Syntax: g_spam_folders_show bool</p>



<h3 class="wp-block-heading">g_spam_flag - Add X-SPAM-FLAG: Yes header if smite score is above this level</h3>



<p>Some filters and servers like to see this header, a good value for this might be 7. Valid range would be 1-15, with 1 marking almost everything as spam, and 15 marking almost nothing.</p>



<p>Syntax: g_spam_flag int</p>



<h3 class="wp-block-heading">g_spam_from_blacklist - Fetch list of bad domains to reject email from - not recommended</h3>



<p>This feature fetches the file http://www.sa-blacklist.stearns.org/sa-blacklist/sa-blacklist.current and then uses it efficiently to block senders, it is a huge file (26mb). Not currently recommended, we don't think the hit rate of this filter method is high enough to be useful. url used is http://www.sa-blacklist.stearns.org/sa-blacklist/sa-blacklist.current</p>



<p>Syntax: g_spam_from_blacklist string</p>



<h3 class="wp-block-heading">g_spam_grey - OBSOLETE DO NOT USE, Enable old greylisting for spf mechanism</h3>



<p>The grey listing mechanism relies on the principle that spammers are not using real mail servers but using dumb robots that won't 'retry'. So if all incoming messages are asked to 'retry' then the spam will not be received but the non spam will get in eventually. This does create a delay on all incoming mail, and may stop some stupid mail servers from successfully delivering. I would tend not to use this setting myself.</p>



<p>Syntax: g_spam_grey bool</p>



<h3 class="wp-block-heading">g_spam_grey_classc - Apply grey listing to x.x.x.*</h3>



<p>In theory this broadens slightly what grey listing will accept.</p>



<p>Syntax: g_spam_grey_classc bool</p>



<h3 class="wp-block-heading">g_spam_grey_dflt - Enable greylisting for spf default accept events (not recommended)</h3>



<p>If a message is going to be accepted due to the spf default rule (so there was no real spf record), then this comes into play. If the message is not from a trusted person, or a domain that we have previously checked using grey listings. Then the message is bounced. If the sender then tries again to send the same message (from/to pair) within a few hours, but not within 1 minute, then that ip address is marked as 'good' and future messages from them are accepted. This setting will result in some real email bouncing but slightly reduce spam, we no longer recommend this setting.</p>



<p>Syntax: g_spam_grey_dflt bool</p>



<h3 class="wp-block-heading">g_spam_grey_dflt_bad - Enable greylisting instead of allow in some cases (recommended for block or strict)</h3>



<p>This setting enables grey listing for spf default failure events only, and only if it's the first message from that ip address if more arrive before the grey listing succeeds then allow bounces are sent instead</p>



<p>Syntax: g_spam_grey_dflt_bad bool</p>



<h3 class="wp-block-heading">g_spam_grey_verify - Skip grey listing if host was not listening</h3>



<p>Skips the grey listing if the host didn't resond to the g_smtp_verify probe for g_spam_grey_dflt_bad</p>



<p>Syntax: g_spam_grey_verify bool</p>



<h3 class="wp-block-heading">g_spam_grey_size - Size of grey listing table, default is 3000</h3>



<p>On busy servers set this to a larger figure, e.g. 9000 so it can remember more grey listing events</p>



<p>Syntax: g_spam_grey_size int</p>



<h3 class="wp-block-heading">g_spam_grey_bounce - Bounce if message was allowed due to grey listing, and spam score is above this, default 8 (was 4)</h3>



<p>Since messages which are allowed in due to grey listing generally can't accept friends bounces (as the sender is unverified) it's important to bounce them with an allow message instead if they look like spam</p>



<p>Syntax: g_spam_grey_bounce string</p>



<h3 class="wp-block-heading">g_spam_grey_window - Window to block bad messages, typically 60 seconds</h3>



<p>This prevents a fast retry by a stupid robot, some robots now wait 5-6 minutes but some mail servers may retry that fast too <img src="https://s.w.org/images/core/emoji/15.0.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<p>Syntax: g_spam_grey_window int</p>



<h3 class="wp-block-heading">g_spam_grey_nofive - Skip 5-6 minute black window for these domains</h3>



<p>Use this for domains that retry at 5 minute intervals, e.g. (*@cs.com,*@xyz.com), this skips a test used to detect a particularly virrulent spammer who uses a robot that retries at exactly 5 minute intervals</p>



<p>Syntax: g_spam_grey_nofive string</p>



<h3 class="wp-block-heading">g_spam_grey_nseen - Number of messages from an unknown host, default is 6</h3>



<p>When a host is unknown if it sends more than this many messages before the grey listing resend occurs then it's considered to be a spammer.</p>



<p>Syntax: g_spam_grey_nseen int</p>



<h3 class="wp-block-heading">g_spam_grey_nohard - Avoid hard spf bounces always try and do a grey list instead</h3>



<p>This avoids the hard bounce you would normally get for failed real spf records.</p>



<p>Syntax: g_spam_grey_nohard bool</p>



<h3 class="wp-block-heading">g_spam_nolang - Don't add header with a guess at body language</h3>



<p>This adds a header which makes a best guess at the contents of the message, it should not be assumed to be 100 percent reliable! Also note that empty messages or messages containing only images may be classified as 'Unknown (English)'</p>



<p>Syntax: g_spam_nolang bool</p>



<h3 class="wp-block-heading">g_spam_phrase - Enable auto spam phrase filter</h3>



<p>Enables a Bayesian word and phrase filter to enhance spam filtering. The filter auto trains based on the train folders each night</p>



<p>Syntax: g_spam_phrase bool</p>



<h3 class="wp-block-heading">g_spam_probe_enable - Probe suspect urls to find spammers - can cause RBL</h3>



<p>This setting searches email messagse from dodgy/unknown sources for urls, then looks at the page those urls refer to to see if those pages in turn point to a listed SURBL. Only domains matching a specific list of rules are scanned so there is almost no risk of this feature clicking on a page that might do something bad.</p>



<p>Syntax: g_spam_probe_enable bool</p>



<h3 class="wp-block-heading">g_spam_probe_unknown - Probe any unknown url (dangerous)</h3>



<p>This setting increases the remote chance of probing a web page that might have some action (like a confirmation signup request, unsubscribe etc...), in practice there are a bunch of tests we perform so it would be most unusual for this problem to occur but it's safer not to use this option.</p>



<p>Syntax: g_spam_probe_unknown bool</p>



<h3 class="wp-block-heading">g_spam_probe_more - Probe even if email is from a known ip address</h3>



<p>Generally not advised</p>



<p>Syntax: g_spam_probe_more bool</p>



<h3 class="wp-block-heading">g_spam_probe_friends - Probe even if email is from a friend</h3>



<p>Generally not advised</p>



<p>Syntax: g_spam_probe_friends bool</p>



<h3 class="wp-block-heading">g_spam_probe_whois - Do whois lookups on web pages found in probe</h3>



<p>Some spammers register new domains each day, this probe checks the whois data to find if the new web site is owned by a known spammer</p>



<p>Syntax: g_spam_probe_whois bool</p>



<h3 class="wp-block-heading">g_spam_subject - Modify message subject line based on spam rating</h3>



<p>If spamdetect score is above this add spam rating Spam:**** to subject.</p>



<p>Syntax: g_spam_subject int</p>



<h3 class="wp-block-heading">g_spam_subject_dom - Destination domains to tag subject for</h3>



<p>Note that g_spam_subject_gateway and G_SMITE_GATEWAY or G_SMITE_ALL must also be set to true for this to work. If this setting is blank then all gatewayed domains would get tagged. Tagging won't occur if the message is not sent through a g_gateway rule or redirect rule</p>



<p>Syntax: g_spam_subject_dom string</p>



<h3 class="wp-block-heading">g_spam_subject_gateway - Modify message subject lime based on spam rating for gatewayed messages</h3>



<p>If true then spam_subject setting applies to gatewayed messages too</p>



<p>Syntax: g_spam_subject_gateway bool</p>



<h3 class="wp-block-heading">g_spam_subject_word - Allow arbitrary modification of message subject line</h3>



<p>This is a string that is prefixed to the subject of incoming mail caught by g_spam_subject. You can use ||score|| and ||stars|| which will contain the actual spam rating. Good examples might be: "[SPAM]" or "SPAM(||score||), "</p>



<p>Syntax: g_spam_subject_word string</p>



<h3 class="wp-block-heading">g_spam_userconfig - Enable per user spam settings</h3>



<p>Allow users to opt in / out of specific anti spam features. If this is enabled this will add a "Spam" button on the users account self management pages.</p>



<p>The most useful antispam feature is that user's mail that is suspected spam, can be stored on the server so that these messages do not need to be downloaded to your normail email client over what could well be a low bandwidth connection.</p>



<p>Syntax: g_spam_userconfig bool</p>



<h3 class="wp-block-heading">g_spam_user_max - Max messages for authenticated users</h3>



<p>Max messages an authenticated user can send per 30 minutes, eg: 5000</p>



<p>Syntax: g_spam_user_max int</p>



<h3 class="wp-block-heading">g_spam_user_warn - Alert user when they send this many messages in one day, .8 to alert at 80% of max</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_spam_user_warn string</p>



<h3 class="wp-block-heading">g_spam_user_warn_msg - Message when user approaches send limit</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_spam_user_warn_msg string</p>



<h3 class="wp-block-heading">g_spam_user_badto - Max bad recipients from authenticated user per 30 minutes, e.g. 50</h3>



<p>Whitelist using G_SPAM_USER_SKIP, limits bad recipients for an authenticated user, if exceeded then sending is paused for 30 minutes.&nbsp; A value of 50 might be reasonable as normal users would never exceed that.&nbsp; A value as low as 10 might be workable.&nbsp; Whitelist accounts using: G_SPAM_USER_SKIP. An email is sent to the manager account when this limit is hit</p>



<p>Syntax: g_spam_user_badto int</p>



<h3 class="wp-block-heading">g_spam_from_max - Max outgoing messages per ipaddress/return path pair, 30 minutes, e.g. 5000</h3>



<p>This limit is useful where a local machine is sending on behalf of many users without authentication and you want to limit potential abuse</p>



<p>Syntax: g_spam_from_max int</p>



<h3 class="wp-block-heading">g_spam_user_skip - Users to skip g_spam_user_max limit for</h3>



<p>Set this for special known users who send lots of email</p>



<p>Syntax: g_spam_user_skip string</p>



<h3 class="wp-block-heading">g_spam_bounce - Bounce local delivery based on spamdetect score</h3>



<p>If spamdetect score (number of '*'s) is above this, bounce message if local delivery. 14 is a reasonable value, never set below 10.</p>



<p>Syntax: g_spam_bounce int</p>



<h3 class="wp-block-heading">g_spam_bounce_store - If true store rejected spam in Spam_Rejected folder</h3>



<p>This setting enables rejected spam to be saved in the spam_rejected folder, this makes it safe to use the spam rejection level again.</p>



<p>Syntax: g_spam_bounce_store bool</p>



<h3 class="wp-block-heading">g_spam_bounce_text - Error text when message is bounced due to g_spam_bounce setting</h3>



<p>As per description. Default is: "554 Failure Message looks like spam, sorry not wanted here q=311", where q is the message queue id.</p>



<p>Syntax: g_spam_bounce_text string</p>



<h3 class="wp-block-heading">g_spam_bounce_all - Bounce local and remote delivery based on spamdetect score</h3>



<p>If spamdetect score (number of '*'s) is above this, bounce message, this applies to all messages regardless of user settings. e.g. 7 or 8 would be reasonable, 3 would be very strict, and less than 3 would certainly bounce real emails. I recommend you don't set this below 5. This rule is applied as soon as the message is submitted, user spam settings do not override it.</p>



<p>Syntax: g_spam_bounce_all int</p>



<h3 class="wp-block-heading">g_spam_bounce_trusted - If spamdetect score is above this, bounce message if trusted (spam_allow or authenticated)</h3>



<p>Normally trusted users (spam_allow or smtp authenticated users) are never bounced due to spam content, this setting forces those users to also be checked for spam content.</p>



<p>Syntax: g_spam_bounce_trusted int</p>



<h3 class="wp-block-heading">g_spam_cmd - Command line spam checker, use $FILE$ in cmd parameters</h3>



<p>This allows you to run a simple external spam filter the return value is added as a header, X-SpamCmd: r=N, Is Spam/Not Spam, use local.rul file to translate this return value to a spam score. e.g. G_SPAM_CMD "snfrv2r3.exe xnk05x5vmipeaof7 $FILE$" if used with http://www.armresearch.com/message-sniffer/. If the program returns 0 then the words Not Spam are added, if the value is non zero then Is Spam is added, this makes filtering rules easier to add to local.rul, see http://netwinsite.com/surgemail/help/spam.htm#external</p>



<p>Syntax: g_spam_cmd string</p>



<h3 class="wp-block-heading">g_spam_cmd_if - If internal spam rating is below this number, then run external filter</h3>



<p>This allows you to only scan messages with an external filter if the message is not obviously spam</p>



<p>Syntax: g_spam_cmd_if int</p>



<h3 class="wp-block-heading">g_spam_cmd_skip - If internal spam rating is below this number, then skip external filter</h3>



<p>This allows whitelisting to work</p>



<p>Syntax: g_spam_cmd_skip int</p>



<h3 class="wp-block-heading">g_spam_cmd_reject - If external filter returns number larger than this reject</h3>



<p>Filters based on return code of external spam filter program</p>



<p>Syntax: g_spam_cmd_reject int</p>



<h3 class="wp-block-heading">g_spam_vanish - Vanish local delivery based on spamdetect score</h3>



<p>If spamdetect score (number of '*'s) is above this, vanish message if local delivery. eg: 12 would be reasonable.</p>



<p>Syntax: g_spam_vanish int</p>



<h3 class="wp-block-heading">g_spam_vanish_all - Vanish local and remote delivery based on spamdetect score</h3>



<p>If spamdetect score (number of '*'s) is above this, drop message, applies to all messages regardless of user settings. e.g. 14. This rule is applied as soon as the message is submitted, user spam settings do not override it.</p>



<p>Syntax: g_spam_vanish_all int</p>



<h3 class="wp-block-heading">g_spam_info_hide - Remove x-spamdetect-info header line</h3>



<p>Removes the x-spamdetect-info header line.</p>



<p>Syntax: g_spam_info_hide bool</p>



<h3 class="wp-block-heading">g_spam_info - Info line explaning aspam system</h3>



<p>Info line and url to explain aspam system.</p>



<p>Syntax: g_spam_info string</p>



<h3 class="wp-block-heading">g_spam_internal - Enable internal Aspam spam processing system</h3>



<p>Enable new 'internal' spam processing system, note this disables SmiteCRC too!</p>



<p>Syntax: g_spam_internal bool</p>



<h3 class="wp-block-heading">g_spam_noupdate - Disable aspam updates</h3>



<p>Disable fetch of aspam filter rules etc from netwinsite.</p>



<p>Syntax: g_spam_noupdate bool</p>



<h3 class="wp-block-heading">g_spam_notrain - Disable isspam and notspam addresses</h3>



<p>Disable isspam and notspam addresses for user training.</p>



<p>Syntax: g_spam_notrain bool</p>



<h3 class="wp-block-heading">g_spam_isspam_kind - Allow isspam from recent pop, gateway to etc</h3>



<p>Allow ASPAM training messages to (isspam) from any trusted source (e.g. any source that would be allowed to relay/send outgoing email). This setting is recommended.</p>



<p>Syntax: g_spam_isspam_kind bool</p>



<h3 class="wp-block-heading">g_spam_isspam_ignore - Don't block messages from ip addresses recorded as a spam source</h3>



<p>This bounces all email from an address recorded as a spam source until it is recorded as a 'notspam' source, the blocking message allows the sender to bypass the block.</p>



<p>Syntax: g_spam_isspam_ignore bool</p>



<h3 class="wp-block-heading">g_spam_aspam - Aspam rating</h3>



<p>Scale for Aspam default is 1.0. Valid range is zero to two.</p>



<p>The aspam matching based on it's database of known spam and non spam produces a score in the range -5 --&gt; 5. Tthe g_spam_aspam setting lets you 'scale' this score to increase/decrease the importance of the aspam rating. The result is then applied (added to) the spamdetect header.</p>



<p>Syntax: g_spam_aspam string</p>



<h3 class="wp-block-heading">g_spam_poly - Scale for poly word matching</h3>



<p>Scale for poly word matching, default is 0.1, Valid range is zero to two, Use 1.0 to enable.</p>



<p>Syntax: g_spam_poly string</p>



<h3 class="wp-block-heading">g_spam_poly_disable - Disable poly code.</h3>



<p>Disables the poly statistical scoring feature which is part of Aspam. Poly tries to analyze the frequency of word combinations in spam and not spam to identify if a message is likely to be spam or not. We don't consider the poly system to be very useful, it has two faults, it's behaviour is not 'understandable' and it is 'content based', SPF is a much superior system!</p>



<p>Syntax: g_spam_poly_disable bool</p>



<h3 class="wp-block-heading">g_spam_private - Enable private email addresses for users to avoid spam</h3>



<p>Note: The user will define these settings, after turning on this global setting the user can use the Web Self administration interface, press the 'Spam' button and the private email address is defined on that page.</p>



<p>This setting adds the ability for each user to create a private email address to bypass SPF/ Spam filters. The user would then typically increase the spam settings for their non private account to 'friends mode' and enable SPF. So only known friends will be able to contact them via the old address.</p>



<p>This allows the user to live 'spam free' without the risk of blocking email from real people.</p>



<p>The user must be careful with their new private address, it should only be used with humans, when entering an address in a web form or mailing list a special variant should be used e.g. user--from-WEBDOMAINNAME@users.domain</p>



<p>The user defines their private address, in the form user--PRIVATE@domain.com, e.g. if the users public address is joe@cool.com, and the user defines a private extension of "juggle" then the private address would be:</p>



<p>joe--juggle@cool.com</p>



<p>Email addressed to joe--juggle@cool.com is delivered without SPF or SPAM filtering / tagging.</p>



<p>In addition the user can enable 'from' matching which must look like this: username--KEYWORD-STRING@cool.com, the user specifies a keyword e.g. "match". Then anything addressed to the user in this form:</p>



<p>joe--match-STRING@cool.com</p>



<p>Will only be delivered if 'STRING' is found in the 'from' envelope address, otherwise it will bounce. So when entering an email address in a web page called "toys.com" the user would enter:</p>



<p>joe--match-toys@cool.com</p>



<p>Any -- extension that is not recognized will return a bounce suggesting they remove the extension and try again.</p>



<p>Syntax: g_spam_private bool</p>



<h3 class="wp-block-heading">g_spam_alias_any - User aliase string e.g. "++" if defined then strip suffix from emails - not advised!</h3>



<p>This allows each user an infinite number of aliases of the form user+extension@domain.name, this can cause problems so only enable with caution. Usually set to "++" but can be set to a single plus, but this will break any email address that contains a plus so not normally recommended. If used avoid defining it as a single character at least!</p>



<p>Syntax: g_spam_alias_any string</p>



<h3 class="wp-block-heading">g_spam_url - Scale for url word matching</h3>



<p>Scale for URL word matching, default is 0.3, Valid range is zero to two (recommend 1.0)</p>



<p>Syntax: g_spam_url string</p>



<h3 class="wp-block-heading">g_spam_catcher - Spam catcher addresses</h3>



<p>Addresses on web pages that shouldn't get any email (robot bait), only for use with Aspam.<br>Any email going to the specified address will be sent to the isspam address for processing and the message will also be dropped. If the message has multiple rctp's and some are valid users, but one matches the catcher address, it is not delivered to anyone. If you need to enter a lot of spam catcher addresses then the best way is to just setup a single spam catcher address and then use&nbsp;<a href="#g_redirect">g_redirect</a>&nbsp;to redirect other addresses to the spam catcher address.</p>



<p>eg<br>g_spam_catcher "johnsmith@mydomain.com"</p>



<p>Syntax: g_spam_catcher string</p>



<h3 class="wp-block-heading">g_spam_char - Character to use instead of '*' for smitespam headers (best left alone if possible)</h3>



<p>Changing this will cause no end of problems, so only do this when initially installing SurgeMail</p>



<p>Syntax: g_spam_char string</p>



<h3 class="wp-block-heading">g_spam_notspam - Spam collection address</h3>



<p>Address that non authenticated users can send non spam to.</p>



<p>Example: g_spam_notspam "notspam@domain.com"</p>



<p>Syntax: g_spam_notspam string</p>



<h3 class="wp-block-heading">g_spam_hold_keep - Spam hold timeout</h3>



<p>How many days to store users spam hold messages before deleting them.<br>Default is 14 days.<br>eg. g_spam_hold "14"</p>



<p>Syntax: g_spam_hold_keep int</p>



<h3 class="wp-block-heading">g_spam_hold_hide - Hide spam hold settings for end users and other held2pend user.cgi tweaks</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_spam_hold_hide bool</p>



<h3 class="wp-block-heading">g_spam_header_trust_ip - List of IP addresses from which to trust/accept existing X-SpamDetect headers in emails</h3>



<p>Use this setting to specify the filter machines which perform spam scanning for this machine. Use this on the filter machine, to specify itself so that mailing list messages do not get scanning/tagged twice. Ensure your users are sending messages via the filter machine.</p>



<p>Syntax: g_spam_header_trust_ip string</p>



<h3 class="wp-block-heading">g_spam_share - Use and share some spam/aspam information with central server (netwin) experimental</h3>



<p>This setting enables some features which let surgemail share information about spam and non spamming ip addresses with a central netwin server.</p>



<p>Syntax: g_spam_share bool</p>



<h3 class="wp-block-heading">g_spam_status_hour - Process all spam status messages at this time (disk io intensive)</h3>



<p>Normally the spam status emails are sent in response to incoming messages at undefined times, this allows all spam status emails to be sent at a predefined time.</p>



<p>Syntax: g_spam_status_hour int</p>



<h3 class="wp-block-heading">g_spam_status_monthly - Send monthly spam status even if no messages pending</h3>



<p>This is good to make sure all users know about their spam settings and how to change them.</p>



<p>Syntax: g_spam_status_monthly bool</p>



<h3 class="wp-block-heading">g_spam_phishing - Download list of known phishing addresses and block outgoing email to them</h3>



<p>Use this to stop your users resonding via email to a known phishing address. See http://code.google.com/p/anti-phishing-email-reply/</p>



<p>Syntax: g_spam_phishing bool</p>



<h3 class="wp-block-heading">g_spam_phishing_ok - Allow to these addresses even if phishing database blocks them</h3>



<p>Use this to stop your users resonding via email to a known phishing address. See http://code.google.com/p/anti-phishing-email-reply/</p>



<p>Syntax: g_spam_phishing_ok string</p>



<h3 class="wp-block-heading">g_spam_nobounce - Remove old user held/vanish but after 5.2 will allow bounce</h3>



<p>This removes the old spam settings that should never be used. In version 5 this disabled hold/vanish/bounce, now it only disables hold/vanish but allows 'bounce', the bounce behaviour has been made considerably safer by tuning the spam filter and changing the actual bounce to allow the sender to bypass via captcha</p>



<p>Syntax: g_spam_nobounce bool</p>



<h3 class="wp-block-heading">g_spam_black_auto - Auto blacklist for user when isspam pressed</h3>



<p>Changes blacklist handling to only place in spam folder (not auto reject) and to automatically blacklist when isspam button pressed</p>



<p>Syntax: g_spam_black_auto bool</p>



<h3 class="wp-block-heading">g_spam_black_tospam - Put blacklist matches in spam folder</h3>



<p>Place in spam rather than bouncing hard.</p>



<p>Syntax: g_spam_black_tospam bool</p>



<h3 class="wp-block-heading">g_spam_allbad - Auto blacklist from/ip/to combinations</h3>



<p>Makes blacklisting automatic</p>



<p>Syntax: g_spam_allbad bool</p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/global-settings-g_spam/">Global settings g_spam</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Global Settings Misc2</title>
		<link>https://surgemail.com/knowledge-base/global-settings-misc2/</link>
		
		<dc:creator><![CDATA[chrisp]]></dc:creator>
		<pubDate>Fri, 09 Apr 2021 03:42:02 +0000</pubDate>
				<guid isPermaLink="false">https://surgemail.com/?post_type=ht_kb&#038;p=3973</guid>

					<description><![CDATA[<p>g_apple_bug1 - Apple bug allow content-length headers This setting has no further documentation currently available Syntax: g_apple_bug1 bool g_apple_bug2 - Apple bug2 don't try and return bad if looping This setting has no further documentation currently available Syntax: g_apple_bug2 bool g_archive_on_delete_off - Disables archive and instead deletes the files immediately Purged monthly or by tellmail<br /><a class="moretag" href="https://surgemail.com/knowledge-base/global-settings-misc2/">+ Read More</a></p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/global-settings-misc2/">Global Settings Misc2</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading">g_apple_bug1 - Apple bug allow content-length headers</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_apple_bug1 bool</p>



<h3 class="wp-block-heading">g_apple_bug2 - Apple bug2 don't try and return bad if looping</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_apple_bug2 bool</p>



<h3 class="wp-block-heading">g_archive_on_delete_off - Disables archive and instead deletes the files immediately</h3>



<p>Purged monthly or by tellmail purge_deleted_users</p>



<p>Syntax: g_archive_on_delete_off bool</p>



<h3 class="wp-block-heading">g_atrest_api - Enabe api for enabling atrest encryption - not needed</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_atrest_api bool</p>



<h3 class="wp-block-heading">g_calendar_version - CalDAV / SabreDAV calendaring configuration version number</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_calendar_version int</p>



<h3 class="wp-block-heading">g_pass_twofactor_life - Session life in minutes, dflt 4 hours</h3>



<p>Allow users to enable two factor authentication.</p>



<p>Syntax: g_pass_twofactor_life int</p>



<h3 class="wp-block-heading">g_pass_twofactor_merged - Require +code for imap/pop logins sometimes</h3>



<p>Requires merged login.</p>



<p>Syntax: g_pass_twofactor_merged bool</p>



<h3 class="wp-block-heading">g_disk_debug - Log slow disk access n</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_disk_debug bool</p>



<h3 class="wp-block-heading">g_disk_warning - Give manager warning if disk % exceeded, default 95%</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_disk_warning string</p>



<h3 class="wp-block-heading">g_dns_test_blank - Break dns lookups to test how it's handled</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_dns_test_blank bool</p>



<h3 class="wp-block-heading">g_fast_time_off - Disable faster time function</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_fast_time_off bool</p>



<h3 class="wp-block-heading">g_authent_require - Days till we require user to change password</h3>



<p>This is the one to use, only requires change in surgeweb, expire password</p>



<p>Syntax: g_authent_require int</p>



<h3 class="wp-block-heading">g_auth_norelay_webok - Allow surgeweb sessions anyway.</h3>



<p>This means relaying only occurs if g_relay_allow_ip matches</p>



<p>Syntax: g_auth_norelay_webok bool</p>



<h3 class="wp-block-heading">g_bind_to - Bind outgoing SMTP if to address matches</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_bind_to string</p>



<h3 class="wp-block-heading">g_bind_to_ip - The address to bind to</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_bind_to_ip string</p>



<h3 class="wp-block-heading">g_bind_to_name - The name to use in the ehlo</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_bind_to_name string</p>



<h3 class="wp-block-heading">g_blogs_https - Use https for blog urls</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_blogs_https bool</p>



<h3 class="wp-block-heading">g_breakin_short - Match on 1.2.3.* for ip addresses, helps with google sending</h3>



<p>This setting makes the address counting based on subnet x.x.x.* which prevents false positives caused by google.</p>



<p>Syntax: g_breakin_short bool</p>



<h3 class="wp-block-heading">g_mirror_nsend - Sending threads to use, default 8</h3>



<p>Sending threads for normal queue</p>



<p>Syntax: g_mirror_nsend int</p>



<h3 class="wp-block-heading">g_mirror_debug3 - NEVER USE, MAKES MIRROR FAIL.</h3>



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



<p>Syntax: g_mirror_debug3 bool</p>



<h3 class="wp-block-heading">g_callhome_disable - Disable misc features that reference netwinsite</h3>



<p>Useful if you are paranoid about information <img src="https://s.w.org/images/core/emoji/15.0.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<p>Syntax: g_callhome_disable bool</p>



<h3 class="wp-block-heading">g_deny_log - Log g_deny rejections to msg.log - can clutter log</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_deny_log bool</p>



<h3 class="wp-block-heading">g_dkim_return - Sign if 'return path' matches g_dkim_only</h3>



<p>Useful when you want to act as a signing gateway</p>



<p>Syntax: g_dkim_return bool</p>



<h3 class="wp-block-heading">g_speech_cmd - Command to convert sound file to text (append .txt to filename)</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_speech_cmd string</p>



<h3 class="wp-block-heading">g_speech_from - Only attempt conversion if from this email address</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_speech_from string</p>



<h3 class="wp-block-heading">g_speech_size - Default 10mb, will not convert larger files</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_speech_size int</p>



<p>Example: 10mb</p>



<h3 class="wp-block-heading">g_group_field - Group Field from authentication database</h3>



<p>Based upon a match on an arbitrary field in the authentication database a user can be defined as being part of an access_group. All fields (field, value, group) are required. eg: To add the user to the access_group "paid_user" if the field "mystatus" has the value "fullaccess":</p>



<p>g_group_field field="mystatus" value="fullaccess" group="paid_user"</p>



<p>Syntax: g_group_field field=string value=string group=string</p>



<h3 class="wp-block-heading">g_gzip_disable - Disable gzip web compression</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_gzip_disable bool</p>



<h3 class="wp-block-heading">g_help_url - Link to another website for help instead of surgemail.com</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_help_url string</p>



<h3 class="wp-block-heading">g_imap_folder_create - Auto create default folders for Trash/Sent etc</h3>



<p>Warning this may change the default folder currently used by creating one the user didn't previously have</p>



<p>Syntax: g_imap_folder_create bool</p>



<h3 class="wp-block-heading">g_imap_loop_report - Report imap loops of bad email clients</h3>



<p>This only logs when a body or body part is read via imap</p>



<p>Syntax: g_imap_loop_report bool</p>



<h3 class="wp-block-heading">g_imap_maxbusy - Limit for concurrent requests per user, user is throttled if exceeded</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_imap_maxbusy int</p>



<h3 class="wp-block-heading">g_imap_max_limit - Limits messages being put in folders</h3>



<p>This setting helps limit impact when a user has a large folder, it will fail to load a folder larger than this and report errors in the log, it does not prevent the folder from having messages added to it, and it does not inform the user that the problem has occurred, this setting is primarily to limit impact of a crazy user :-), see also G_MAILDIR_MAX</p>



<p>Syntax: g_imap_max_limit int</p>



<h3 class="wp-block-heading">g_imap_allow_trailing - Allow leading/trailing spaces on folder names on linux, not a good idea</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_imap_allow_trailing bool</p>



<h3 class="wp-block-heading">g_imap_log_user - Log imap info to imap.log in users mdir folder</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_imap_log_user bool</p>



<h3 class="wp-block-heading">g_recycling_imap - Make visible to IMAP users, default is now ONLY surgeweb users</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_recycling_imap bool</p>



<h3 class="wp-block-heading">g_ssl_lets_slave - Run letsencrypt on SLAVE too</h3>



<p>Also exclude url_host on the mirroring exclude settings</p>



<p>Syntax: g_ssl_lets_slave bool</p>



<h3 class="wp-block-heading">g_ssl_guess_domain - Guess domain using SSL hostname to allow login without @domain.name</h3>



<p>The certifictes must be coppied from the ssl to the lets folder manually!</p>



<p>Syntax: g_ssl_guess_domain bool</p>



<h3 class="wp-block-heading">g_log_tcp_read,g_log_tcp_write - Log actual data for a specific IP</h3>



<p>These settings let you 'trace' the data going 'to' and or 'from' a specific IP address (or list, or wild card) Lets say you have a client on a specific address that has a problem where the fault could be server/client or network related. To track it down add this to surgemail.ini</p>



<pre class="wp-block-preformatted">g_log_tcp_read "2.3.4.5"<br>

g_log_tcp_write "2.3.4.5"</pre>



<p>Then try whatever is 'failing' and examine 'mail.log' to see what was read/written to that client.</p>



<p>Syntax: g_log_tcp_read string</p>



<h3 class="wp-block-heading">g_lookup_names - Lookup names for connecting IP addresses</h3>



<p>This is one of those things that you very likely do not want to turn on. It makes the mail server lookup the IP name of any connecting user, however lookups can take 30-90 seconds so it can negatively impact apparent performance. Most of the access rules in the server can accept IP names if this setting is enabled, e.g. instead of specifying local users are 153.2.3.* you can say '*.netwinsite.com"&nbsp;</p>



<p>Syntax: g_lookup_names bool</p>



<h3 class="wp-block-heading">g_lookup_reject_fails - If lookup cannot get a name, reject user (not generally recommended)</h3>



<p>If lookup cannot get a name, reject user (not generally recommended)&nbsp;</p>



<p>Syntax: g_lookup_reject_fails bool</p>



<h3 class="wp-block-heading">g_lowdisk_warning - Disk space level below which to warn the manager</h3>



<p>SurgeMail checks available disk space on startup and every half hour whilst running on all the mail, temp and home directories. If any is found to be low an email is sent to the system manager. &nbsp;The recommended level is at least 100MB (default is 10MB).</p>



<p>Syntax: g_lowdisk_warning string</p>



<h3 class="wp-block-heading">g_msg_log_pop - Log all pop reads in msg*.rec</h3>



<p>Log from header field</p>



<p>Syntax: g_msg_log_pop bool</p>



<h3 class="wp-block-heading">g_rules_msgtime - Use msg time rather than file time for expire rules</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_rules_msgtime bool</p>



<h3 class="wp-block-heading">g_old_imap_nossl - Disable auto ssl mode</h3>



<p>This is just the way it used to do it, I can't see any good reason for it, but I'm leaving this setting incase there is a reason <img src="https://s.w.org/images/core/emoji/15.0.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<p>Syntax: g_old_imap_nossl bool</p>



<h3 class="wp-block-heading">g_responder_friends - Only respond if from known friends</h3>



<p>This can further reduce spam back scatter issues</p>



<p>Syntax: g_responder_friends bool</p>



<h3 class="wp-block-heading">g_quota_default - Default quota</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_quota_default string</p>



<h3 class="wp-block-heading">g_ssl_require_smtp - If IP matches then require SSL for incoming SMTP message</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_ssl_require_smtp string</p>



<h3 class="wp-block-heading">g_ssl_disable_renegotiation - Disable SSL renegotiation.</h3>



<p>GEnerally this shouldn't be used unless you have to keep some paranoid security scan happy</p>



<p>Syntax: g_ssl_disable_renegotiation bool</p>



<h3 class="wp-block-heading">g_tarpit_hacker - Slow DOS attacks in some situations</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_tarpit_hacker bool</p>



<h3 class="wp-block-heading">g_thread_reuse_real2 - Thread reuse</h3>



<p>If enabled the server will reuse existing threads instead of creating and destroying threads for each incoming/outgoing message. This has no affect on performance but does avoid a bug in some UNIX threading libraries which leak handles and cause problems if threads are not reused. Generally best disabled except on early Linux systems.&nbsp;</p>



<p>Syntax: g_thread_reuse2 bool</p>



<h3 class="wp-block-heading">g_user_virus_scan - Allow users to enable / disable virus scanner for themselves</h3>



<p>This setting adds a tickbox to the Spam page in user self administration that allows the user to enable and disable the virus scanner for them selves.</p>



<p>Syntax: g_user_virus_scan bool</p>



<h3 class="wp-block-heading">g_user_friends_domain_log_disable - Disable domain level friend.log file</h3>



<p>By default a friend.log file is written to each domain mailbox_path. This file is a collection of all users friends.log entries that rotates when it reaches 2mb in size.</p>



<p>Syntax: g_user_friends_domain_log_disable bool</p>



<h3 class="wp-block-heading">g_user_friends_log_disable - Disable user level friend.log file</h3>



<p>By default a friend.log file and 1 rotation is written for each user. Each log should only be approx 10k in size.</p>



<p>Syntax: g_user_friends_log_disable bool</p>



<h3 class="wp-block-heading">g_user_utoken_days - Length of time a user self management login token is valid</h3>



<p>Length of time a user self management login token is valid for. Length of time a user self management cookie is valid for. After this time period the login token will stop allowing the user access and they will need to login again.</p>



<p>Syntax: g_user_utoken_days int</p>



<h3 class="wp-block-heading">g_user_utoken_expire - Length of time a user self management login token is valid for</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_user_utoken_expire int</p>



<h3 class="wp-block-heading">g_user_mail_view - Whether an admin/manager can view/display users inbox mail</h3>



<p>This setting enables the 'view' links on the users mailbox page. These links will show the content of the users email. They also log the access to the users log file, identifying the IP from which the admin viewed the message.</p>



<p>Syntax: g_user_mail_view bool</p>



<h3 class="wp-block-heading">g_user_hide_security - Hide user level security.log access</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_user_hide_security bool</p>



<h3 class="wp-block-heading">g_user_report - Daily,Weekly,Monthly, emailed to managers of each domain</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_user_report string</p>



<h3 class="wp-block-heading">g_user_utoken_idle - Length of time a user self management login token may remain idle for</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_user_utoken_idle int</p>



<h3 class="wp-block-heading">g_user_pipe - Local delivery filter pipe</h3>



<p>Pipe run on file just before delivery to user, $USER$ available on command line. This allows the message to be modified (also see g_filter_pipe).</p>



<p>Syntax: g_user_pipe string</p>



<h3 class="wp-block-heading">g_user_mfilter - Local delivery Mfilter rules</h3>



<p>Mfilter rules to run late in the delivery process after the email messages have become "user specirfic", In particular this allows filtering based on the output of g_user_pipe.</p>



<p>Syntax: g_user_mfilter string</p>



<h3 class="wp-block-heading">g_user_receive_rule - Define valid source addresses for users in a group</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_user_receive_rule group=string from=string</p>



<h3 class="wp-block-heading">g_user_sms_quota - SMS quota</h3>



<p>Number of SMS messages accounts can send.</p>



<p>Syntax: g_user_sms_quota group=string initial=int period=string</p>



<h3 class="wp-block-heading">g_user_status_send - Number of days after which to send user status messages (0 = never)</h3>



<p>When the user enables friends then this setting will send them a regular report on what is pending and what filter rules have done. User Spam report.</p>



<p>Syntax: g_user_status_send int</p>



<h3 class="wp-block-heading">g_user_status_from - Send status with return address of the user</h3>



<p>Adding a return address can assist with delivery in some situations</p>



<p>Syntax: g_user_status_from bool</p>



<h3 class="wp-block-heading">g_user_status_fromhdr - Send status with return address of this</h3>



<p>Adding a return address can assist with delivery in some situations</p>



<p>Syntax: g_user_status_fromhdr string</p>



<h3 class="wp-block-heading">g_user_send_rule - Define valid recipient addresses for users in a group (requires SMTP AUTH)</h3>



<p>This rule allows you to define which domains users in the specified group can send email to.</p>



<p>g_user_send_rule group="wildcard" to="number"</p>



<p>If 'group' is set to '*' then it applies to users who are not in a group (see&nbsp;<a href="#g_access_group">g_access_group</a>), and/or whose group does not match another g_user_send_rule setting. The 'to' field contains a wildcard list of allowed email addresses.</p>



<p>Syntax: g_user_send_max group=string max=int</p>



<h3 class="wp-block-heading">g_user_send_rule - Define valid recipient addresses for users in a group (requires SMTP AUTH)</h3>



<p>Restricts to whom a user can send email, useful for students who may only be permitted to send to their own domain</p>



<p>Syntax: g_user_send_rule group=string to=string</p>



<h3 class="wp-block-heading">g_user_send_warning - Warn manager if any user sends more than this many messages per day, e.g. 5000</h3>



<p>This setting is useful to detect a spammer sending out bulk email from your system, this setting only applies to authenticated users, so someone who has figured out the password of one of your users (or a virus on their computer) or a registered user of some sort. If g_user_send_ip is defined then warnings will also be sent if an ip address exceeds this limit.</p>



<p>Syntax: g_user_send_warning int</p>



<h3 class="wp-block-heading">g_user_send_ip - Block any ip that sends more than this many emails per day</h3>



<p>This does not apply to g_user_send_white addresses. This will also enable counting of sends for users using g_relay_window. Whitelist ip addresses with g_user_send_white setting. This limit is 'per day'</p>



<p>Syntax: g_user_send_ip int</p>



<h3 class="wp-block-heading">g_user_send_white - No limit for these ip addresses/users</h3>



<p>This is a white list for the ip and user send limits.</p>



<p>Syntax: g_user_send_white string</p>



<h3 class="wp-block-heading">g_user_send_all - Apply all g_user_send_rules that match</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_user_send_all bool</p>



<h3 class="wp-block-heading">g_user_list_quota - Number of mailing lists users can create</h3>



<p>g_user_list_quota group="" quota="100"</p>



<p>This setting configures the number of mailing lists a user can create on this server. The group field is optional, specifying none effects all users globally, otherwise it matches this against the users access group. See also user_list_quota which can set quota per domain. Also the list_quota authent field can set quota per user.</p>



<p>Syntax: g_user_list_quota group=string quota=int</p>



<h3 class="wp-block-heading">g_verify_smtp2 - Verify we can talk back to the SMTP port on incoming ip address</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_verify_smtp2 bool</p>



<h3 class="wp-block-heading">g_virus_avast - Set Avast update time</h3>



<p>This is a string based setting that allows you to specify when Avast updates are attempted.</p>



<p>eg: to update at 12 midnight, 6am,12noon and 6 pm.</p>



<p>g_virus_avast_hour "0,6,12,18"</p>



<p>Syntax: g_virus_avast_hour int</p>



<h3 class="wp-block-heading">g_web_api_ip - Allow access to web based API for msg access</h3>



<p>This setting has no further documentation currently available</p>



<p>Syntax: g_web_api_ip string</p>



<h3 class="wp-block-heading">g_autologin_newlogic - Streamlined logic for surgeweb to user.cgi autologin handover</h3>



<p>Improved logic for user.cgi autologin url generation. Notably affects proxy mode, frontend-backend configurations, and whether ssl is used.</p>



<p>Syntax: g_autologin_newlogic bool</p>



<h3 class="wp-block-heading">g_surgeweb_backend_web - Backend machine to connect to</h3>



<p>This specifies the internet resolvable hostnaem or url for all user.cgi access connected to a backend server eg. myserver.com or https://myserver.com:7443</p>



<p>Syntax: g_surgeweb_backend_web string</p>



<h3 class="wp-block-heading">g_surgeplus_port, g_surgeplus_secure_port - SurgePlus port and SurgePlus secure port.</h3>



<p>SurgePlus uses the POP protocol to communicate with SurgeMail. However, some virus scanners running on the clients machine prevent the SurgePlus client from using POP commands that the virus scanner does not know about. In order to avoid this problem, SurgePlus uses port 7110 by default instead of port 110. However, clients not using a virus scanner (or clients using some virus scanners we have made SurgePlus work with - e.g. Norton) can safely use port 110 if they would otherwise be prevented from connecting to SurgeMail by a firewall. The SurgePlus client will quietly switch to using port 110 if it is not able to connect to the server using port 7110.</p>



<p>Syntax: g_surgeplus_secure_port int</p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/global-settings-misc2/">Global Settings Misc2</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Dlist Mailing Lists</title>
		<link>https://surgemail.com/knowledge-base/dlist-mailing-lists/</link>
		
		<dc:creator><![CDATA[chrisp]]></dc:creator>
		<pubDate>Sun, 26 Apr 2020 22:23:13 +0000</pubDate>
				<guid isPermaLink="false">https://surgemail.com/?post_type=ht_kb&#038;p=1924</guid>

					<description><![CDATA[<p>DList is a mailing list server that is automatically installed as part of SurgeMail General&#160;settings for DList are contained in the main configuration file, dlist.ini. To create a list you simply add a line likelist&#160;listnamesetting in the filelists.dat&#160;which you will find in the DList directory. Then make SurgeMail reload the configuration file (DList regularly checks<br /><a class="moretag" href="https://surgemail.com/knowledge-base/dlist-mailing-lists/">+ Read More</a></p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/dlist-mailing-lists/">Dlist Mailing Lists</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>DList is a mailing list server that is automatically installed as part of SurgeMail</p>



<p>General&nbsp;settings for DList are contained in the main configuration file, dlist.ini.</p>



<p>To create a list you simply add a line like<br><kbd><a href="https://netwinsite.com/surgemail/help/dlist.htm#list">list</a>&nbsp;listname</kbd><br>setting in the file<a href="https://netwinsite.com/surgemail/help/dlist.htm#lists.dat">lists.dat</a>&nbsp;which you will find in the DList directory. Then make SurgeMail reload the configuration file (DList regularly checks the configuration and lists.dat files for changes so it does not need to be sent a reload command).</p>



<p>Generally the sysadmin would set up a list and then users would send an email to the 'listname-request' address to 'subscribe' themselves to the list.</p>



<p>Users in general will only interact with the list by sending emails, either directly to the list to be 'posted' or to the listname-request address if they wish to join the list or send it commands. See:<br><a href="https://netwinsite.com/surgemail/help/dl_cmds.htm">DList mail commands</a><br>When users join the list they are normally sent this list of commands so that they know what the list can do for them.</p>



<p>To modify DList settings you can directly edit dlist.ini and lists.dat with a text editor or use the web admin tool.</p>



<hr class="wp-block-separator has-css-opacity"/>



<h3 class="wp-block-heading">Creating a Mailing List - Manually</h3>



<p>To create a mailing list on the list server DList, you need to add a new list setting in the lists.dat file, eg:<br><kbd>list listname</kbd><br>where listname is the name of the list. You can edit the lists.dat file with a text editor (e.g. notepad or vi) or use the web admin tool.</p>



<p>If you are doing it manually then below the list setting add any other settings that you require for your list, eg:<br><kbd>title juggling</kbd></p>



<p>Issue a 'tellmail reload' command so that SurgeMail notices the new list</p>



<p>To try out the list, you should add a user to the list and then post a message to the list. For information on this see,<br><a href="https://netwinsite.com/surgemail/help/dlist.htm#adding_users">Adding Users to a List</a><br><a href="https://netwinsite.com/surgemail/help/dl_cmds.htm">DList Email Commands</a></p>



<h3 class="wp-block-heading">Creating a Mailing List - Web Interface.</h3>



<p>You can also create mailing lists in the web admin, domain admin or user self admin interfaces. You can define defaults for new mailing lists by creating a file called list_defaults.txt in the web directory, in that file place the defaults you wish, e.g. to see what variables exist examine na_list.htm, in general prepend 'list_' to the dlist setting. e.g.</p>



<pre class="wp-block-preformatted"> 	list_archive true
	list_reply_to_user true</pre>



<p><strong>NB: Mailing lists on Virtual Domains...</strong></p>



<p>If you are wanting to add the mailing list to a specific domain eg: a virtual domain, then you need to specify that domain in lists.dat so that SurgeMail can create the correct aliases for your mailing list.</p>



<p>There are two ways to do this.</p>



<p>1. Old way: add a domain setting to your list eg:</p>



<p><kbd>list juggling<br>&nbsp;&nbsp;&nbsp;&nbsp;title Mailing List<br>&nbsp;&nbsp;&nbsp;&nbsp;domain vdomain1.com</kbd></p>



<p>2. New way: create the list with a full list name, eg:</p>



<p><kbd>list juggling@vdomain1.com<br>&nbsp;&nbsp;&nbsp;&nbsp;title Mailing List</kbd></p>



<p>The second method is better because it means that all mailing list directoryies will be created with unique names. This allows you to reuse mailing list names on different domains.</p>



<h2 class="wp-block-heading">Settings to ensure delivery with DKIM/Dmarc/ SPF</h2>



<p>The following rules should be observed now that DKIM/Dmarc is common, this is most important if the messages are from other domains. If you only post from your own domain then this is not important!</p>



<p>These rules ensure the message is not modified, and thus the original dkim signature from the sender should still be valid.</p>



<p>Upgrade to the latest surgemail release.</p>



<p><strong>Do not use the subject_prefix setting</strong></p>



<p><strong>Do not add a footer with the footer settings.</strong></p>



<p></p>



<hr class="wp-block-separator has-css-opacity"/>



<h4 class="wp-block-heading">Settings - lists.dat</h4>



<p>Lists.dat is the file where you create all the lists on your DList server and where you enter individual settings for each list.</p>



<p>All settings are one per line, and you can exclude a line by starting it with the '#' character. You do not need to reload the DList server after making changes.</p>



<p>Below is a list of all of the settings available for each list. All settings for a list are entered on the lines following the<br><kbd>list listname</kbd><br>line that declares a list, before the next list starts with its 'list listname' declaration line. See&nbsp;<a href="https://netwinsite.com/surgemail/help/dlist.htm#example_lists.dat_file">example lists.dat file</a></p>



<p>All settings take just ONE value except where stated otherwise in the description.</p>



<p>Note: In the table below you will see that the 'access' settings can generally take one of the following values. It is important to think about what these settings mean - NOT all of them apply to every access setting!</p>



<ul class="wp-block-list"><li>member - refers to list members and in general the list moderator as well</li><li>anyone - no restriction</li><li>moderator - only the list moderator can do it</li><li>*domain - person trying to do it must have the email address ending in 'domain'</li></ul>



<figure class="wp-block-table"><table><tbody><tr><th>Setting</th><th>Default</th><th>Example/options</th><th>Description</th></tr><tr><td>allow_ip</td><td>*</td><td>10.1.2.*</td><td>List specific IP addresses that can send to this mailing list, good for securing a large outgoing only list against spam</td></tr><tr><td>access_join</td><td>anyone</td><td>anyone,*netwinsite.com,</td><td>Controls who can join the mailing list</td></tr><tr><td>access_leave</td><td>anyone</td><td>moderator</td><td>Controls who can unsubscribe from the mailing list, by default anyone can unsubscribe anyone else.in version 2.5d (2.4k) and above:<br>members: (can unsubscribe themselves, moderator can unsubscribe anyone)<br>moderator: (only moderator can unsubscribe - members cannot unsub themselves)</td></tr><tr><td>access_post</td><td>members</td><td>moderator</td><td>Controls who can post messages to the mailing list</td></tr><tr><td>access_get</td><td>members</td><td>moderator</td><td>Controls who can get messages or files from the archive.</td></tr><tr><td>access_who</td><td>moderator</td><td>members</td><td>Controls who can retrieve the list of current members. Note the default changed from members to moderator in SurgeMail 2.3</td></tr><tr><td><a href="https://netwinsite.com/surgemail/help/dlist.htm#archives">archive</a></td><td>false</td><td>true</td><td>If set DList will record all incoming messages in an 'archive' sub directory, off the list's directory.</td></tr><tr><td>bounce_remove<br>(added in 2.8h)</td><td>false</td><td>true</td><td>If set then DList will log all bounces that it receives, and if it can work out that the bounce was because of a permanent error, then it will remove that address from the mailing list. DList will also send a summary email to the moderator each day recording any addresses it has removed from the list and the bounce error that was the reason for the removal. This is a new 'beta' setting so let us know how it goes if you try it. You might like to try, the&nbsp;<a href="https://netwinsite.com/surgemail/help/dlist.htm#log_bounce">log_bounce</a>&nbsp;setting as a first step to turning on this setting.</td></tr><tr><td>domain</td><td>(none&gt;</td><td>domain mydomain.com</td><td>Specifies the domain that this list should exist on where you do not want it to be on your first host_domain. NB: To allow listname re-use on different domains see the note,<br><a href="https://netwinsite.com/surgemail/help/dlist.htm#lists_on_virtual_domains">Mailing lists on Virtual Domains</a></td></tr><tr><td>footer<br>(version 2.4h and above)</td><td>(none)</td><td>footer<br>c:\surgemail\dlist \listname\footer.txt</td><td>The full path to a file that you want added onto the end of all messages as a footer. In version 2.8e and above this is only added onto all TEXT messages, HTML version also added see below. Note that as of 2.9g, template variables can be used in footers. See&nbsp;<a href="https://netwinsite.com/surgemail/help/dlist.htm#template_footers">Template Footers</a>&nbsp;for details.</td></tr><tr><td>footer_html<br>(version 2.8e and above)</td><td>(none)</td><td>footer_html<br>c:\surgemail\dlist \listname\footer_html.txt</td><td>The full path to a file that you want added onto the end of all HTML messages as a footer. Note that as of 2.9g, template variables can be used in footers.&nbsp;<a href="https://netwinsite.com/surgemail/help/dlist.htm#template_footers">Template Footers</a>&nbsp;for details. PLEASE NOTE: this footer is NOT added to a message sent in 'text' only format, you must specify a text footer if you want a footer added to a text message (and a text footer can't contain html of course).</td></tr><tr><td>join_cookie_subject</td><td>false</td><td>true</td><td>If set then the cookie code is in the 'subject' of the message, this makes it easier for users to join a list. Join_cookie should also be set to true.</td></tr><tr><td>join_cookie</td><td>false</td><td>true</td><td>If set, when users join the list they will be asked to respond with a specific cookie (number) to prove they are real humans, this setting prevents people from subscribing other people or worse other lists to an existing list. Note: a cookie will not be sent if the subscriber is a moderator or if access_join for the list is set to moderator or password.</td></tr><tr><td>language_file<br>(version 2.9d and above)</td><td>(none)</td><td>newproducts.dat</td><td>Used to specify a language file for a particular list. That language file is used to translate most of the phrases generated by DList for that list. Documentation on language translation is available&nbsp;<a href="http://netwinsite.com/surgemail/help/dl_lang.htm">here</a>.</td></tr><tr><td>log_bounce<br>(version 2.8h and above)</td><td>false</td><td>true</td><td>This is a debugging setting, that may be more generally useful. It causes DList to log all addresses that bounce and the reason for the bounce to the file, bounces.log, in the list home directory. The log is appended to for every bounce received when sending any messages to the list. See also,&nbsp;<a href="https://netwinsite.com/surgemail/help/dlist.htm#bounce_remove">bounce_remove</a>.</td></tr><tr><td>list</td><td>(none)</td><td>dnews-discussion</td><td>The name of the list, this cannot contain spaces and must be the first setting for each new list in lists.dat</td></tr><tr><td>max_size</td><td>150</td><td>500</td><td>Limits the maximum size of an item that can go through the mailing list in kbytes. NB: this setting applies to messages to the -request address as well as the posting address.</td></tr><tr><td>max_per_user<br>(2.4g and above)</td><td>200<br>(changed from 50 in vers. 2.5d)</td><td>1000</td><td>Sets the max number of messages allowed to be posted to all lists on the server per user per hour. Note that the count is per user for posts to ALL lists, whereas the setting is per list. So the count is global but whether it applies to a list is list specific (the default is 200).</td></tr><tr><td>moderator</td><td>(none)</td><td>fred@netwinsite.com</td><td>A list of one or more moderator email addresses, a moderator often has extra access rights, like the ability to subscribe other people etc. Separate multiple entries with spaces or tabs (or commas in version 2.5d and above), emails are only sent to the first moderator in the list, but any moderator can send moderated messages.</td></tr><tr><td>no_processed_message<br>(version 2.9d and above)</td><td>false</td><td>true</td><td>This setting is very powerful. If set to 'true' for a particular list, no command processed messages are sent by DList for that list. This means that users will only see list posts; they will get no response to any DList commands they send (i.e. who, lists etc.). This would only really be useful if you wanted to subscribe users to a list without them receiving notices.</td></tr><tr><td>no_welcome_message<br>(version 2.9d and above)</td><td>false</td><td>true</td><td>By default, DList sends a welcome message to each user directly after that user successfully subscribes to a list. If set to 'true' for a particular list, then users subscribing to that list will not be sent a welcome message.</td></tr><tr><td>reply_to_user</td><td>false</td><td>true (also in version 2.5f and above, user@domain)</td><td>If set, the reply-to header in each message will be pointed to the original poster, rather than the mailing list, this is recommended for large mailing lists. In versions 2.5f and above in place of true you can specify an address as the reply address for ALL messages posted to the list. If given, posted messages will have any Reply-To: header turned into X-Reply-To:, and the address given is added to a new Reply-To: header.</td></tr><tr><td>status_interval</td><td>7</td><td>1</td><td>Period in days between automatic status reports being sent to the moderator.</td></tr><tr><td>skip_mailer_check</td><td>false</td><td>TRUE</td><td>If TRUE then DList will not ignore messages from users called, MAILER-DAEMON (all in capitals). These are normally bouced messages and so would not normally be wanted as posts to the list.</td></tr><tr><td>skip_postmaster_check</td><td>FALSE</td><td>TRUE</td><td>If TRUE then DList will not ignore messages from users called, POSTMASTER (all in capitals). These are normally bouced messages and so would not normally be wanted as posts to the list.</td></tr><tr><td>subject_prefix</td><td>(none)</td><td>Juggle:</td><td>This string will be added to the front of every subject line of messages from this list, this makes it easy for people to sort list messages out from other messages.</td></tr><tr><td>title</td><td>(none)</td><td>N.Z. Juggling</td><td>A title for the list, shown in headers and lists output.</td></tr><tr><td>invisible</td><td>false</td><td>true</td><td>Makes the list invisible to the 'lists' command for finding lists on your server.</td></tr><tr><td>mod_web</td><td>false</td><td>true</td><td>Add web links to accept/drop messages. Messages are stored so that the actual message with correct headers will go onto the list</td></tr><tr><td>mod_first</td><td>false</td><td>true</td><td>If user has never posted before send their post to the moderator for approval, on subsequent posts the user can post direct. (Useful to stop spam abuse of lists)</td></tr><tr><td>notify_joinleave</td><td>false</td><td>true</td><td>Send the list owner/moderator an email when users join/leave the list</td></tr><tr><td>auth_post</td><td>false</td><td>true</td><td>STRONGLY recommended for private lists and large mailing lists. Only allow posts from local authenticated users.</td></tr><tr><td>auth_who</td><td>false</td><td>true</td><td>STRONGLY recommended for ALL lists. Only allow who requests from local authenticated users.</td></tr><tr><td>auth_moderator</td><td>false</td><td>true</td><td>STRONGLY recommended for all lists where the moderator is a local user. Requires that the moderator uses smtp authentication to prove they are genuine.</td></tr><tr><td>to_user</td><td>false</td><td>true</td><td>If true then the To: address in each message sent will be the users email address instead of the list name</td></tr></tbody></table></figure>



<h4 class="wp-block-heading">An example lists.dat file with entries for two lists, talk and juggling:</h4>



<figure class="wp-block-table"><table><tbody><tr><td><kbd><a href="https://netwinsite.com/surgemail/help/dlist.htm#list">list</a></kbd>talk&nbsp;&nbsp;<a href="https://netwinsite.com/surgemail/help/dlist.htm#archive_dir">archive</a>true&nbsp;<a href="https://netwinsite.com/surgemail/help/dlist.htm#title">title</a>The list for talkers.&nbsp;<a href="https://netwinsite.com/surgemail/help/dlist.htm#subject_prefix">subject_prefix</a>[list: talk]&nbsp;<a href="https://netwinsite.com/surgemail/help/dlist.htm#access_post">access_join</a>Anyone&nbsp;<a href="https://netwinsite.com/surgemail/help/dlist.htm#access_post">access_post</a>Moderator&nbsp;<a href="https://netwinsite.com/surgemail/help/dlist.htm#access_post">access_who</a>Anyone&nbsp;<a href="https://netwinsite.com/surgemail/help/dlist.htm#access_post">access_get</a>Anyone&nbsp;<a href="https://netwinsite.com/surgemail/help/dlist.htm#moderator">moderator</a>talk.master@macro.com&nbsp;<a href="https://netwinsite.com/surgemail/help/dlist.htm#max_size">max_size</a>40&nbsp;<a href="https://netwinsite.com/surgemail/help/dlist.htm#footers">footr</a>c:\surgemail\dlist\talk\footer.txt<kbd><a href="https://netwinsite.com/surgemail/help/dlist.htm#list">list</a></kbd>juggle&nbsp;&nbsp;titleThe list for jugglers.&nbsp;<a href="https://netwinsite.com/surgemail/help/dlist.htm#subject_prefix">subject_prefix</a>[Juggle]&nbsp;<a href="https://netwinsite.com/surgemail/help/dlist.htm#access_post">access_join</a>Anyone&nbsp;<a href="https://netwinsite.com/surgemail/help/dlist.htm#access_post">access_post</a>Anyone&nbsp;<a href="https://netwinsite.com/surgemail/help/dlist.htm#access_post">access_who</a>Anyone&nbsp;<a href="https://netwinsite.com/surgemail/help/dlist.htm#access_post">access_get</a>Anyone&nbsp;<a href="https://netwinsite.com/surgemail/help/dlist.htm#moderator">moderator</a>juggling.master@macro.com&nbsp;<a href="https://netwinsite.com/surgemail/help/dlist.htm#max_size">max_size</a>40&nbsp;<a href="https://netwinsite.com/surgemail/help/dlist.htm#footers">footer</a>c:\surgemail\dlist\juggle\footer.txt&lt; /td&gt;</td></tr></tbody></table></figure>



<hr class="wp-block-separator has-css-opacity"/>



<h3 class="wp-block-heading">Welcome Messages</h3>



<p>DList comes with an example welcome message. It is stored in a file called join.tpl in a template format.</p>



<p>You can edit this template to the look that you require, and you can copy it to each list's directory (off the main DList directory) so that individual lists can have their own welcome message.</p>



<p>DList supports variables in templates as of 2.9g. All you need to do to use template variables is add the variables you want into the template. or information on how to use template variables, and a list of supported variable names, see&nbsp;<a href="https://netwinsite.com/surgemail/help/dlist.htm#template_variables">Template Variables</a>.</p>



<p>The template files current supported are:</p>



<ul class="wp-block-list"><li>join.tpl</li><li>leave.tpl</li></ul>



<p>These files can be in the main dlist directory, or in a specific dlist sub directory.</p>



<hr class="wp-block-separator has-css-opacity"/>



<h3 class="wp-block-heading">Adding users to a list</h3>



<p>Usually users would add themselves to a list by sending a message to the list request address eg: listname-request@domain with the word subscribe in the message body.</p>



<p>DList will then add them to the users.lst file for that list. Users.lst for each list is stored in that lists directory (named after the list) off the DList directory (probably \surgemail\dlist\listname\users.lst or /usr/local/surgemail/dlist/listname/users.lst )</p>



<p>To add a number of users you have two options:</p>



<ol class="wp-block-list"><li>Add yourself as a moderator for the list and send the listname-request address a message with mutliple subscribe lines in the body.So as a moderator you send the following email:<kbd>To: listname-request@domain<br>From: your_moderator_address<br><br>subscribe bob@domain1.com<br>subscribe judy@domain1.com<br>subscribe george@domain99.com</kbd>to join up the email addresses,<br>bob@domain1.com<br>judy@domain1.com<br>george@domain99.com</li><li>Directly edit the users.lst text file for the list and add the email addresses one per line.So to add the same three users, you might edit the users.lst file to look like this:<kbd>u:tam@1.2.3.4 f:Tam Willacy p:0 t:0<br>bob@domain1.com<br>judy@domain1.com<br>george@domain99.com</kbd>where the first line is an existing user on the list.Don't worry about the format of lines for existing users. The next time DList has to write anything to the users.lst file it will add the email addresses that you have pasted/typed in correctly.</li></ol>



<p><strong>Adding Users' Real Names</strong></p>



<p>To specifiy the users real name when you are subscribing them using either method, enter the users email address with the full name field as per an email client eg:</p>



<p>sending subscribe commands:</p>



<p><kbd>subscribe "bobby" bob@domain1.com<br>subscribe "Judy Simpson" judy@domain1.com<br>subscribe george@domain99.com "Georgie Porgy"</kbd></p>



<p>directly in users.lst:</p>



<p><kbd>u:tam@1.2.3.4 f:Tam Willacy p:0 t:0<br>"bobby" bob@domain1.com<br>"Judy Simpson" judy@domain1.com<br>george@domain99.com "Georgie Porgy"</kbd></p>



<p>When the user subscribes themselves, the real name is taken from their email address (from the From header).</p>



<hr class="wp-block-separator has-css-opacity"/>



<h3 class="wp-block-heading">Moderated lists</h3>



<p>There are several ways of posting into a moderated list depending on your settings:</p>



<h3 class="wp-block-heading"><strong>access_post moderator</strong></h3>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>The simplist setting is:&nbsp;<strong>access_post moderator&nbsp;</strong>this is totally insecure. When a post comes in for the list the message is forwarded to the moderator, who then must post it again to the list. The 'from' address of the poster must match the moderator for the post to be accepted. Forging messages is so easy almost anyone can do this and post to your list directly!</p></blockquote>



<h3 class="wp-block-heading"><strong>access_post password</strong></h3>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>This setting relies on a password being set and then sent with every posted message, the password is stripped off the postd message, but this is very likely to fail with HTML messages so is also an unwise choice.</p></blockquote>



<h3 class="wp-block-heading">access_post moderator</h3>



<h3 class="wp-block-heading">auth_post true (or) auth_moderator true</h3>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>This is the best setting, but it requires that moderated posts come from local users who are using smtp authentication, and also match the 'moderator' setting for the list.</p><p>Lastly for best security you can add "ALLOW_IP_MOD x.x.x.x" and list the ip address of the machine used to send the moderated messages.</p></blockquote>



<hr class="wp-block-separator has-css-opacity"/>



<h3 class="wp-block-heading">Archives and Files</h3>



<p>This is still being written <img src="https://s.w.org/images/core/emoji/15.0.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<p>DList lists can be set to save an archive of all messages by setting the list specific setting in lists.dat,<br><a href="https://netwinsite.com/surgemail/help/dlist.htm#archive">archive</a>&nbsp;true</p>



<p>If this is set then DList will create the archive messages in a subdirectory called 'archive' below the lists directory eg:<br><kbd>c:\surgemail\dlist\listname\archive\1.msg<br>c:\surgemail\dlist\listname\archive\2.msg</kbd><br>etc.</p>



<p>Then if the user sends an email to the listname-request address with the command, dir, in the message body DList will send back a message telling the user how many archived messages there are.</p>



<p>If the user wants one of the messages then they can send the 'get' command to fetch the archived message.</p>



<p>If you want to provide other files to the list members, then you create your own directory off the list's directory called, files, and put the files that you want to provide there eg:<br><kbd>c:\surgemail\dlist\listname\files\picture.jpg</kbd></p>



<p>Then when the user does a 'dir' command they will also be shown a list of other files available.</p>



<p>For details on the list commands see,&nbsp;<a href="https://netwinsite.com/surgemail/help/dl_cmds.htm">DList Email Commands</a></p>



<hr class="wp-block-separator has-css-opacity"/>



<h3 class="wp-block-heading">Template Footers</h3>



<p>DList will treat footer files as templates. This means that you can use variable names in the footer file. These names will be replaced with the actual values as the message is sent. For information on how to use template variables and a list of supported variable names see&nbsp;<a href="https://netwinsite.com/surgemail/help/dlist.htm#template_variables">Template Variables</a>.</p>



<hr class="wp-block-separator has-css-opacity"/>



<h3 class="wp-block-heading">Template Variables</h3>



<p>Template variables are a way to customise joining messages and footers with information about a list or a list member. Variables are denoted in the following form:</p>



<pre class="wp-block-preformatted">	%%variable_name%%
</pre>



<p>When DList comes across a variable in a template (say a footer or a join message) it replaces that variable with its value. For example, the following line contains two variables:</p>



<pre class="wp-block-preformatted">	Welcome to the %%list_name%% list, %%h_user%%. </pre>



<p>The variables are replaced with their actual values when the message is sent. As an example, the above line could become:</p>



<pre class="wp-block-preformatted">	Welcome to the newproducts list, joe@bloggs.com. </pre>



<p>Below is a list of all template variables supported by DList. Please note that some variables may have multiple variable names. This is to ensure backwards compatibility with older versions of DList.</p>



<figure class="wp-block-table"><table><tbody><tr><th>Variable Name</th><th>Synonym</th><th>Replaced With</th><th>Example Value</th></tr><tr><td>list_member</td><td>h_user</td><td>The email address of the user to whom the message is sent.</td><td>joe@bloggs.com</td></tr><tr><td>list_request_address</td><td>list-request</td><td>The email address to which to send requests.</td><td>newproducts-request@bloggs.com</td></tr><tr><td>list_address</td><td>&nbsp;</td><td>The email address to which to send list messages.</td><td>newproducts@bloggs.com</td></tr><tr><td>h_fullname</td><td>&nbsp;</td><td>The users name, e.g. Joe Smith (if known in users.lst) You need to set body_template true to use template variables in messages you send</td><td>John Smith</td></tr><tr><td>list_name_only</td><td>&nbsp;</td><td>The list name without the domain name</td><td>newproducts</td></tr><tr><td>list_title</td><td>&nbsp;</td><td>The 'title' of the list</td><td>New Products</td></tr><tr><td>list_name</td><td>list<br>list-name</td><td>The name of the list. Which is generally identical to the list_address (this variable exists for historical reasons, you probably want list_name_only instead)</td><td>newproducts@bloggs.com</td></tr></tbody></table></figure>



<h3 class="wp-block-heading">Some obscure/internal information</h3>



<h3 class="wp-block-heading">Digests</h3>



<p>DList supports daily digests which are a compendium of all messages sent to the list within the past 24 hours.</p>



<p><br>The format of the users.lst file is very important. It is automatically generated, but for bulk additions you may need to modify it manually. If so, the format must be exact. Note: tabs are required - spaces will not be read as separating characters since they can be part of a full name. Also note this format is subject to change, the information here is provided as a guide, and it's fairly likely to remain accurate, but be warned <img src="https://s.w.org/images/core/emoji/15.0.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<pre class="wp-block-preformatted">     u:(data)&lt;tab&gt;f:(data)&lt;tab&gt;p:(data)&lt;tab&gt;t:(data)<br>     u: is the email address of the subscriber<br>
     f: is the full name of the subscriber<br>     p: is an automatically generated and used for password verification subscriptions<br><br>	  t: is the type of subscription it is a bitmask.
     1 is digest delivery
     2 is disabled (no delivery)
     4 is holiday (no delivery but user can re-enable)

Examples:
     u:chris@xnetwin.xco.nz f:Chris P p:5112 t:1
     u:robert@xtellurian.xcom f:Robert Boyle p: t:0</pre>



<p><br>Chris P is a digest subscriber he will receive one compiled post at midnight at chris@xnetwin.xco.nz.</p>



<p><br>Robert Boyle is an immediate subscriber he will receive posts immediately as they are sent to the list at robert@xtellurian.xcom</p>



<p>Note:<br>-----<br>When creating automatic scripts to subscribe an email address, the body of digest subscriptions messages to the listname-request address must be formatted as follows:</p>



<p><br>subscribe<br>digest true</p>



<p><br>This will subscribe the user and then set the digest mode for that subscription.</p>



<p>digest_textonly true - This option will strip all non-text MIME parts and only use the text parts to make the digest.</p>



<p>list_textonly true - This option will strip all non-text MIME parts and forward only the remaining text message to the list.</p>



<p>text_digest true - This makes the digest format simple non mime which many mail clients cope with better</p>



<p>The following alias addresses exist these allow you to join, leave and join for 'digests' by simply sending email to an address, with no 'body' content.</p>



<ul class="wp-block-list"><li>listname-join@domain.name = Join the mailing list.</li><li>listname-digest@domain.name = Join the mailing list, and set to receive 'digests'</li><li>listname-leave@domain.name = Leave the mailing list.&nbsp;</li></ul>



<hr class="wp-block-separator has-css-opacity"/>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/dlist-mailing-lists/">Dlist Mailing Lists</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Mfilter rule syntax</title>
		<link>https://surgemail.com/knowledge-base/mfilter-rule-syntax/</link>
		
		<dc:creator><![CDATA[chrisp]]></dc:creator>
		<pubDate>Sun, 17 Nov 2019 23:50:59 +0000</pubDate>
				<guid isPermaLink="false">https://surgemail.com/?post_type=ht_kb&#038;p=1236</guid>

					<description><![CDATA[<p>Fast processing of incoming messages. A simple, clear, syntax so that rules can easily be understood and modified Enough power/flexibility Incorporate regular expression matching to give real power. How to configure rules: Simply create a file called&#160;mfilter.rul&#160;in the&#160;SurgeMail home area&#160;(as defined in SurgeMails config) Use the test command via the SurgeMail admin interface to check<br /><a class="moretag" href="https://surgemail.com/knowledge-base/mfilter-rule-syntax/">+ Read More</a></p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/mfilter-rule-syntax/">Mfilter rule syntax</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<ul class="wp-block-list"><li>Fast processing of incoming messages.</li><li>A simple, clear, syntax so that rules can easily be understood and modified</li><li>Enough power/flexibility</li><li>Incorporate regular expression matching to give real power.</li></ul>



<h3 class="wp-block-heading">How to configure rules:</h3>



<ul class="wp-block-list"><li>Simply create a file called&nbsp;<strong>mfilter.rul</strong>&nbsp;in the&nbsp;<strong>SurgeMail home area</strong>&nbsp;(as defined in SurgeMails config)</li><li>Use the test command via the SurgeMail admin interface to check that your filter works as expected</li><li>Please note that "local.rul" should be used for adding scoring for ASPAM not mfilter.rul.</li></ul>



<h3 class="wp-block-heading">Tracing problems</h3>



<p>If you have problems getting mfilter to run you can use these two settings in surgemail.ini, they will provide logging to show exactly what is going on.</p>



<pre class="wp-block-preformatted">g_mfilter_trace "true"
g_mfilter_noisey "true"</pre>



<p>then examine 'mail.log' after sending in a test message.</p>



<h2 class="wp-block-heading">Syntax Of mfilter.rul File</h2>



<h3 class="wp-block-heading">There are 6 valid statements in a rule file:</h3>



<p>Assignment<br>Action<br>if (Conditional_Expression) [and (Conditional_Expression)...] Action<br>else<br>end if<br>call built_in_function()</p>



<h3 class="wp-block-heading">Assignment</h3>



<p>$variable_name = "quoted string" [+ "quoted string" [+ $variable ...]]<br>$variable_name = function()</p>



<h3 class="wp-block-heading">Action</h3>



<p>accept "reason" | bounce "reason" | drop "reason" | forward "user@domain" | then | setflag("flagname") | clearflag("flagname")</p>



<h3 class="wp-block-heading">Conditional Expression (if, else, end if)</h3>



<p>Any pre-defined function, e.g. isbinary()<br>isin("subject","free pictures")<br>Numeric comparisons, e.g. lines()&gt;100<br>Simple NOT operator, e.g. if (!isbinary()) reject "Only binaries allowed here mate!"<br>Calculations are NOT permitted, e.g. lines()+10 would fail</p>



<h3 class="wp-block-heading">Recipients block for processing individual recipients</h3>



<p>A single mail message may have many recipients, and in many cases the actions of your spam filter should vary depending on the recipients (you might, for example, want all messages to your account to get through even if the same message would be blocked if sent to any other user).</p>



<p>The recipient block (recipients...end recipients) is processed once for each recipient of the message.</p>



<p>Inside the 'recipients' block there is a dummy variable defined 'recipient' which is the specific recipient in question.</p>



<p>All the action's (except, bounce, drop) refer to the recipient only, not to the entire message, so when one of those actions that normally terminates message processing is encountered (accept, bounce, drop, etc) instead the action is applied only to that recipient and the recipient block is restarted with the next recipient defined.</p>



<p>(Example of mfilter rule to do processing 'per recipient')</p>



<pre class="wp-block-preformatted">recipients
       if (isin("recipient","manager@this.domain")) accept "Always accept for me        so spammers can talk to me"
       if (isin("recipient","sales@your.domain")) then
       	if (isin("subject","order")) then
       		# Make a Duplicate of sale order
       		call forward_cc(<a href="mailto:sales_copy@your.domain">"sales_copy@your.domain"</a>)
       	end if
       end if
end recipients </pre>



<h2 class="wp-block-heading">Miscellaneous</h2>



<h3 class="wp-block-heading">Line Continuation</h3>



<p>Lines can be continued by ending the line in a '\' character</p>



<h3 class="wp-block-heading">Quoting Strings</h3>



<p>All strings and header names should be within double quotes, sometimes you may get away without doing this, but we don't guarantee this will work in future. e.g. use: exists("Supersedes") not exists(Supersedes); quotes can be escaped in the usual way, e.g. "This \"Word\" has quotes around it"</p>



<h3 class="wp-block-heading">Assignments</h3>



<p>Assignments are processed at compile time, variables DO NOT exist at run time. Do not think of this as a programming language, but rather as a list of rules that are processed with each incoming message. Real run-time variables only exist in the form of the ifflag("xxx") function and the setflag("xxx") action.</p>



<p>For example, the following is NOT VALID, as the assignment is processed before the rules are run. The rejection would always read "big message"</p>



<pre class="wp-block-preformatted">$fred = "small message"
if (lines()&gt;100) then
&nbsp;&nbsp; $fred = "big message" (this will not work as expected)
end if
reject $fred</pre>



<h3 class="wp-block-heading">Odd stuff</h3>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>The statement '<strong>do_bounce_fast</strong>' should appear at the end of your mfilter.rul file, and it is used by the rexp_fast() rules.&nbsp;<strong>rexp_fast</strong>&nbsp;acts just like rexp() but it is much faster because it searches the message once for all of the rules in question, each rule must start with two simple non 'regular expression' characters. This enables mfilter to generate a hash table of all the regular expressions it's going to search for and then it can efficiently apply only the ones that appear to match as it runs through the message. Also rexp_fast includes the score to apply if the message matches the rule.</p></blockquote>



<h2 class="wp-block-heading">Actions &amp; Commands</h2>



<h3 class="wp-block-heading">Actions</h3>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p><a href="https://netwinsite.com/surgemail/help/mfilter.htm#accept">accept</a>"reason" (Terminates processing)<br><a href="https://netwinsite.com/surgemail/help/mfilter.htm#bounce">bounce</a>&nbsp;"reason" (Terminates processing)<br><a href="https://netwinsite.com/surgemail/help/mfilter.htm#reject">reject</a>&nbsp;"reason" (same as bounce)<br><a href="https://netwinsite.com/surgemail/help/mfilter.htm#forward">forward</a>&nbsp;"reason" (Terminates processing) (redirect is a synonym for this action)<br><a href="https://netwinsite.com/surgemail/help/mfilter.htm#print">print</a>&nbsp;"reason" (Prints debugging line to log file mail.log)<br><a href="https://netwinsite.com/surgemail/help/mfilter.htm#setflag">setflag("flagname")</a>&nbsp;"reason"<br><a href="https://netwinsite.com/surgemail/help/mfilter.htm#clearflag">clearflag("flagname")</a>&nbsp;"reason"</p><p>Functions that have actions but must be proceeded by the 'call' action as they are really functions and must be on a line of their own (not on the end of an if statement)</p><p>call&nbsp;<a href="https://netwinsite.com/surgemail/help/mfilter.htm#forwardcc">forward_cc</a>("new@email.address)<br>call&nbsp;<a href="https://netwinsite.com/surgemail/help/mfilter.htm#replace">replace</a>("header_name","wildcard_match_pattern","replacement_pattern")<br>call&nbsp;<a href="https://netwinsite.com/surgemail/help/mfilter.htm#report">report</a>("manger@email.address","subject of message")</p></blockquote>



<h3 class="wp-block-heading">Builtin Functions</h3>



<p><a href="https://netwinsite.com/surgemail/help/mfilter.htm#add_header">call add_header</a>("Header: header information")<br><a href="https://netwinsite.com/surgemail/help/mfilter.htm#allmod">allmod</a>()<br><a href="https://netwinsite.com/surgemail/help/mfilter.htm#exists">exists</a>("header")<br><a href="https://netwinsite.com/surgemail/help/mfilter.htm#head_len">head_len</a>("header")<br><a href="https://netwinsite.com/surgemail/help/mfilter.htm#isbase64">isbase64</a>()<br><a href="https://netwinsite.com/surgemail/help/mfilter.htm#isbinary">isbinary</a>() )<br><a href="https://netwinsite.com/surgemail/help/mfilter.htm#isencodedhtml">isencodedhtml</a>()<br><a href="https://netwinsite.com/surgemail/help/mfilter.htm#isencodedtext">(isencodedtext</a>()<br><a href="https://netwinsite.com/surgemail/help/mfilter.htm#isencodedurl">isencodedurl</a>()<br><a href="https://netwinsite.com/surgemail/help/mfilter.htm#isflag">isflag</a>("flag-name")<br><a href="https://netwinsite.com/surgemail/help/mfilter.htm#ishtml">ishtml</a>()<br><a href="https://netwinsite.com/surgemail/help/mfilter.htm#isimage">isimage</a>()<br><a href="https://netwinsite.com/surgemail/help/mfilter.htm#isin">isin</a>("header","string-not-case-sensitive")<br><a href="https://netwinsite.com/surgemail/help/mfilter.htm#lines">lines</a>()&gt;3)<br><a href="https://netwinsite.com/surgemail/help/mfilter.htm#match">match</a>("header","wildcard")<br><a href="https://netwinsite.com/surgemail/help/mfilter.htm#matchall">matchall</a>("header","wildcardlist")<br><a href="https://netwinsite.com/surgemail/help/mfilter.htm#matchone">matchone</a>("header","wildcardlist")<br><a href="https://netwinsite.com/surgemail/help/mfilter.htm#rexp">rexp</a>("header","regular-expression")<br><a href="https://netwinsite.com/surgemail/help/mfilter.htm#size">size</a>()<br><a href="https://netwinsite.com/surgemail/help/mfilter.htm#spamdetect">call spamdetect</a>(n,"reason")<br><a href="https://netwinsite.com/surgemail/help/mfilter.htm#spawn">call spawn</a>("d:/surge/filter.exe $FILE$")</p>



<p>New Functions</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>time_hour() - returns the 'hours' 0-23, useful for rules that apply at different times of day<br>time_min() - returns the minutes<br>isimage() - True if message contains an image<br>isjpg() - True if message contains a jpeg image<br>ispdf() - True if message contains a pdf file<br>image_size() - Approx size of image in bytes<br>nimage() - Approx number of images found in message<br>islocal() - Message is to a local user not an outgoing message<br>isloggedin() - Message is from a logged in local user<br>is_dayofweek("monday,tuesday") - True on those days of the week.<br></p></blockquote>



<h3 class="wp-block-heading">Notes</h3>



<p>The "header" parameter can be any normal header, such as "Subject", "From" or "To". However, the are some additional pseudo-headers than can also be used as parameters in any function which takes a "header" parameter:</p>



<p>"head": refers to the entire message header.<br>"body": refers only to the message body (after any necessary decoding)<br>"urls": refers to any urls found in the body<br></p>



<h2 class="wp-block-heading">Function Descriptions</h2>



<h3 class="wp-block-heading">call add_header("Header: header information")</h3>



<p>Used to add a header to a message. eg</p>



<pre class="wp-block-preformatted">if (isin("x-spamdetect","****") then
call add_header("X-MailScanner-SpamCheck: LEVEL=****")
end if </pre>



<h4 class="wp-block-heading">NOTE: This will cause bounces if used in local.rul or simple.rul, it can only be used in mftiler.rul</h4>



<p>Requires Version 3.8 or later.</p>



<h3 class="wp-block-heading">allmod("header")</h3>



<p>This returns true if all the newsgroups in the specified header are moderated.</p>



<h3 class="wp-block-heading">exists("header")</h3>



<p>This is true if the header exists in the message and is non zero in length, eg: if (exists("supersedes")) then reject "We don't like supersedes headers"</p>



<h3 class="wp-block-heading">head_len("header")</h3>



<p>Returns the length of the named header, e.g.</p>



<pre class="wp-block-preformatted">if (head_len("date")&gt;60) bounce "Naughty message"</pre>



<h3 class="wp-block-heading">isbase64()</h3>



<p>This is true if the message appears to contain base64 binary encoded data.</p>



<h3 class="wp-block-heading">isbinary()</h3>



<p>This is true if the message has binary data either base64 encoding or uuencoded data.</p>



<h3 class="wp-block-heading">isencodedhtml()</h3>



<p>This is true if the message appears to contain MIME or uuencoded HTML instead of plain text data.</p>



<h3 class="wp-block-heading">isencodedtext()</h3>



<p>This is true if the message appears to contain MIME or uuencoded text data.&nbsp; This will always be true if isencodedhtml() returns true.</p>



<h3 class="wp-block-heading">isencodedurl()</h3>



<p>This is true if the message appears to contain an uuencoded URL reference.</p>



<h3 class="wp-block-heading">isflag("flag-name")</h3>



<p>Used to check whether a flag variable has been defined as true. This can be done with the setflag("flag-name") action, e.g.</p>



<pre class="wp-block-preformatted">if (size()&gt;100000) setflag("bigitem")
if (isimage()) setflag("bigitem")
if (isflag("bigitem")) reject "It was a big item or had a picture in it"</pre>



<h3 class="wp-block-heading">ishtml()</h3>



<p>This is true if the message appears to contain HTML instead of plain text data.</p>



<h3 class="wp-block-heading">isimage()</h3>



<p>This is true if the message appears to contain a picture (either MIME or uuencoded)</p>



<h3 class="wp-block-heading">isin("header","string-not-case-sensitive")</h3>



<p>This is a simple 'content' searching function if the named header contains the string (a non case sensitive match is used) eg:</p>



<pre class="wp-block-preformatted">if (isin("Subject","Free"))
reject "Probably a spammer selling something"</pre>



<p>This would reject a message containing a subject of "Get your Free pictures here" it would also reject a message containing a subject of "Is there any real freedom in the world?" so it's probably not a good rule <img src="https://s.w.org/images/core/emoji/15.0.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<h3 class="wp-block-heading">lines()</h3>



<p>This returns the number of lines in the message.</p>



<h3 class="wp-block-heading">match("header","wildcard")</h3>



<p>This function applies a simple wild card matching algorithm as is typically used to match file names, eg:</p>



<pre class="wp-block-preformatted">match("From","*@netwin.co.nz*")</pre>



<p>would match against a message from that domain.</p>



<h3 class="wp-block-heading">matchall("header","wildcardlist")</h3>



<p>Used for matching a single wild card&nbsp;against a header which contains a list of values, like Newsgroups:, Path: etc..., The match is TRUE only if all entries in the list match, eg:</p>



<pre class="wp-block-preformatted">if (matchall("Newsgroups","news.filters.*")) accept "It is only in the filters list so we will accept it"</pre>



<h3 class="wp-block-heading">matchone("header","wildcardlist")</h3>



<p>Identical to the above function but returns 'TRUE' if any match occurs.</p>



<h3 class="wp-block-heading">rexp("header","regular-expression")&nbsp;This function searches the named header for a regular expression, the matching is not case sensitive, use rexp_case() for a case sensitive version.</h3>



<h3 class="wp-block-heading">rexp_fast(spamdetect_score,"regular expression ","comment for spam header")</h3>



<p>This is just like rexp, but it does the search more efficiently, the first 2 characters of regular expression must be plain ascii (not a regular expression) if it's found in the body of the message then the score is added to the spam_detect header</p>



<h3 class="wp-block-heading">size()</h3>



<p>Returns the size in bytes of the current message can be used with &gt; and &lt; operators.</p>



<h3 class="wp-block-heading">call spamdetect(n,"reason")</h3>



<p>This function can be used to mark a message as possible spam, the 'n' is a (floating-point) number and each time this function is called for a message the total is increased, then finally a header is added to the message;</p>



<p>X-SpamDetect: &lt;stars&gt;: &lt;score&gt; &lt;reason1&gt; [reason2 [reason3 ... ]]<br><br>&lt;stars&gt; is a string of n stars, where n is the total score (capped at 20)<br>&lt;score&gt; is the total spam score<br></p>



<p>The idea is that users can then set their mail clients to filter messages based on this pseudo header. For instance, filtering any message with "******" in its X-SpamDetect header will throw out any message with a score of 6 or more.</p>



<p>Please note that "local.rul" should be used for adding scoring for ASPAM not mfilter.rul.</p>



<h3 class="wp-block-heading">call spawn("program.exe $FILE$")</h3>



<p>This function runs a program on each message the $FILE$ macro is replaced by a temporary file name containing the actual mail message. The return value of the program (return n; in main() function) is returned by this 'spawn' function, so it can be used to filter the message or allow it to continue. eg:</p>



<pre class="wp-block-preformatted">if (spawn("d:/path/xfilter.exe $FILE$")) reject "That was spam according to xfilter" </pre>



<p><strong>NOTE: The mfilter is only passed the first 14k of each message, and so the spawned program also only gets the first 14k not the entire message.</strong></p>



<h2 class="wp-block-heading">Actions</h2>



<h3 class="wp-block-heading">accept "reason"</h3>



<p>Accepts the current article reporting the "reason" specified in the log files.</p>



<h3 class="wp-block-heading">clearflag("flag-name")</h3>



<p>Used to set the specified flag variable to the false state.</p>



<h3 class="wp-block-heading">forward "remote@address.com"</h3>



<p>Forwards the message to the specified address and terminates processing.</p>



<h3 class="wp-block-heading">call forward_cc("new@email.address")</h3>



<p>Sends the current message to this new Email address in addition to any existing destination users.</p>



<h3 class="wp-block-heading">reject "reason" (or bounce "reason")</h3>



<p>Rejects the current article reporting the "reason" specified in the log files and to the user</p>



<h3 class="wp-block-heading">call replace("header_name","wildcard_match_pattern","replacement_pattern")</h3>



<p>If the named header matches the 'wildcard_match_pattern' then the replacement pattern is applied, e.g.</p>



<p>replace("from","*@*.domain.name","BOB_%1@%2.other.name")Subject: "joe@this.domain.name"Would be translated to:Subject: "BOB_joe@this.other.name"</p>



<h3 class="wp-block-heading">call report("manger@email.address","subject of message")</h3>



<p>Sends an Email, including the top part of the offending message, to the specified person, with the specified subject. This is intended when you want to be alerted to something but don't want to simply forward the message itself which may be 'confusing' as it would look like the message had been sent to the manager directly.</p>



<h3 class="wp-block-heading">setflag("flag-name")</h3>



<p>Used to set the specified flag variable to the true state.<br></p>



<h2 class="wp-block-heading">Regular Expression Syntax - In Brief</h2>



<p>Please note you need to escape spaces in this implementation.<br>eg:</p>



<p>sweepstake lottery / international program<br>sweepstake lottery/ international program<br>sweepstake lottery /international program</p>



<p>So what you want is this. Just put slashes in front of the spaces.</p>



<p>sweepstake lottery( / | /|/ )international program</p>



<p>if (rexp("subject","sweepstake lottery(\ /\ |\ /|/\ )international program")) bounce "a"</p>



<p><br><strong>\s</strong>&nbsp;= white space<br><strong>\S</strong>&nbsp;= not white space<br><strong>\d</strong>&nbsp;= digit<br><strong>\D</strong>&nbsp;= not digit<br><strong>\b</strong>&nbsp;= word boundary<br><strong>\B</strong>&nbsp;= not word boundary<br><strong>\x00</strong>&nbsp;= Hex character</p>



<p><strong>.</strong>&nbsp;(period) represents any one character.<br><strong>[]</strong>&nbsp;(brackets) contain a set of characters from which a match can be made. It corresponds to one character in the search string.<br><strong>\</strong>&nbsp;(backslash) is an escape character which means that the next character will not have a special meaning.<br><strong>*</strong>&nbsp;(asterisk) is a multiplier. It will match zero or more of the previous character. (Note: it is not a wildcard character as in file names.)<br><strong>?</strong>&nbsp;(question mark) is a multiplier. It will match zero or one of the previous character. (Note: it is not a wildcard character as in file names.)<br><strong>+</strong>&nbsp;(plus) is a multiplier. It will match one or more of the previous character.<br><strong>{}</strong>&nbsp;(squiggly brackets) contain a number which specifies an exact number of the previous character, or range {2,3}<br><strong>[^]</strong>&nbsp;(brackets containing caret and other characters) means any characters except the character(s) after the caret symbol<br>in the brackets.<br><strong>^</strong>&nbsp;(caret) is the start of the line.<br><strong>$</strong>&nbsp;(dollar) is the end of the line.<br><strong>(Note the following \&lt; \&gt; (begin and end word) are not implemented, use \b instead)</strong></p>



<p><strong>[:alpha:]</strong>&nbsp;represents any alphabetic letter.<br><strong>[:digit:]</strong>&nbsp;represents any single-digit number.<br><strong>[:blank:]</strong>&nbsp;represents a space or tab.</p>



<p><strong>Lookahead operator</strong><br>Free(?!dom|bsd) matches freesex but not freedom or FreeBSD</p>



<p><strong>OR operator</strong><br>| (pipe) is OR. It requires that the joined expressions have parentheses around them.</p>



<h4 class="wp-block-heading">Examples:</h4>



<p>e.a matches eta, eda, e1a, but not Eta<br>[eE].a matches eta and Eta<br>E.*a matches Eudora, Etcetera, Ea<br>ho+p matches hop, hoop, hoooop, but not hp<br>etc\. matches etc. but not etc<br></p>



<h2 class="wp-block-heading">Example rule file:</h2>



<pre class="wp-block-preformatted">$sex = "fuck|xxx|sex"
$free = "free(?!dom|bsd|nix|serve)"
$pics = "pi[cx]"
$free_pictures = $free + $pics
$bad_guys = + "|freepictures|jus.?.?\.doi.?.?\.to|great\.site|webbinaries" \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + "|yad.?.?.?\.ion.?.?\.org|freehidden|joy.?.?\.to.?.?\.al|from.?behind" \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + "|love(youhon|ergirl|chatting|stofuck)|forever\.yours|\@ju.?.?\.sex|town.\girl|beachbums" \i</pre>



<pre class="wp-block-preformatted"># Do some processing which is specific to individual recipients
recipients
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (isin("recipient","manager@this.domain")) accept "Always accept for me so spammers can talk to me"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (isin("recipient","sales@your.domain")) then
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (isin("subject","order")) then
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Make a Duplicate of sale order
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; call forward_cc(<a href="mailto:sales_copy@your.domain">"sales_copy@your.domain"</a>)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end if
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end if
end recipients</pre>



<pre class="wp-block-preformatted"># Check for some known spammers and naughty subjects
if (rexp(subject,$free_pictures)) bounce "No emails about free pictures"
if (rexp(from,$bad_guys)) bounce "No emails from black listed people thanks"

# Strip local node names from from addresses:
call replace("From","*@*.parts.co.nz",<a href="mailto:$1@parts.co.nz">"%1@parts.co.nz"</a>)</pre>



<pre class="wp-block-preformatted">accept "Great, we liked the message"

</pre>



<h3 class="wp-block-heading">Example 2:</h3>



<p>We want to block any message that has been found in SURBL database. We will use the exists function to check if that header exists.</p>



<pre class="wp-block-preformatted">if (exists("X-Surbl")) reject "Your SPAM is not wanted here."</pre>



<p>You can easily change that to drop the message silently if you prefer<br></p>



<pre class="wp-block-preformatted">if (exists("X-Surbl")) drop "SURBL SPAM is not wanted here." </pre>



<p>(The reason will be logged so still important to put there)</p>



<h3 class="wp-block-heading">Example 3:</h3>



<p>We want to block any message with no subject header. SurgeMail adds a subject header if it is missing so we have to match on the text that SurgeMail adds.<br></p>



<pre class="wp-block-preformatted">if (isin("Subject","(No subject header)")) bounce "No Subject header"</pre>



<h3 class="wp-block-heading">Example 4:</h3>



<p>We want to block any message with an empty subject header.<br></p>



<pre class="wp-block-preformatted">if (head_len("Subject")&lt;1) bounce "Emtpy Subject header"</pre>



<h3 class="wp-block-heading">Example 5:</h3>



<p>I have a user fred in one of my local domains localdomain.com I only want him to be able to send to other users at localdomain.com and not to any other domains.</p>



<pre class="wp-block-preformatted">recipients
if (isin("from","fred@localdomain.com")) then
     if (!isin("recipient", "localdomain.com")) bounce "Sorry you can only send to localdomain.com"
end if </pre>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/mfilter-rule-syntax/">Mfilter rule syntax</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
