![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|
![]() |
Managing Accounts
Account Creation - User Self Creation
Users can optionally create or sign-up for accounts via the web interface on the user port ie:
https://localhost:7443/cgi/user.cgi?cmd=user_check
There are several different methods, the method being used is specified per domain using the domain setting create user.
Account Creation - Manager
User administration is done via the users option in the web admin contents. This will display a page that allows you to lookup, create, modify and search for users.
Once you have looked up an existing user you can change a user's password, edit any of the user's information including forwarding or delete them.
Domain administrators have access to this page for the domains they manage.
Advanced Per User Services
Access to the SurgeMail's POP / IMAP / SMTP facilities can be controlled on a per user basis by defining a series of access groups (g_access_group). Users can belong to one or more access groups. Each access group has a IP based wildcarded limitation of POP, IMAP and SMTP access and is defined in surgemail.ini. The domain manager is able to change these settings for the user accounts within their domain.
Membership of this group is checked against the "Access Type" setting (NWAuth field: mailaccess) in the authentication database.
eg. You could charge WebMail users for pop access privileges:
g_access_group group="paid_user" access_pop="*" access_imap="*" access_smtp="*"
g_access_group group="free_user" access_pop="webmail.svr.ip" access_imap="webmail.svr.ip" access_smtp="webmail.svr.ip"
with "Access type" set to "free_user" / "paid_user" on accounts page or equivalently in NWAuth authentication database:
marijn@mydomain.com:{ssha}tVANQo...:created="1060034937" mailaccess="free_user" ...Or the following would use three arbitrary fields (SuspendedEmail, AllowedPOP, AllowedIMAP) in the authentication database to define the whether POP / IMAP / Webmail / SMTP services can be used on an individual per user basis.
g_access_group group="webmailonly" access_pop="" access_imap="1.2.3.4" access_smtp="*"
g_access_group group="imap" access_pop="" access_imap="*" access_smtp=""
g_access_group group="allowpop" access_pop="*" access_imap="" access_smtp=""
g_access_group group="suspendemail" access_pop="!*" access_imap="!*" access_smtp="!*"
g_group_field field="SuspendedEmail" value="0" group="webmailonly"
g_group_field field="SuspendedEmail" value="1" group="suspendemail"
g_group_field field="AllowedPOP" value="1" group="allowpop"
g_group_field field="AllowedIMAP" value="1" group="allowimap"
g_authent_info name="Suspended Email" field="SuspendedEmail" access="domadmin" default="0"
g_authent_info name="Allowed POP" field="AllowedPOP" access="domadmin"
g_authent_info name="Allowed IMAP" field="AllowedIMAP" access="domadmin"
marijn@mydomain.com:{ssha}tVANQo...:created="1060034937" SuspendedEmail="0" AllowedPOP="" AllowedIMAP="1"
In this case four groups are defined (webmailonly, SuspendedEmail, AllowedPOP, AllowedIMAP) with membership based on the (SuspendedEmail, AllowedPOP and AllowedIMAP) databse fields. The use of g_group_field has the same effect as manually setting "Access Type" to the combined group membership of "webmailonly,allowimap" for user marijn@mydomain.com.
Actual access that is granted is worked out by processing the g_access_group rules in the order they are defined in surgemail.ini building up from no access. So if you want "suspendedemail" to override "allowpop" you need to make sure the "suspendedemail" g_access_group entry is after the "allowpop" g_access_group in the surgemail.ini file.
Account Status
The account status field in the authentication database allows the domain controller to easily enable / disable individual mail accounts. This is the "Account Status" setting in the Web Admin interface (NWAuth field: mailstatus). This setting can have one of the following values:
Incoming SMTP
POP WEB IMAP Sending SMTP Response codes ok,good Y Y Y Y Y suspended Y N N N N Account suspended. cancelled N N N N N Account cancelled banned,bad N N N N N This account has been banned for inappropriate use. closed N N N N N Account closed. paydue,due Y Y Y Y Y payup Y N N N N Please pay to continue service. readonly N Y Y Y N Account is only allowed to read email. These messages responses can be modified using the g_mailstatus_message:
g_mailstatus_message state="cancelled" message="Account cancelled, please email postmaster@mydomain.com for further information"
or adding an "id" field to the authentication database and using this to supply a customised URL for updating account information:
g_mailstatus_message state="payup" message="Payment is overdue for $full_name$, click http://myurl.com/cgi/mycgi.cgi?user=$id$ to update account"