<?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>Accounts Archives - SurgeMail</title>
	<atom:link href="https://surgemail.com/article-categories/accounts/feed/" rel="self" type="application/rss+xml" />
	<link>https://surgemail.com/article-categories/accounts/</link>
	<description>Windows/Linux Mail Server Software</description>
	<lastBuildDate>Sun, 10 Mar 2024 23:59:30 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.1</generator>

<image>
	<url>https://surgemail.com/wp-content/uploads/2019/11/cropped-robot_80-32x32.png</url>
	<title>Accounts Archives - SurgeMail</title>
	<link>https://surgemail.com/article-categories/accounts/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<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>Rename a domain</title>
		<link>https://surgemail.com/knowledge-base/rename-a-domain/</link>
		
		<dc:creator><![CDATA[chrisp]]></dc:creator>
		<pubDate>Thu, 30 Jul 2020 22:55:47 +0000</pubDate>
				<guid isPermaLink="false">https://surgemail.com/?post_type=ht_kb&#038;p=2539</guid>

					<description><![CDATA[<p>How can I change a domain name in SurgeMail?</p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/rename-a-domain/">Rename a domain</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading" id="how-can-i-change-a-domain-name-in-surgemail">How can I change a domain name in SurgeMail?</h3>



<ol class="wp-block-list">
<li>Stop Surgemail</li>



<li>Make a backup of nwauth.* and surgemail.ini</li>



<li>If using nwauth, then Run&nbsp;./nwauth -rename old.domain.name new.domain.name (Run this as user 'mail' from the surgemail home path) </li>



<li>If not using nwauth change the domain names in your database for each user somehow <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;" /></li>



<li>Edit surgemail.ini and change the vdomain name=”OLD.DOMAIN.NAME” TO “NEW.DOMAIN.NAME”</li>



<li>And add ‘host_alias “old.domain.name” if desired.</li>



<li>Generally you shouldn't change/update mailbox_path unless you plan on renaming the physical folder to match.  </li>



<li>Open 'domuser.dat' with a text editor and search/replace the old domain for the new domain.</li>
</ol>



<p></p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/rename-a-domain/">Rename a domain</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Authent Module Mysqlauth</title>
		<link>https://surgemail.com/knowledge-base/authent-module-mysqlauth/</link>
		
		<dc:creator><![CDATA[chrisp]]></dc:creator>
		<pubDate>Wed, 06 Nov 2019 23:16:48 +0000</pubDate>
				<guid isPermaLink="false">http://surgemail.com/?post_type=ht_kb&#038;p=836</guid>

					<description><![CDATA[<p>Installing and Setup Some applications come with MySQLAuth already built. If you have not got a build and/or require the latest code it can be downloaded from the one of the links below: Source: authsrc_25q.tar.gz 118k Windows mysqlauth_25q_win.zip 609k Linux (libc6)(For mysql v4.0) mysqlauth_2.5a_linux.tar.gz 594k Linux 64bit mysqlauth_25q_linux64.tar.gz Solaris(For mysql v4.0) mysqlauth_2.4b_solaris7_sparc.tar.gz 670k MacOSX (source<br /><a class="moretag" href="https://surgemail.com/knowledge-base/authent-module-mysqlauth/">+ Read More</a></p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/authent-module-mysqlauth/">Authent Module Mysqlauth</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading"><a>Installing and Setup</a></h3>



<p>Some applications come with MySQLAuth already built. If you have not got a build and/or require the latest code it can be downloaded from the one of the links below:</p>



<figure class="wp-block-table"><table><tbody><tr><td>Source:</td><td><a href="https://netwinsite.com/ftp/misc/auth_src_25q.tar.gz">authsrc_25q.tar.gz</a></td><td>118k</td></tr><tr><td>Windows</td><td><a href="https://netwinsite.com/ftp/authent/mysqlauth_25q_win.zip">mysqlauth_25q_win.zip</a></td><td>609k</td></tr><tr><td>Linux (libc6)<br>(For mysql v4.0)</td><td><a href="https://netwinsite.com/ftp/authent/mysqlauth_25a_linux.tar.gz">mysqlauth_2.5a_linux.tar.gz</a></td><td>594k</td></tr><tr><td>Linux 64bit<br></td><td><a href="https://netwinsite.com/ftp/authent/mysqlauth_25q_linux64.tar.gz">mysqlauth_25q_linux64.tar.gz</a><br></td><td><br></td></tr><tr><td>Solaris<br>(For mysql v4.0)</td><td><a href="https://netwinsite.com/ftp/authent/mysqlauth_2.4b_solaris7_sparc.tar.gz">mysqlauth_2.4b_solaris7_sparc.tar.gz</a></td><td>670k</td></tr><tr><td>MacOSX (source patched)</td><td><a href="https://netwinsite.com/ftp/authent/auth_src_25p_sly-macos-patch2.tar.xz">auth_src_25p_sly-macos-patch2.tar.xz</a></td><td></td></tr></tbody></table></figure>



<p><a><strong>Building From Source:</strong></a></p>



<p>If you are building MySQLAuth from the source you will need to have a C compiler either cc or<br>gcc and make. To build the command line prompt would be:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>make -f Makefile.mysql config=linux<br></p>
</blockquote>



<p><a><strong>Configuration Options:</strong></a></p>



<p>MySQLAuth comes requires an&nbsp;<em><strong>mysqlauth.ini</strong></em>&nbsp;to configurate it's options. This file is located in the same directory as the MySQLAuth binary OR in a directory specified by the -path command line option.</p>



<p>You should consult the&nbsp;<em><strong>mysqlauth.ini</strong></em>&nbsp;that comes with the mysqlauth download this will display all the default and common settings that you will need.Here is an example of what this file should look like:</p>



<figure class="wp-block-table"><table><tbody><tr><td><strong># Welcome to MySQLAuth ini File.<br># Leading # makes line a comment<br># Save this file to /etc/mysqlauth.ini or c:\winnt\system32\mysqlauth.ini or<br># in same directory as executable.<br># Manual page is at, http://www.netwinsite.com/dmail/mysqlauth.htm<br># -------------------------------------------------------------------------------------# SQL Table Field Names<br># ---------------------</strong>domain your.domain.commysql_server your.sql.server<br>mysql_login loginname<br>mysql_password xpassword<br>mysql_mail_user_db maildb<br>mysql_mail_user_table maildb<br># mysql_mail_uid 99use_sqlupdate truefield_username username<br>field_password passwd<br>field_forward forward<br># field_quota quota<br># field_mailmask mailmask<br># field_maildrop maildrop# mysql_pwd_set true<br># unix_password true<br># plain_password true<strong># Surgemail defaults<br># -------------------<br></strong># info_fields created created<br># info_fields full_name full_name<br># info_fields phone phone<br># info_fields pass_question pass_question<br># info_fields pass_answer pass_answer<br># info_fields groups groups<br><strong># SQL Aliasing<br># ------------<br># If you are using SurgeMail this section is not needed.<br># As aliasing in surgeMail is NOT stored in the external<br># database. This section is for systems which have external<br># apps which create/maintain a seperate alias database.<br><br></strong># mysql_mail_alias_db maildb<br># mysql_mail_alias_table alias# field_aliasuser alias<br># field_alias username<strong># Other Extended Fields<br># ----------------<br></strong># info_fields &lt;mysql schema field> &lt;netauth field><br># enable new format passwords (mysql 8) mysqlauth 2.5q<br>mysql_password_field SHA2<br></td></tr></tbody></table></figure>



<p>The table below display the available options are available to use:</p>



<style>
table, th, td {
  border: 1px solid black;
  border-collapse: collapse;
}
</style>
<table class="wp-block-table"><tbody><tr><td width="10%"><strong>Label</strong></td><td width="10%"><strong>Example</strong></td><td><strong>Default</strong></td><td><strong>Explanation</strong></td></tr><tr><td>domain</td><td>your.default.domain</td><td>none</td><td>This is default domain that is appended to any username which does not already have a domain setting attached.</td></tr><tr><td>field_username</td><td>user</td><td>username</td><td>The label of the username field in your table.</td></tr><tr><td>field_password</td><td>password</td><td>passwd</td><td>The label of the password field in your table.</td></tr><tr><td>field_forward</td><td>fwd</td><td>forward</td><td>The label of the forward field in your table. This is the forwarding information that SurgeMail uses to determine whether mail for the account looked up should be delivered to a different address.</td></tr><tr><td>field_quota</td><td>quota</td><td>none</td><td>The label of the quota field in your table. This is the disk quota which the user has.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; eg: 100k,&nbsp; 10M</td></tr><tr><td>field_mailmask</td><td>mailmask</td><td>none</td><td>The label of the mailmask field in your table. This is the IP mask which MySQLAuth checks against the from IP of the user. If specified, this forces the user to connect only to the specified IP in order to collect mail (POP).</td></tr><tr><td>field_maildrop</td><td>maildrop</td><td>none</td><td>The label of the maildrop field in your table. This is the location where SurgeMail will drop the user mail files. NB: if the field value is empty in the database (NULL), MySQLAuth will return the keyword 'config' indicating that the server knows where to locate the drop file.</td></tr><tr><td>info_fields</td><td>auth_name mysql_name</td><td>none</td><td>This setting allows you to pass any MySQL setting in the user database back to the program that is using MySQLAuth. The 'mysql_name' is the name that your MySQL server uses. 'auth_name' is the name that you want MySQLAuth to display when returning the information.</td></tr><tr><td>log_path</td><td>mysqlauth.log</td><td>auth.log</td><td>This is the MySQLAuth log file.</td></tr><tr><td>mysql_server<br>mysql_server2</td><td>your.sql.server</td><td>none</td><td>This is the IP or name of the computer hosting the MySQL server. The second MySQL server setting is used if the first server goes down.</td></tr><tr><td>mysql_login</td><td>username</td><td>none</td><td>This is the username that has access to the correct database and table that stores the usernames and passwords.</td></tr><tr><td>mysql_password</td><td>password</td><td>none</td><td>This is the password that is required and used in conjunction with mysql_login.</td></tr><tr><td>mysql_mail_user_db</td><td>user_data</td><td>maildb</td><td>This is the database name where the mail usernames are stored.</td></tr><tr><td>mysql_mail_user_table</td><td>users_list</td><td>maildb</td><td>This is the table name that is within the mail user database that has the user details.</td></tr><tr><td>mysql_mail_alias_db</td><td>alias_data</td><td>none</td><td>This is the database name where the alias usernames are stored.</td></tr><tr><td>mysql_mail_alias_table</td><td>alias_list</td><td>aliasdb</td><td>This is the table name that is within the alias user database that has the user details.</td></tr><tr><td>mysql_mail_uid</td><td>99</td><td>0</td><td>This is the unique mail ID. NB: by default, MySQLAuth returns 0 for this, which indicates to the SurgeMail Servers that the user ID should not be checked.</td></tr><tr><td>sqlsuffix_lookup_where</td><td>&nbsp;admin=false</td><td>none</td><td>This is the extra information that is added to the end of the 'SELECT .. FROM .. WHERE" MySQL command when the MyAuth is doing a lookup command.</td></tr><tr><td>sqlsuffix_check_where</td><td>&nbsp;admin=false</td><td>none</td><td>This is the extra information that is added to the end of the 'SELECT .. FROM .. WHERE" MySQL command when the myauth is doing a check command.</td></tr><tr><td>sqlsuffix_set</td><td>&nbsp;admin=false</td><td>none</td><td>This is the extra information that is added to the end of the 'SET" MySQL command.</td></tr><tr><td>domain_split</td><td>mysqldomainname</td><td>none</td><td>This will split up the user@domain into 2 separate fields when talking to the SQL server. Were the value of this setting is the name of the MySQL server label.</td></tr><tr><td>unix_password</td><td>true</td><td>none</td><td>This will encode passwords with the unix 'crypt()' command.</td></tr><tr><td>check_md5</td><td>true</td><td>false</td><td>Enable md5 password checking</td></tr><tr><td>use_md5_prefix</td><td>true</td><td>false</td><td>Add the 'md5' prefix to md5 encrypted passwords {md5}</td></tr><tr><td>set_md5</td><td>true</td><td>false</td><td>Generate 'md5' encrypted passwords when setting a new password</td></tr><tr><td>md5_salt_field</td><td>salt</td><td>none</td><td>The field in your database that contains the 'salt' information for password checking</td></tr><tr><td>use_sqlupdate</td><td>true</td><td>false</td><td>This causes 'set' commands to use the mysql update function to modify users. The default behaviour is to delete and re-create them. (we recommend using 'true' and the update function) (this setting is no longer used in mysqlauth version 2.5 it automatically uses update if the record exists)</td></tr></tbody></table>



<p><a><strong>Command Line Options:</strong></a></p>



<figure class="wp-block-table"><table><tbody><tr><td>-path</td><td>Tells mysqlAuth where to create it's logfile and where to find it's config file.</td></tr><tr><td>-debug</td><td>Sets debug mode writing debug message to output (should not be used with SurgeMail or similar with this specified)</td></tr><tr><td>-log</td><td>Turns on logging to nwauth.log.</td></tr><tr><td>-version</td><td>This display the mysqlAuth version information</td></tr><tr><td>-filtername,str1,str2</td><td>The username on a set,del,lookup,check command is check for 'str1' and replaced with 'str2'</td></tr><tr><td>-convert_nwauth nwauth_path</td><td>This will create a 'nw_convert.bat' file from the nwauth.add and nwauth.txt files that when run will run MySQLAuth with various command to make the SQL database match NWAuth setup.</td></tr></tbody></table></figure>



<hr class="wp-block-separator has-css-opacity"/>



<h3 class="wp-block-heading"><a>Supported Commands</a></h3>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>The commands below are the list of commands that this module supports. For a full description about the command see&nbsp;<a href="https://netwinsite.com/authent/protocol.htm">Authentication Protocol</a></p>
</blockquote>



<figure class="wp-block-table"><table><tbody><tr><th>Command</th><th>Parameters</th></tr><tr><td>check</td><td>&lt;user&gt; &lt;pass&gt;</td></tr><tr><td>lookup</td><td>&lt;user&gt;</td></tr><tr><td>set</td><td>&lt;user&gt; &lt;pass&gt;|(NULL) [label="value"]</td></tr><tr><td>del</td><td>&lt;user&gt;</td></tr><tr><td>search</td><td>&lt;string&gt; [-from n] [-max m]</td></tr><tr><td>version</td><td><br></td></tr><tr><td>verbose</td><td><br></td></tr><tr><td>help</td><td><br></td></tr><tr><td>quit</td><td><br></td></tr><tr><td>exit</td><td><br></td></tr></tbody></table></figure>



<hr class="wp-block-separator has-css-opacity"/>



<h3 class="wp-block-heading">Creating/Using a MySQL Database</h3>



<p>MySQLAuth requires a MySQL database which is setup and working. The database that is setup must have a username and a password that is encrypted using the MySQL command PASSWORD(). You can either create a new database/table for MySQLAuth or use a current database that has usernames and passwords.</p>



<p><strong>New Database:</strong></p>



<p>Below are instructions on how to setup a brand new database and table to work with MySQLAuth, with all of the features that MySQLAuth provides.</p>



<pre class="wp-block-preformatted">Install mysql server (we used 5.1 but any version should work)
Setup a root password:
	mysqladmin -u root password secret
Set those details in mysqlauth.ini
	mysql_login root
	mysql_password secret
Create database:


	mysql -u root -p
	Password> secret
create database maildb;
use maildb;

# Note 'groups' change to 'xgroups' due to syntax change in mysql
# Translation added in mysqlauth.ini

CREATE TABLE maildb (
        username VARCHAR(128) binary DEFAULT '' NOT NULL,
        passwd VARCHAR(128) DEFAULT '*' NOT NULL,
        forward VARCHAR(255) DEFAULT '',
        quota VARCHAR(20) DEFAULT '',
        mailmask VARCHAR(18) DEFAULT '0.0.0.0' NOT NULL,
        maildrop VARCHAR(255),
        domain VARCHAR(128) DEFAULT '',

       created VARCHAR(20) DEFAULT '',
       full_name VARCHAR(128) DEFAULT '',
       phone VARCHAR(128) DEFAULT '',
       xgroups VARCHAR(255) DEFAULT '',

       smsto VARCHAR(128) DEFAULT '',
       mailaccess VARCHAR(255) DEFAULT '',
       mailstatus VARCHAR(128) DEFAULT '',
       spf_block VARCHAR(20) DEFAULT '',
       disabled VARCHAR(20) DEFAULT '',
       alias_quota VARCHAR(20) DEFAULT '',
       list_quota VARCHAR(20) DEFAULT '',
       user_access VARCHAR(255) DEFAULT '',
       send_limit VARCHAR(20) DEFAULT '',
       tohost VARCHAR(255) DEFAULT '',
       realuser VARCHAR(255) DEFAULT '',
       allow VARCHAR(255) DEFAULT '',
       friends VARCHAR(20) DEFAULT '',
       enotify VARCHAR(255) DEFAULT '',

       ddpriv VARCHAR(128) DEFAULT '',
       ddfrom VARCHAR(128) DEFAULT '',
       ccname VARCHAR(128) DEFAULT '',
       ccnumber VARCHAR(128) DEFAULT '',
       ccexpires VARCHAR(20) DEFAULT '',
       ccciv VARCHAR(128) DEFAULT '',
       cctype VARCHAR(128) DEFAULT '',
        PRIMARY KEY (username)
);
CREATE TABLE alias (
       username VARCHAR(128) binary DEFAULT '' NOT NULL,
       alias VARCHAR(128) binary DEFAULT '' NOT NULL,
       PRIMARY KEY (username)
);

# Create an example user to test with (change your.domain to match your surgemail domain name)
INSERT INTO maildb VALUES ('test@your.domain', SHA2('test',512), '','100mb', '0.0.0.0','','',''   ,'','','','','','','','','','','','','','','','','','','','','','','',''   );
</pre>



<p>To manually remove a user the command is:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>DELETE FROM maildb WHERE username='test@test.org'</p>
</blockquote>



<p>The inserting and deleting of users is usually taken care of by MySQLAuth. The above is to show how you would do this manually.</p>



<p>The mysqlauth.ini settings for the above would look like the following:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>mysql_server your.sql.server<br>mysql_login root<br>mysql_password password</p>



<p>domain your.default.domain</p>



<p>mysql_mail_user_db maildb<br>mysql_mail_user_table maildb</p>



<p>field_username username<br>field_password passwd<br>field_forward forward<br>field_quota quota<br>field_mailmask mailmask<br>field_maildrop maildrop</p>



<p>info_fields created created<br>info_fields full_name full_name<br>info_fields phone phone<br>info_fields pass_question pass_question<br>info_fields pass_answer pass_answer<br>info_fields groups xgroups</p>
</blockquote>



<h3 class="wp-block-heading">Now test the authent module manually:</h3>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>c:&gt; mysqlauth<br>lookup test@your.domain<br>check test@your.domain test<br>set test2@your.domain test2<br>check test2@your.domain test2<br>quit</p>
</blockquote>



<p><strong>Using Current DataBase:</strong></p>



<p>If you already have an existing database which you wish to use then as long as the usernames are unique and the password field is encrypted using the PASSWORD() MySQL command you should simply be able to change the ini settings to point to this database, table and field label names.</p>



<p>eg: If you have a database called '<strong>accounts</strong>' and a table called '<strong>mail_users</strong>' that stores all sorts of information but has the username field names '<strong>name</strong>' and the password field called '<strong>pwd</strong>' then the ini settings that you required are:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>mysql_server your.sql.server<br>mysql_login login<br>mysql_password password</p>



<p>domain your.default.domain</p>



<p>mysql_mail_user_db accounts<br>mysql_mail_user_table mail_users</p>



<p>field_username name<br>field_password pwd</p>
</blockquote>



<p>If you also have the ability to store the mail quota or forwarding, then you can add these ini settings as well...</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>ie:&nbsp;&nbsp;&nbsp; field_forward forward<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; field_quota quota</p>
</blockquote>



<hr class="wp-block-separator has-css-opacity"/>



<h3 class="wp-block-heading">Converting nwauth database to mysqlauth</h3>



<p><br>The MySQLAuth binary has a command line switch -convert_nwauth to convert the nwauth database into mysql, use it like this:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>nwauth -size 1<br>set a a<br>del a<br>quit<br>(unix) ./mysqlauth -convert_nwauth /usr/local/surgemail ./mysqlauth<br>(windows) mysqlauth -convert_nwauth c:\surgemail mysqlauth<br></p>
</blockquote>



<p>and it will produce 2 files:<br>nw_convert.bat<br>nw_input.dat</p>



<p>Edit mysqlauth.ini and set&nbsp;<strong>plain_password true</strong></p>



<p>These represent 2 different ways to import the users, we'll just use the 2nd method which is faster. Before you do, you need to set the:<br>plain_password true setting in mysqlauth.ini, this prevents it from re-encoding the<br>already encoded password, once set you can run:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>./mysqlauth &lt; nw_input.dat<br></p>
</blockquote>



<p>Edit mysqlauth.ini and set&nbsp;<strong>unix_password true</strong></p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/authent-module-mysqlauth/">Authent Module Mysqlauth</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Authent Module Ldapauth</title>
		<link>https://surgemail.com/knowledge-base/authent-module-ldapauth/</link>
		
		<dc:creator><![CDATA[chrisp]]></dc:creator>
		<pubDate>Wed, 06 Nov 2019 23:07:31 +0000</pubDate>
				<guid isPermaLink="false">http://surgemail.com/?post_type=ht_kb&#038;p=834</guid>

					<description><![CDATA[<p>Installing and Setup Some applications already come with this verison already built. If you have not got a build and/or require the lastest code it can be downloaded from the one of the links below: Source: auth_src_2.4c.zip Windows ldapauth_25j.zip Linux 32bit ldapauth_25j_linux.tar.gz Linux 64bit ldapauth_25p_linux64.tar.gz Old Versions: Windows ldapauth_2.5a_windows.zip Linux (Libc6) ldapauth_2.5b_linux.tar.gz Building From Source:<br /><a class="moretag" href="https://surgemail.com/knowledge-base/authent-module-ldapauth/">+ Read More</a></p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/authent-module-ldapauth/">Authent Module Ldapauth</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading">Installing and Setup</h3>



<p>Some applications already come with this verison already built. If you have not got a build and/or require the lastest code it can be downloaded from the one of the links below:</p>



<figure class="wp-block-table"><table><tbody><tr><td>Source:</td><td><a href="ftp://netwinsite.com/pub/authent/auth_src_2.4c.zip">auth_src_2.4c.zip</a></td></tr><tr><td>Windows</td><td><a href="https://netwinsite.com/ftp/authent/ldapauth_25j.zip">ldapauth_25j.zip</a></td></tr><tr><td>Linux 32bit</td><td><a href="https://netwinsite.com/ftp/authent/ldapauth_25j_linux.tar.gz">ldapauth_25j_linux.tar.gz</a></td></tr><tr><td>Linux 64bit</td><td><a href="https://netwinsite.com/ftp/authent/ldapauth_25p_linux64.tar.gz" data-type="URL" data-id="https://netwinsite.com/ftp/authent/ldapauth_25p_linux64.tar.gz" target="_blank" rel="noreferrer noopener">ldapauth_25p_linux64.tar.gz</a></td></tr><tr><td>Old Versions:</td></tr><tr><td>Windows</td><td><a href="https://netwinsite.com/ftp/authent/ldapauth_2.5a_windows.zip">ldapauth_2.5a_windows.zip</a></td></tr><tr><td>Linux (Libc6)</td><td><a href="https://netwinsite.com/ftp/authent/ldapauth_25b_linux.tar.gz">ldapauth_2.5b_linux.tar.gz</a></td></tr></tbody></table></figure>



<p><strong>Building From Source:</strong></p>



<p>If you are building LDAPAuth from the source you will need to have a C compiler either cc or<br>gcc and make. To build the command line prompt would be:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>make -f Makefile.ldap</p></blockquote>



<p><strong>Setting up with OpenLDAP:</strong></p>



<p>If your ldap server is OpenLDAP you will need to enable 'bind_v2' so that LDAPAuth will correctly bind to OpenLDAP. LDAPAuth currently only supports simple binding. You need to add the following line to openldap file 'slapd.conf':<br></p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>allow bind_v2</p></blockquote>



<p>The default schema 'person' should be used. This schema does not support the most of the surgemail default fields, and you will need to update the schema to include the fields that you wish to store.</p>



<p><strong>Setting up with SurgeLDAP:</strong></p>



<p>SurgeLDAP has been setup to use the 'netwinperson' schema instead of the deafult 'person' schema. In your ldapauth.ini file you should add the setting:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>ldap_objectclass netwinperson</p></blockquote>



<p>This schema has already been setup to support all the surgemail and surgeftp fields to make it easy to just include the fields that you wish to support.</p>



<p><strong>Configuration Options:</strong></p>



<p>LDAPAuth comes requires an&nbsp;<em><strong>ldapauth.ini</strong></em>&nbsp;to configurate it's options. This file is located in the same directory as the LDAPAuth binary OR in a directory specified by the -path command line option.</p>



<p>You should consult the&nbsp;<em><strong>ldapauth.ini</strong></em>&nbsp;that comes with the LDAPAuth download this will display all the default and common settings that you will need. Here is an example of what this file should look like:</p>



<figure class="wp-block-table"><table><tbody><tr><td><strong># Welcome to Auth ini File.<br># Leading # makes line a comment</strong><strong># Main LDAP connection Information</strong><br>ldap_host ldap.host<br>ldap_port 389ldap_mgr_dn cn=manager,dc=example,dc=com<br>ldap_mgr_pw mpass<br># pop_domain host.com<strong># LDAP Main Fields</strong><br>ldap_search_base dc=example,dc=com<br>ldap_scope LDAP_SCOPE_ONELEVEL<br>#&nbsp;ldap_scope LDAP_SCOPE_SUBTREE# ****** SurgeLDAP v1.0j+ use 'netwinperson' ****<br># ldap_objectclass person<br># ldap_objectclass netwinperson<br># ldap_search_name mail<br># ldap_extend_search (AnyAttribute==AnyValue)<br># ldap_extend_lookup (AnyAttribute==AnyValue)<br># field_password UserPassword<strong># LDAP Optional Fields<br># --------------------</strong># ldap_extend_search (usertype=student)<strong># SurgeMail/DMail and NetAuth Settings<br># ------------------------------------<br># layout: info_fields surgemail_field ldap_field<br></strong># info_fields created created<br>info_fields fwd fwd<br>info_fields quota quota<br><strong># SurgeMail Only Settings<br># ------------------------------------<br></strong># If surgemail is setup as a proxy you need this setting<br># info_fields tohost tohost<br># info_fields allow allow# info_fields mailaccess mailaccess<br># info_fields mailstatus mailstatus<br># info_fields full_name givenName<br># info_fields phone homePhone<br># info_fields smsto smsto<br># info_fields user_access user_access# info_fields alias_quota alias_quota<br># info_fields list_quota list_quota<br># info_fields user_access user_access<br># info_fields send_limit send_limit# info_fields spf_block spf_block<br># info_fields disabled disabled# info_fields realuser realuser<br># info_fields friends friends<br># info_fields enotify enotify<br># info_fields ddpriv ddpriv<br># info_fields ddfrom ddfrom<br><br><strong># SurgeMail and NetAuth Settings<br># ------------------------------<br></strong># info_fields pass_question pass_question<br># info_fields pass_answer pass_answer<strong># SurgeMail/DMail and DNews Settings<br># ----------------------------------<br></strong># info_fields groups groups<strong># SurgeFTP Settings<br># -----------------<br></strong># info_fields ftphome ftphome<br># info_fields ftpquota ftpquota<br># info_fields ftpfromip ftpfromip<br># info_fields ftpgid ftpgid<br># info_fields ftpuid ftpuid<br># info_fields accountstatus accountstatus<strong># LDAP MUST HAVE fields</strong><br>must_set_fields sn name<br>must_set_fields cn name<strong># NWAuth Password Method</strong>&nbsp;(defaults to plain text)<br># unix_password true<br># use_crypt_on_set true<br># plain_password true<br># sha_hash true<br># ssha_hash true</td></tr></tbody></table></figure>



<h2 class="wp-block-heading">Config settings</h2>



<h4 class="wp-block-heading">info_fields </h4>



<p>Use setting to inform LDAPAuth of pairs of database field names. It takes a list of up to 20 comma separated pairs of field names, where each pair is two words separated by a space. In each pair the first name is the name that LDAPAuth should lookup in your LDAP database and the second is the name it should display in the output.</p>



<p>Syntax: info_fields db_name1 field_name1,[...]<br>Example: info_fields groups usergroups,diskquota ftpquota<br>Default: none<br>Required Setting: no</p>



<h4 class="wp-block-heading">ldap_group_base </h4>



<p>(Version 1.1a, DMail 3.0) These four settings are used to pass the group membership through to DNews for access control. It is much better to use the info_fields when possible (it is much more efficient). ldap_group_base defines where in the LDAP database group information is found. See below this table for more info on using this.</p>



<p>Example: ldap_group_base dc=netwin,dc=co,dc=nz<br>Default: none<br>Required Setting: no</p>



<h4 class="wp-block-heading">ldap_group_search </h4>



<p>A search that will find the LDAP objects that contain usergroup information, it's best to make this as specific as possible.</p>



<p>Example: ldap_group_search cn=group*<br>Default: none<br>Required Setting: no</p>



<h4 class="wp-block-heading">ldap_group_field </h4>



<p class="has-text-align-left">Specify the field that contains the users email address in usergroup objects.</p>



<p>Example: ldap_group_field cn<br>Default: cn<br>Required Setting: no</p>



<h4 class="wp-block-heading">ldap_group_attrib </h4>



<p>Specify the attribute in a user group object that contains the information about each user.</p>



<p>Example: ldap_group_attrib uniquemember<br>Default: uniquemember<br>Required Setting: no</p>



<h4 class="wp-block-heading">ldap_port </h4>



<p>The TCPIP port to connect to the LDAP server on.</p>



<p>Example: ldap_port 3890<br>Default: 389<br>Required Setting: no</p>



<h4 class="wp-block-heading">log_path </h4>



<p>The file to store log files in</p>



<p>Example: log_path c:\logs\auth.log<br>Default: the location of the LDAPAuth executable ldapauth.log (older versions wrote to auth.log by default)<br>Required Setting: no</p>



<h4 class="wp-block-heading">max_log_size</h4>



<p>The size at which log files are rotated. Logs are numbered 1,2,3,4</p>



<p>Example: max_log_size 10000<br>Default: 100000<br>Required Setting: no</p>



<h4 class="wp-block-heading">log_level</h4>



<p> Controls the amount of information logged during use. One of error, info, debug.</p>



<p>Example: log_level debug<br>Default: info<br>Required Setting: no</p>



<h4 class="wp-block-heading">ldap_host</h4>



<p> The IP address or domain of the host to connect to, ie: the machine where the LDAP server is listening.</p>



<p>Example: ldap_host apples.com<br>Default: localhost<br>Required Setting: no</p>



<h4 class="wp-block-heading">ldap_mgr_dn </h4>



<p>The LDAP manager distinguished name to bind with. NB: add this field and the ldap_mgr_pw field with blank entries for anonymous login.</p>



<p>Example: ldap_mgr_dn cn=SurgeMail Manager<br>Default: cn=Directory Manager<br>Required Setting: yes</p>



<h4 class="wp-block-heading">ldap_mgr_pw </h4>



<p>The password for the ldap_mgr_dn entry.NB: add this field and the ldap_mgr_dn field with blank entries for anonymous login.</p>



<p>Example: ldap_mgr_pw secret<br>Default: none<br>Required Setting: yes</p>



<h4 class="wp-block-heading">ldap_search_base</h4>



<p>The LDAP search base to use for all interactions with the LDAP server</p>



<p>Example: ldap_search_base dc=apples,dc=com<br>(or, ldap_search_base o=apples)<br>Default: none<br>Required Setting: yes</p>



<h4 class="wp-block-heading">ldap_search_name</h4>



<p>&nbsp;<strong>IMPORTANT:</strong>&nbsp;Specifies the attribute used for identifying the users entry in the database. eg: when set to the default of mail, lookup bob, makes LDAPAuth lookup, mail=bob in database. (Prior to version 1.0k this was only used for lookups and not on the set command)</p>



<p>Example: ldap_search_name uid<br>Default: mail<br>Required Setting: no</p>



<h4 class="wp-block-heading">pop_domain </h4>



<p>The domain which will be appended to any usernames not containing @domain</p>



<p>NB: if set then you must use the setting,<br>authent_domain true<br>in surgemail.ini (and in netauth.ini if using&nbsp;<a href="http://www.netwinsite.com/netauth/">NetAuth</a>);</p>



<p>Example: pop_domain apples.com<br>Default: none<br>Required Setting: no, but recommended</p>



<h4 class="wp-block-heading">ldap_objectclass</h4>



<p> When adding new users LDAPAuth will add the new user to this ObjectClass.</p>



<p>Notes:</p>



<ul class="wp-block-list"><li>When using the set command, you must specify attributes (fields) and values for any attributes 'required' by the object class that you specify with this setting. You may not specify any attributes that are 'not allowed' in the objectclass.You must enter something like,<br>set username pass a="x" b="y" c="z"<br>, where the fields a, b and c MUST be allowed in the specified objectclass, otherwise you will get an 'objectclass violation' error message. If you get that message then generally you need to alter the fields you are trying to set. Yes we wish there was a more informative error message also! Version 1.0k of LDAPAuth (and above) at least logs exactly which attributes and their values it is trying to set.</li><li>Often people forget to set cn="xxx" and 'violate the objectclass', so remember to place it on the end of the set command (or make NetAuth put it there if using NetAuth).</li><li>Some older versions of LDAPAuth have the incorrect setting name,<br>ldapobjectclass<br>as an example in the example ldapauth.ini file.</li></ul>



<p>Example: ldap_objectclass umichPerson<br>(umichPerson has the mail attribute that Person often does not);<br>Default: Person<br>Required Setting: no if using LDAPAuth for read-only, yes if using set command.</p>



<h4 class="wp-block-heading">ldap_surgemail_forward</h4>



<p> Name of LDAP attribute in database which will be used to store SurgeMail forwarding addresses. It can be set blank. If a value for this attribute is found when doing a lookup or check command then LDAPAuth responds with the info field,<br>fwd="value"<br>e.g.,<br>fwd="bob@another_domain.com"<br>causing mail redirection to that address.</p>



<p>See the SurgeMail Manual section,<br><a href="https://netwinsite.com/authent/forward.htm#ext_auth_fwd_field">Ext. Auth Fwd Field</a>&nbsp;for further details.</p>



<p>Example: ldap_surgemail_forward alias<br>Default: mailForwardingAddress<br>Required Setting: yes, because you probably don't want that bad default!</p>



<h4 class="wp-block-heading">log_name </h4>



<p>Base of log file name. Note suffix n.log will be appended so default is ldapauth1.log</p>



<p>Example: log_name c:\mylogdir\<br>(umichPerson has the mail attribute that Person often does not);<br>Default: LDAPAuth<br>Required Setting: no</p>



<h4 class="wp-block-heading">sha_hash </h4>



<p>On set command only, take password given and use the SHA to hash it. NB: this setting is really obsoleted by SSHA, which is done by default. If you really want SHA then you need to set the two settings as per the example below.</p>



<p>Example (If you really do want SHA not SSHA or plaintext):<br>sha_hash true<br>ssha_hash_dont true<br>Default: false (ssha instead)<br>Required Setting: no</p>



<h4 class="wp-block-heading">ssha_hash_dont</h4>



<p>Unless this setting is set to true, on the set command only, LDAPAuth will hash the given password using SSHA and prepend the string, {ssha} to the start of it before sending to the database. That way the database knows to SSHA the password sent by the LDAPAuth check command before comparing it with that user's password in the database. Starting with version 1.0L LDAPAuth will SSHA all passwords when setting (adding) a user in the database. This setting is for turning that behaviour off.</p>



<p>To make LDAPAuth add users with plain text passwords as it used to, use the setting as per the example below and check that the sha_hash setting is false or not in the ini file.</p>



<p>Example: #sha_hash true (commented out, for plain text passwords)<br>ssha_hash_dont true<br>Default: false (ssha done automatically)<br>Required Setting: no</p>



<h4 class="wp-block-heading">ldap_access_wild</h4>



<p>A list of IP addresses from which POP logins are accepted if 'pop' is found in the users ldap_access_field field, this allows you to disable direct pop access and only allow POP access from your WebMail interface.</p>



<p>Example: ldap_access_wild 10.0.0.23,11.*,!11.1.1.2</p>



<p>ldap_access_field LDAP field in which to search for 'pop' if found then apply ldap_access_wild to POP logins dir_hash Makes LDAPAuth return a path for drop/bin processing, eg:</p>



<p>dir_hash 2 2 /var/mail</p>



<p>Would return /var/mail/ch/ri/chrisp instead of 'config' as the path.</p>



<h4 class="wp-block-heading">ldap_search_name_alt</h4>



<p> For example: ldap_search_name mail_alias</p>



<p>Would lookup the 'mail_alias' field for this user, if found, the ldap_uid field is then used to construct the drop path for this user, so this allows you to define aliases for a user. (very similar to forwarding)&nbsp;</p>



<p>The feature is not intended for general use, avoid it if possible, it is intended for backward compatibility with pre existing LDAP databases.</p>



<p>ldap_uid uid Sets the UID field to use to construct a path for a user, see above setting. ldap_mailhost If a user cannot be found the normal way, LDAPAuth will try the user part of the address as a ldap_uid search, and then see if the ldap_mailhost matches it, if so it then delivers to that uid. Again this setting is not for general use it is only for backward compatibility with existing LDAP databases. strip_domain true Removes the domain name from all lookups (can be useful with active directory or other ldap databases where the domain is not in the database) ldap_map_domain</p>



<p>This setting is used to map a 'domain.com' setting to a seperate 'search_base_dn'. This allows you to seperate each domain into a seperate part of the LDAP tree.<br>When you do this you should NOT map any sub domains.<br><br>ldap_map_domain domain.com dc=domain,dc=com<br>ldap_map_domain netwin.co.nz dc=netwin,dc=co,dc=nz</p>



<p>If not map for a domain is located it will default to the 'ldap_search_base' location.</p>



<p>Example: ldap_group_search cn=group*<br>Default: none<br>Required Setting: no</p>



<h4 class="wp-block-heading">ldap_group_field </h4>



<p>Specify the field that contains the users email address in usergroup objects.</p>



<p>Example: ldap_group_field cn<br>Default: cn<br>Required Setting: no</p>



<h4 class="wp-block-heading">ldap_group_attrib </h4>



<p>Specify the attribute in a user group object that contains the information about each user.</p>



<p>Example: ldap_group_attrib uniquemember<br>Default: uniquemember<br>Required Setting: no</p>



<h4 class="wp-block-heading">ldap_port </h4>



<p>The TCPIP port to connect to the LDAP server on.</p>



<p>Example: ldap_port 3890<br>Default: 389<br>Required Setting: no</p>



<h4 class="wp-block-heading">log_path</h4>



<p> The file to store log files in</p>



<p>Example: log_path c:\logs\auth.log<br>Default: the location of the LDAPAuth executable ldapauth.log (older versions wrote to auth.log by default)<br>Required Setting: no</p>



<p></p>



<p>Notes on using ldap_group* settings with DNews.</p>



<p><strong>Command Line Options:</strong></p>



<figure class="wp-block-table"><table><tbody><tr><td>-path</td><td>Tells LDAPAuth where to create it's logfile and where to find it's config file.</td></tr><tr><td>-debug</td><td>Sets the logging level to debug.</td></tr><tr><td>-log</td><td>Turns on logging to nwauth.log.</td></tr><tr><td>-version</td><td>This display the LDAPAuth version information</td></tr><tr><td>-filtername,str1,str2</td><td>The username on a set,del,lookup,check command is check for 'str1' and replaced with 'str2'</td></tr><tr><td>-convert_nwauth nwauth_path</td><td>This will create a 'nw_convert.bat' file from the nwauth.add and nwauth.txt files that when run will run LDAPAuth with various commands to make the LDAP database match NWAuth setup.</td></tr></tbody></table></figure>



<hr class="wp-block-separator"/>



<h3 class="wp-block-heading">Supported Commands</h3>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>The commands below are the list of commands that this module supports. For a full description about the command see&nbsp;<a href="https://netwinsite.com/authent/protocol.htm">Authentication Protocol</a></p></blockquote>



<figure class="wp-block-table"><table><tbody><tr><th>Command</th><th>Parameters</th></tr><tr><td>check</td><td>&lt;user&gt; &lt;pass&gt;</td></tr><tr><td>lookup</td><td>&lt;user&gt;</td></tr><tr><td>set</td><td>&lt;user&gt; &lt;pass&gt;|(NULL) [label="value"]</td></tr><tr><td>del</td><td>&lt;user&gt;</td></tr><tr><td>search</td><td>&lt;string&gt; [-from n] [-max m]</td></tr><tr><td>version</td></tr><tr><td>verbose</td></tr><tr><td>help</td></tr><tr><td>quit</td></tr><tr><td>exit</td></tr></tbody></table></figure>



<hr class="wp-block-separator"/>



<h3 class="wp-block-heading">How do I upgrade NWAuth to LDAPAuth</h3>



<p>To upgrade to LDAPAuth you need to following the following steps.</p>



<figure class="wp-block-table"><table><tbody><tr><td>Step 1:</td><td><strong>Create your LDAP schema and setup LDAPAuth seperatly.</strong></td></tr><tr><td>Ensure that your LDAPAuth uses the following ini setting:<br>unix_password true<br>The reason for this is that since NWAuth used 1 way encoding password you need to make LDAPAuth to use the same password encoding method.</td></tr><tr><td>Step 2:</td><td><strong>Test and get it working before nwauth user converted over.</strong></td></tr><tr><td>You will need version 2.2u of LDAPAuth to preform this migration.</td></tr><tr><td>You should be able to create, delete, lookup and check users.<br>ie. ./ldapauth<br>set lynden pass<br>search lyn*<br>lookup lynden<br>check lynden pass<br>del lynden<br></td></tr><tr><td>Step 3:</td><td><strong>Once LDAPAuth works correctly the next step is to migrate the nwauth information to the LDAP server.</strong></td></tr><tr><td>The 2 NetAuth files are 'nwauth.add' and 'nwauth.new', these are the 2 that need to be converted. keeping in mine that that ones that are deleted should not be added.<br><br>The Lastest LDAPAuth (v2.2u) as built in code to take these files and convert then into a .bat or .sh file that you can run which will populate LDAPAuth database.<br><br>To do this you run like this:<br>./ldapauth -convert_nwauth /usr/local/surgemail<br>or ./ldapauth -convert_nwauth c:\surgemail<br><br>This creates a file called: 'nw_convert.sh' or 'nw_convert.bat'<br><br>Before you run the batch file you first need to setup ldapauth to accept the passwords as plain text otherwise they will be encoded twice. To do this you need to remove/comment out the ini setting 'unix_password' and add this ldapauth.ini setting:<br>plain_password true<br>This will make sure that the password is added in as is. Once you have run the batch file you then will need to remove the 'plain_password' and place back the 'unix_password'.</td></tr><tr><td>Step 4:</td><td><strong>Test LDAPAuth.</strong></td></tr><tr><td>You should be able to search, lookup and check the users you have just added.<br>ie. ./ldapauth<br>search lyn*<br>lookup lynden<br>check lynden pass<br></td></tr></tbody></table></figure>



<hr class="wp-block-separator"/>



<h3 class="wp-block-heading">Example used with Active Directory (windows)</h3>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>ldap_host 10.1.1.1<br>ldap_port 389<br>ldap_mgr_dn cn=ftpadmin1,ou=mgt_info_sys,ou=CTL,ou=region_sales,dc=example,dc=com<br>ldap_mgr_pw secret_password<br>ldap_search_base OU=region_sales,dc=example,dc=com<br>ldap_scope LDAP_SCOPE_subtree<br>ldap_search_name ExampleAccountName<br>ldap_group_base OU=region_sales,dc=example,dc=com<br>ldap_group_search CN=&amp;*<br>ldap_group_field CN<br>ldap_group_attrib member</p></blockquote>



<h3 class="wp-block-heading">Downloading a recommended LDAP server</h3>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>OpenLDAP server, available at:<br><a href="http://www.openldap.org/">http://www.openldap.org/</a></p><p>We also test LDAPAuth against Netscape's LDAP server (a number of the defaults reflect this) and the University of Michigan server.</p><p>SDKs for LDAP are also available,<br><a href="http://www.openldap.org/">http://www.openldap.org/</a><br></p></blockquote>



<p>.</p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/authent-module-ldapauth/">Authent Module Ldapauth</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Authent Module NWAUTH</title>
		<link>https://surgemail.com/knowledge-base/authent-module-nwauth/</link>
		
		<dc:creator><![CDATA[chrisp]]></dc:creator>
		<pubDate>Wed, 06 Nov 2019 22:38:58 +0000</pubDate>
				<guid isPermaLink="false">http://surgemail.com/?post_type=ht_kb&#038;p=829</guid>

					<description><![CDATA[<p>Installing and Setup (windows) g_authent_process "c:\surgemail\nwauth.exe -path c:\surgemail" (linux) g_authent_process "./nwauth" Optional Command Line Options: -path Tells NWAuth where to create it's logfile and where to find it's config file. -debug Sets the logging level to debug. -log turns on logging to nwauth.log. -logpass testing option, log full command as given (includes password!) -readonly Use<br /><a class="moretag" href="https://surgemail.com/knowledge-base/authent-module-nwauth/">+ Read More</a></p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/authent-module-nwauth/">Authent Module NWAUTH</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading">Installing and Setup</h3>



<p>(windows) g_authent_process "c:\surgemail\nwauth.exe -path c:\surgemail"</p>



<p>(linux) g_authent_process "./nwauth" </p>



<p><br><strong>Optional Command Line Options:</strong></p>



<figure class="wp-block-table"><table><tbody><tr><td>-path</td><td>Tells NWAuth where to create it's logfile and where to find it's config file.</td></tr><tr><td>-debug</td><td>Sets the logging level to debug.</td></tr><tr><td>-log</td><td>turns on logging to nwauth.log.</td></tr><tr><td>-logpass</td><td>testing option, log full command as given (includes password!)</td></tr><tr><td>-readonly</td><td>Use on slaves that don't need to update files.</td></tr><tr><td>-encrypt user/all</td></tr><tr><td>-generate n</td><td>Creates accounters test0..testn passwords test.</td></tr><tr><td>-size x</td><td>Sets max size of nwauth.add.</td></tr><tr><td>-sleep x y</td><td>Testing option, sleep for y seconds first and every xth response</td></tr><tr><td>drop_path &lt;hash&gt; &lt;base&gt;</td><td>Testing option, give drop path using DPOP hashing, hash=0,1,2, base is common drop path</td></tr><tr><td>-badchar &lt;string&gt;</td><td>Overrides default bad character list with the string</td></tr><tr><td>-badchar_localpart &lt;string&gt;</td><td>Overrides default localpart (before the @) bad character list with the string</td></tr><tr><td>-allowats</td><td>Disables check for more than one '@' symbol in username</td></tr><tr><td>-allowhighascii</td><td>Disables check for high and low ascii in username</td></tr><tr><td>-nocrypt</td><td>Store passwords as plain text (security risk)</td></tr><tr><td>-decrypt</td><td>Decrypt passwords as users login. (security risk)</td></tr><tr><td>-showpass</td><td>Show password on lookups (security risk!)</td></tr></tbody></table></figure>



<hr class="wp-block-separator"/>



<h3 class="wp-block-heading">Error recovery - recover lost users.</h3>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>In the event of loosing some users from the database for any unknown reason (deleting a file manually etc) you can rebuild the user database like this using the journal entries it keeps.</p><p># First copy nwauth.* files</p><p>mkdir backup</p><p>copy nwauth.* backup</p><p># Then use this command to get a list of changes it will make:</p><p>nwauth -path . -test</p><p># Then run it with -fix to actually add the missing users:</p><p>nwauth -path . -fix</p></blockquote>



<hr class="wp-block-separator"/>



<h3 class="wp-block-heading">Supported Commands</h3>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>The commands below are the list of commands that this module supports. </p></blockquote>



<figure class="wp-block-table"><table><tbody><tr><th>Command</th><th>Parameters</th></tr><tr><td>check</td><td>&lt;user&gt; &lt;pass&gt;</td></tr><tr><td>lookup</td><td>&lt;user&gt;</td></tr><tr><td>set</td><td>&lt;user&gt; &lt;pass&gt;|(NULL) [label="value"]</td></tr><tr><td>del</td><td>&lt;user&gt;</td></tr><tr><td>search</td><td>&lt;string&gt; [-from n] [-max m]</td></tr><tr><td>help</td></tr><tr><td>quit</td></tr><tr><td>exit</td></tr></tbody></table></figure>



<h2 class="wp-block-heading">To make passwords visible in admin</h2>



<p>Obviously this is not recommended as it is a security risk, but on a small or home server this may be worth doing: </p>



<p>Use these two settings</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>g_authent_process "c:\surgemail\nwauth.exe -path c:\surgemail -nocrypt -decrypt -showpass"</p><p>g_authent_info name="Password" field="password" access="admin" default="" type=""</p></blockquote>



<p></p>



<p></p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/authent-module-nwauth/">Authent Module NWAUTH</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Authent Modules</title>
		<link>https://surgemail.com/knowledge-base/authent-modules/</link>
		
		<dc:creator><![CDATA[chrisp]]></dc:creator>
		<pubDate>Wed, 06 Nov 2019 21:34:05 +0000</pubDate>
				<guid isPermaLink="false">http://surgemail.com/?post_type=ht_kb&#038;p=810</guid>

					<description><![CDATA[<p>SurgeMail supports external authentication modules which are simple command line based programs that understand a small set of commands to add, remove and look up user details in your user database. We provide modules for most common databases, including: NWAuth - The default, fast simple and reliable, always use this! MySQLAuth - MySQL UNIX based SQL database<br /><a class="moretag" href="https://surgemail.com/knowledge-base/authent-modules/">+ Read More</a></p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/authent-modules/">Authent Modules</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>SurgeMail supports external authentication modules which are simple command line based programs that understand a small set of commands to add, remove and look up user details in your user database.</p>



<p>We provide modules for most common databases, including:</p>



<ul class="wp-block-list"><li><a href="https://netwinsite.com/authent/">NWAuth</a> - The default, fast simple and reliable, <strong>always use this</strong>!</li><li><a href="https://netwinsite.com/authent/">MySQLAuth</a> - MySQL UNIX based SQL database</li><li><a href="https://netwinsite.com/authent/">LDAPAuth</a> - LDAP database, can also be used with windows.</li></ul>



<p>Authent modules should always be tested at the command line to see if they are working. Here is an example using NWAuth, the standard NetWin module:</p>



<pre class="wp-block-preformatted">c:&gt; nwauth
set bob@test.com bob
+OK bob@test.com added to database
lookup bob@test.com
+OK bob@test.com config 0
check bob@test.com xxx
-ERR bob@test.com password wrong or not a valid user
search bo*@test.com
+DATA bob@test.com
+DATA bobcat@test.com
+OK Search Complete 2 items found out of 1510
set bob@test.com bob quota="200" fwd="fred@test.com"
+OK bob@test.com added to database
lookup bob@test.com
+OK bob@test.com config 0 quota="200" fwd="fred@test.com"</pre>



<h3 class="wp-block-heading">Configuring the Authent Module.</h3>



<p>This is done in surgemail.ini e.g.</p>



<p>g_authent_process "c:\surgemail\nwauth.exe -path c:\surgemail"</p>



<p>The above tells NWAuth to look in c:\surgemail for it's files nwauth.add, nwauth.txt, etc.<br>The same is true for any module that has an .ini file.</p>



<h3 class="wp-block-heading">Extended info fields recognized by SurgeMail</h3>



<p>SurgeMail uses the <a href="http://netwinsite.com/surgemail/help/global.htm#g_authent_info">g_authent_info</a> settings to define what fields it displays and where. Most fields have a 'hard-coded' use but others are simply there as examples of the kind of optional information you can collect about your users. The default settings are as follows:</p>



<pre class="wp-block-preformatted">g_authent_info name="Creation Stamp" field="created" access="none" default="" type=""
g_authent_info name="Forwarding" field="fwd" access="none" default="" type=""
g_authent_info name="SPF Block" field="spf_block" access="none" default="" type=""
g_authent_info name="Disk Quota (bytes)" field="quota" access="domadmin" default="" type=""
g_authent_info name="Full Name" field="full_name" access="user" default="" type=""
g_authent_info name="Phone" field="phone" access="user" default="" type=""
g_authent_info name="Password Retrieval Question" field="pass_question" access="createonly" default="" type=""
g_authent_info name="Password Retrieval Answer" field="pass_answer" access="createonly" default="" type=""
g_authent_info name="Access type" field="mailaccess" access="domadmin" default="" type=""
g_authent_info name="Account Status" field="mailstatus" access="domadmin" default="" type=""
g_authent_info name="Sms Number" field="smsto" access="domadmin" default="" type=""
g_authent_info name="Disabled" field="disabled" access="none" default="" type=""
g_authent_info name="User alias quota" field="alias_quota" access="domadmin" default="" type=""
g_authent_info name="User list quota" field="list_quota" access="domadmin" default="" type=""
g_authent_info name="User access settings" field="user_access" access="domadmin" default="" type=""
g_authent_info name="Msg limit per 30min" field="send_limit" access="none" default="" type=""
g_authent_info name="To host(g_proxy)" field="tohost" access="none" default="" type=""
g_authent_info name="Is an alias of" field="realuser" access="none" default="" type=""
g_authent_info name="Allowed to" field="allow" access="none" default="" type=""
g_authent_info name="Friends Enabled" field="friends" access="none" default="" type=""
g_authent_info name="Email Notification Address" field="enotify" access="none" default="" type=""
g_authent_info name="SpamPrivate private prefix" field="ddpriv" access="none" default="" type=""
g_authent_info name="SpamPrivate from prefix" field="ddfrom" access="none" default="" type=""
g_authent_info name="Card Name" field="ccname" access="user" default="" type=""
g_authent_info name="Card Number" field="ccnumber" access="user" default="" type="encrypt"
g_authent_info name="Card Expiry" field="ccexpires" access="user" default="" type=""
g_authent_info name="Card Security Code" field="ccciv" access="user" default="" type=""
g_authent_info name="Card Type" field="cctype" access="user" default="" type="" </pre>



<p></p>



<table class="wp-block-table"><tbody><tr><td>allow                                 </td><td>Services the user can access eg. SMTP,POP,IMAP.</td></tr><tr><td>created</td><td>Record of creation time, stored on creation time.</td></tr><tr><td>ddfrom</td><td>Private email 'from' suffix.</td></tr><tr><td>ddpriv</td><td>Private email 'private' suffix.</td></tr><tr><td>enotify</td><td>The email address to send email notifications to.</td></tr><tr><td>friends</td><td>'true' if the user has a friends mode configured.</td></tr><tr><td>full_name</td><td>Example information about user (not required, example).</td></tr><tr><td>fwd</td><td>Forwarding rules for the user, configured via users "Forwarding" page.</td></tr><tr><td>mailstatus</td><td>Status of the account, see (<a href="http://netwinsite.com/surgemail/help/accounts.htm#mailstatus">account status</a>)</td></tr><tr><td>pass_question</td><td>Only used at creation time, collects password retrieval question (not stored in database).</td></tr><tr><td>pass_answer</td><td>Only used at creation time, collects password retrieval answer (not stored in database).</td></tr><tr><td>phone</td><td>Example information about user (not required, example).</td></tr><tr><td>quota</td><td>Users disk quota, configured via the admininstrative interface.</td></tr><tr><td>spf_block</td><td>'true' if the user wants to block non spf compliant email.</td></tr></tbody></table>



<p>For example:</p>



<pre class="wp-block-preformatted">+OK bob@test.com config 0 fwd="fred@test.com"
+OK bob@test.com config 0 quota="200000" fwd="joe@xx.com"</pre>



<p>Advanced settings :</p>



<table class="wp-block-table is-style-regular"><tbody><tr><td>alias_quota                                                                      </td><td>Number of aliases this user can create</td></tr><tr><td>admin_access</td><td>Features this domain admin can access</td></tr><tr><td>ccname</td><td>Credit card holders name.</td></tr><tr><td>ccnumber</td><td>Credit card number.</td></tr><tr><td>ccexpires</td><td>Credit card expiry date mm/yy.</td></tr><tr><td>ccciv</td><td>Credit card security code.</td></tr><tr><td>cctype</td><td>Credit card type eg. Visa, Amex</td></tr><tr><td>disabled</td><td>Used by email based account creation code (may also be used to disable existing accounts)</td></tr><tr><td>list_quota</td><td>Quota of mailing lists the user can create.</td></tr><tr><td>mailaccess</td><td>Used in conjunction with&nbsp;<a href="http://netwinsite.com/surgemail/help/global.htm#g_access_group">g_access_group</a>&nbsp;and&nbsp;<a href="http://netwinsite.com/surgemail/help/global.htm#g_user_access">g_user_access</a>&nbsp;to specify access to features.</td></tr><tr><td>realuser</td><td>Real account to which this account is aliased - allows aliases to be specified in authent database</td></tr><tr><td>send_limit</td><td>Number of outgoing messages this user can send per 30 minutes. You must also define the global limits g_tarpit_max, and g_tarpit_max_remote. And you may want to set g_tarpit_drop "true"</td></tr><tr><td>smsto            </td><td>SMS phone number to send SMS nontifications to users "SMS" page.</td></tr><tr><td>tohost</td><td>The host which to connect to when using proxy mode (g_proxy)</td></tr><tr><td>user_access</td><td>Features this user can access</td></tr></tbody></table>



<p>Legacy settings :</p>



<table class="wp-block-table"><tbody><tr><td>account     status</td><td>Numeric equivalent of mailaccess</td></tr><tr><td>droppath     </td><td>The user's drop path, this is no longer supported and will not work with all SurgeMail functionality.</td></tr><tr><td>groups</td><td>Example setting used to be installed for default SurgeMail installs</td></tr></tbody></table>



<h3 class="wp-block-heading">Mixed</h3>



<p>Example ldapauth.ini config used with ActiveDirectory (Windows)</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>ldap_host 10.1.1.1<br>ldap_port 389<br>ldap_mgr_dn cn=ftpadmin1,ou=mgt_info_sys,ou=CTL,ou=region_sales,dc=example,dc=com<br>ldap_mgr_pw secret_password<br>ldap_search_base OU=region_sales,dc=example,dc=com<br>ldap_scope LDAP_SCOPE_subtree<br>ldap_search_name ExampleAccountName<br>ldap_group_base OU=region_sales,dc=example,dc=com<br>ldap_group_search CN=&amp;*<br>ldap_group_field CN<br>ldap_group_attrib member</p></blockquote>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/authent-modules/">Authent Modules</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Global settings g_user</title>
		<link>https://surgemail.com/knowledge-base/global-settings-g_user/</link>
		
		<dc:creator><![CDATA[chrisp]]></dc:creator>
		<pubDate>Wed, 06 Nov 2019 00:33:33 +0000</pubDate>
				<guid isPermaLink="false">http://surgemail.com/?post_type=ht_kb&#038;p=759</guid>

					<description><![CDATA[<p>Note: as well as global / domain settings, these features can be set on a per user basis in the user settings page. g_user_access - Allow / Restrict user access to features based on&#160;g_access_group g_user_access group="wildcard" access="list" This setting matches the&#160;g_access_group&#160;the user is in to the wildcard specified and applies the specified list to that<br /><a class="moretag" href="https://surgemail.com/knowledge-base/global-settings-g_user/">+ Read More</a></p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/global-settings-g_user/">Global settings g_user</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Note: as well as global / domain settings, these features can be set on a per user basis in the user settings page.</p>



<h3 class="wp-block-heading">g_user_access - Allow / Restrict user access to features based on&nbsp;<a href="#g_access_group">g_access_group</a></h3>



<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 class=""><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">g_user_access_default - Default user features granted to users</h3>



<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">g_user_access_from - When sending use from for useraccess rules</h3>



<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">g_user_access_webonly - Means user_access rules only stop web interface not actual spam checking etc</h3>



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



<p>Syntax: g_user_access_webonly bool</p>



<h3 class="wp-block-heading">g_user_alias - Number of aliases accounts can create</h3>



<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">g_user_alias_file - User aliases configuration file</h3>



<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 class=""><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">g_user_blogs - Number of blogs accounts can create</h3>



<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">g_user_cookies - Enable browser cookies for user self management</h3>



<p>Enable browser cookies for user self management.</p>



<p>Syntax: g_user_cookies bool</p>



<h3 class="wp-block-heading">g_user_delete - Let users delete themselves</h3>



<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">g_user_disable - Filename listing users to disable</h3>



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



<p>Syntax: g_user_disable string</p>



<h3 class="wp-block-heading">g_user_domainlist - Show domains list on user pages</h3>



<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">g_user_filter_early - Process user ex</h3>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/global-settings-g_user/">Global settings g_user</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Global Settings g_auth</title>
		<link>https://surgemail.com/knowledge-base/global-settings-g_auth/</link>
		
		<dc:creator><![CDATA[chrisp]]></dc:creator>
		<pubDate>Wed, 06 Nov 2019 00:04:38 +0000</pubDate>
				<guid isPermaLink="false">http://surgemail.com/?post_type=ht_kb&#038;p=699</guid>

					<description><![CDATA[<p>g_auth_hide - Disable SMTP Authentication 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<br /><a class="moretag" href="https://surgemail.com/knowledge-base/global-settings-g_auth/">+ Read More</a></p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/global-settings-g_auth/">Global Settings g_auth</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading">g_auth_hide - Disable SMTP Authentication</h3>



<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">g_auth_norelay - Ignore SMTP auth for relaying purposes</h3>



<p>This means relaying only occurs if g_relay_allow_ip matches</p>



<p>Syntax: g_auth_norelay bool</p>



<h3 class="wp-block-heading">g_auth_path - Path to nwauth files</h3>



<p>Needed for mirroring if using multiauth</p>



<p>Syntax: g_auth_path string</p>



<h3 class="wp-block-heading">g_auth_skipgateway - Skip gateway rules if we get a proxy SMTP auth command</h3>



<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">g_authent_addip - Send ip address as third parameter to authent module</h3>



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



<p>Syntax: g_authent_addip bool</p>



<h3 class="wp-block-heading">g_authent_allow_badascii - Allow ascii chars outside the range 32 &lt; 127</h3>



<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">g_authent_always - Always lookup user, so virtual domains can exist just in authent module</h3>



<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">g_authent_any - Restore buggy behaviour of looking up users in domains that don't exist</h3>



<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">g_authent_cachebad - Cache life of failed authent lookups</h3>



<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">g_authent_cachelife - Cache life of successful authent lookups</h3>



<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">g_authent_cachesize - Size of the authent cache</h3>



<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">g_authent_case_sensitive - Make passwords case sensitive</h3>



<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">g_authent_decrypt - Collect and store plain text passwords for migration in file pass.decrypted</h3>



<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">g_authent_domain - Authent domain</h3>



<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">g_authent_encrypt_key - Encryption key config settings</h3>



<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">g_authent_enforce - Days till we prevent user from logging in, NOT RECOMMENDED</h3>



<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">g_authent_fwdfile - Use DMail forward files (deprecated - for backward compatibility only)</h3>



<p>Allows old style DMail forward files to be read.</p>



<p>Syntax: g_authent_fwdfile bool</p>



<h3 class="wp-block-heading">g_authent_info - Authent info</h3>



<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">g_authent_info_grp - Fields to show to users in this group</h3>



<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">g_authent_ip - Authent Lookup IP numbers via authent modules - enables relaying</h3>



<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">g_authent_last_login - Store users last login time in the database</h3>



<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">g_authent_logall - Turns on logging of authent requests</h3>



<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">g_authent_lookup - Check if accounts exist using g_authent_pass too</h3>



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



<p>Syntax: g_authent_lookup bool</p>



<h3 class="wp-block-heading">g_authent_nodomain - If true dont add @virtual.domain.name to external user lookups (NOT RECOMMENDED)</h3>



<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">g_authent_number - Authent number</h3>



<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">g_authent_pass - Authent process to check passwords with</h3>



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



<p>Syntax: g_authent_pass string</p>



<h3 class="wp-block-heading">g_authent_prefix_sep - Authent Prefix Separator (deprecated - for backward compatibility only)</h3>



<p>Prefix separator for prefix based separator. Only relevant if enabled on a per vdomain basis using the "prefix" setting.<br></p>



<p>Syntax: g_authent_prefix_sep string</p>



<h3 class="wp-block-heading">g_authent_process - Authent process</h3>



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



<p>Syntax: g_authent_process string</p>



<h3 class="wp-block-heading">g_authent_reminders - Days till we remind user to change password</h3>



<p>Days until we remind user to change password.</p>



<p>Syntax: g_authent_reminders int</p>



<h3 class="wp-block-heading">g_authent_restart - Cycle auth modules every 1000 lookups</h3>



<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">g_authent_single - Allow local users with a single quote char in their name</h3>



<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">g_authent_spaces - Allow spaces in passwords DO NOT USE</h3>



<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">g_authent_strip_domain - Strip domain for authent lookups</h3>



<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">g_authent_timeout - Timeout for authent response</h3>



<p>Timeout for authent response, default 60 seconds.</p>



<p>Syntax: g_authent_timeout int</p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/global-settings-g_auth/">Global Settings g_auth</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Global Settings g_admin</title>
		<link>https://surgemail.com/knowledge-base/global-settings-g_admin/</link>
		
		<dc:creator><![CDATA[chrisp]]></dc:creator>
		<pubDate>Tue, 05 Nov 2019 23:59:39 +0000</pubDate>
				<guid isPermaLink="false">http://surgemail.com/?post_type=ht_kb&#038;p=693</guid>

					<description><![CDATA[<p>g_admin_access - Allow / Restrict domain admin access to features based on&#160;g_access_group g_admin_access group="wildcard" access="list" 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: Value<br /><a class="moretag" href="https://surgemail.com/knowledge-base/global-settings-g_admin/">+ Read More</a></p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/global-settings-g_admin/">Global Settings g_admin</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading">g_admin_access - Allow / Restrict domain admin access to features based on&nbsp;<a href="#g_access_group">g_access_group</a></h3>



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



<table class="wp-block-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>



<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">g_admin_access_default - Default features granted to domain admins</h3>



<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">g_admin_guesses - Number of guesses allowed for admin.</h3>



<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">g_admin_ip - Admin IP access</h3>



<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">g_admin_localhost - Allow localhost web admin without user/pass</h3>



<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">g_admin_readonly - System admins with readonly access to the management interface</h3>



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



<p>Syntax: g_admin_readonly string</p>



<h3 class="wp-block-heading">g_admin_utoken_expire - Length of time a web admin session is valid for</h3>



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



<p>Syntax: g_admin_utoken_expire int</p>



<h3 class="wp-block-heading">g_admin_utoken_idle - Length of time a web admin session may remain idle for</h3>



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



<p>Syntax: g_admin_utoken_idle int</p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/global-settings-g_admin/">Global Settings g_admin</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Global Settings g_access settings</title>
		<link>https://surgemail.com/knowledge-base/global-settings-g_ac/</link>
		
		<dc:creator><![CDATA[chrisp]]></dc:creator>
		<pubDate>Tue, 05 Nov 2019 23:57:22 +0000</pubDate>
				<guid isPermaLink="false">http://surgemail.com/?post_type=ht_kb&#038;p=691</guid>

					<description><![CDATA[<p>These settings control access to smtp/pop/imap/surgeweb, if you want to control the features available in the self admin screens, then see this page instead 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<br /><a class="moretag" href="https://surgemail.com/knowledge-base/global-settings-g_ac/">+ Read More</a></p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/global-settings-g_ac/">Global Settings g_access settings</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>These settings control access to smtp/pop/imap/surgeweb, if you want to control the features available in the self admin screens, <a href="https://surgemail.com/knowledge-base/global-settings-g_user/">then see this page instead</a></p>



<h3 class="wp-block-heading">g_access_group - Access groups</h3>



<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">g_access_group_default - Access group defaults</h3>



<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">g_access_surgeweb - Apply g_access_group rules to surgeweb sessions based on client's address</h3>



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



<p>Syntax: g_access_surgeweb bool</p>



<h3 class="wp-block-heading">g_access_webonly - Users in this group can only use web not imap or pop</h3>



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



<p>Syntax: g_access_webonly string</p>
<p>The post <a rel="nofollow" href="https://surgemail.com/knowledge-base/global-settings-g_ac/">Global Settings g_access settings</a> appeared first on <a rel="nofollow" href="https://surgemail.com">SurgeMail</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
