doc/vmailmgr-cgi.texi
changeset 0 6f7a81934006
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/vmailmgr-cgi.texi	Wed Jan 16 22:39:43 2008 +0100
@@ -0,0 +1,532 @@
+\input texinfo @c -*-texinfo-*-
+@c %**start of header
+@setfilename vmailmgr-cgi.info
+@settitle vmailmgr CGI Documentation
+@setchapternewpage off
+@paragraphindent 5
+@c %**end of header
+@footnotestyle end
+
+@ifinfo
+Copyright @copyright{} 1998 Bruce Guenter
+@end ifinfo
+
+@titlepage
+@title vmailmgr CGI Documentation
+@author Bruce Guenter
+@subtitle @today{}
+@end titlepage
+
+@node Top,  , (dir), (dir)
+
+@c ****************************************************************************
+@chapter Introduction
+
+This is the documentation for the CGI programs for vmailmgr.
+
+@c ============================================================================
+@section Common Form Configuration
+
+The following form fields are common to all of the vmailmgr CGI
+programs.
+
+@c ----------------------------------------------------------------------------
+@subsection Required Form Fields
+
+@table @strong
+@item Field:
+        vdomain
+@item Description:
+This field specifies the name of the virtual domain under which to
+perform this operation.
+@item Syntax:
+@samp{<input type=hidden name=vdomain value="@var{domain-name}">}
+or
+@samp{<input type=text name=vdomain>}
+@end table
+
+@table @strong
+@item Field:
+        password
+@item Description:
+Unless noted below, this field specifies the password of the
+administrator for the given virtual domain.
+@item Syntax:
+@samp{<input type=password name=password>}
+@end table
+
+@c ----------------------------------------------------------------------------
+@subsection Optional Form Fields
+
+@table @strong
+@item Field:
+        error_redirect
+@item Description:
+If this field is set, any operation that results in an error will be
+redirected to the given URL.
+If not set, a pre-programmed document (which includes the error message)
+will be output.
+@item Syntax:
+@samp{<input type=hidden name=error_redirect value="@var{URL}">}
+@end table
+
+@table @strong
+@item Field:
+        redirect
+@item Description:
+If this field is set, any operation that completes successfully with be
+redirected to the given URL.
+If not set, a pre-programmed document (which includes the completion
+message) will be output.
+@item Syntax:
+@samp{<input type=hidden name=redirect value="@var{URL}">}
+@end table
+
+@c ****************************************************************************
+@chapter listvdomain
+
+@c ============================================================================
+@section Overview
+
+This CGI program will list the mailboxes and aliases in a virtual domain
+in a three-column table.
+The first column lists the mailbox or alias name,
+the second column is either @samp{Alias} or @samp{Mailbox},
+and the third column lists the destination.
+
+@c ============================================================================
+@section Form Configuration
+
+@c ----------------------------------------------------------------------------
+@subsection Required Form Fields
+
+No additional form fields are Required.
+
+@c ----------------------------------------------------------------------------
+@subsection Optional Form Fields
+
+@table @strong
+@item Field:
+        body-flags
+@item Description:
+If present, the contents of this field is inserted into the
+@samp{<body>} tag at the start of the document.
+@item Syntax:
+@samp{<input type=hidden name=body-flags value="bgcolor=ffffff">}
+@end table
+
+@table @strong
+@item Field:
+        cell-align
+@item Description:
+Sets the cell alignment.
+Defaults to @samp{left}.
+@item Syntax:
+@samp{<input type=hidden name=cell-align value=center>}
+@end table
+
+@table @strong
+@item Field:
+        cell-post
+@item Description:
+If present, the contents of this field will be output prior to every
+@samp{</td>} tag.
+@item Syntax:
+@samp{<input type=hidden name=cell-post value="</font>">}
+@end table
+
+@table @strong
+@item Field:
+        cell-pre
+@item Description:
+If present, the contents of this field will be output after every
+@samp{<td>} tag.
+@item Syntax:
+@samp{<input type=hidden name=cell-pre value="<font size=1 name=ariel>">}
+@end table
+
+@table @strong
+@item Field:
+        p-align
+@item Description:
+Sets the default paragraph alignment.
+Defaults to @samp{left}.
+@item Syntax:
+@samp{<input type=hidden name=p-align value=center>}
+@end table
+
+@table @strong
+@item Field:
+        title-post
+@item Description:
+If present, the contents of this field are output after the title text.
+Defaults to @samp{</h1>}.
+@item Syntax:
+@samp{<input type=hidden name=title-post value="</font>">}
+@end table
+
+@table @strong
+@item Field:
+        table-align
+@item Description:
+Sets the allignment of the table listing the users.
+Defaults to @samp{left}.
+@item Syntax:
+@samp{<input type=hidden name=table-align value=center>}
+@end table
+
+@table @strong
+@item Field:
+        title-pre
+@item Description:
+If present, the contents of this field are output before the title text.
+Defaults to @samp{<h1>}.
+@item Syntax:
+@samp{<input type=hidden name=title-pre value="<font size=3 face=verdana>">}
+@end table
+
+@table @strong
+@item Field:
+        userlink
+@item Description:
+If this field is present, all user names will be enclosed in a link to the
+contents of this field.  If the field contains a '%', it will be
+replaced by the user name.
+@item Syntax:
+@samp{<input type=hidden name=userlink value="/cgi-bin/admin-user?name=%">}
+@end table
+
+@c ****************************************************************************
+@chapter vaddalias
+
+@c ============================================================================
+@section Overview
+
+This CGI program can be used to add an alias to a virtual domain.
+
+@c ============================================================================
+@section Form Configuration
+
+@c ----------------------------------------------------------------------------
+@subsection Required Form Fields
+
+@table @strong
+@item Field:
+        username
+@item Description:
+The virtual user name of the alias to create.
+@item Syntax:
+@samp{<input type=text name=username>}
+@end table
+
+@table @strong
+@item Field:
+        destination
+@item Description:
+The destination address or addresses of the alias, separated by commas.
+If an address does not contain a host name (separated from the user name
+with an @samp{@@}), it is treated as local to the virtual domain and
+must already exist.
+@item Syntax:
+@samp{<input type=text name=destination>}
+@end table
+
+@c ----------------------------------------------------------------------------
+@subsection Optional Form Fields
+
+@table @strong
+@item Field:
+        newpass1, newpass2
+@item Description:
+These two fields specify the new password of the user. They must match
+for the password to be changed. The first eight characters are relevant,
+and may be any combination of letters, digits, or punctuation symbols.
+If these fields are not present or are empty, a null passcode is used.
+@item Syntax:
+@samp{<input type=password name=newpass1><input type=password name=newpass1>}
+@end table
+
+@c ****************************************************************************
+@chapter vadduser
+
+@c ============================================================================
+@section Overview
+
+This CGI program can be used to add a user mailbox to a virtual domain.
+
+@c ============================================================================
+@section Form Configuration
+
+@c ----------------------------------------------------------------------------
+@subsection Required Form Fields
+
+@table @strong
+@item Field:
+        username
+@item Description:
+The virtual user name of the alias to create.
+@item Syntax:
+@samp{<input type=text name=username>}
+@end table
+
+@table @strong
+@item Field:
+        newpass1, newpass2
+@item Description:
+These two fields specify the new password of the user. They must match
+for the password to be changed. The first eight characters are relevant,
+and may be any combination of letters, digits, or punctuation symbols.
+@item Syntax:
+@samp{<input type=password name=newpass1><input type=password name=newpass1>}
+@end table
+
+@c ----------------------------------------------------------------------------
+@subsection Optional Form Fields
+
+@table @strong
+@item Field:
+        destination
+@item Description:
+The destination address or addresses to direct a copy of incoming mail,
+separated by commas.
+If an address does not contain a host name (separated from the user name
+with an @samp{@@}), it is treated as local to the virtual domain and
+must already exist.
+If this field is not present or blank, no forwarding will be done.
+@item Syntax:
+@samp{<input type=text name=destination>}
+@end table
+
+@table @strong
+@item Field:
+        userdir
+@item Description:
+This field can be used to specify the user mail directory name relative
+to the virtual domain's users directory.
+If this field is not present, the directory name will be the same as the
+user name.
+@item Syntax:
+@samp{<input type=text name=userdir>}
+@end table
+
+@c ****************************************************************************
+@chapter vchattr
+
+@c ============================================================================
+@section Overview
+
+This CGI program can be used to change the attributes of an existing
+user in a virtual domain.
+
+@c ============================================================================
+@section Form Configuration
+
+@c ----------------------------------------------------------------------------
+@subsection Required Form Fields
+
+@table @strong
+@item Field:
+        username
+@item Description:
+The virtual user name to modify.
+@item Syntax:
+@samp{<input type=text name=username>}
+@end table
+
+@table @strong
+@item Field:
+        attribute
+@item Description:
+The number of the attribute to modify.
+The possible values are:
+@table @samp
+@item 1
+The password.
+Use the @file{vpasswd} CGI to do this.
+@item 2
+The forwarding destination.
+Use the @file{vchforwards} to do this.
+@item 3
+The hard quota.
+@item 4
+The soft quota.
+@item 5
+The message size limit.
+@item 6
+The message count limit.
+@item 7
+The account's expiry time.
+@item 8
+Set to zero to disable delivery to the account's mailbox (without
+deleting the account).
+Set to non-zero to enable delivery.
+@item 9
+The personal information string.
+@end table
+@item Syntax:
+@samp{<input type=hidden name=attribute value=2>}
+@end table
+
+@table @strong
+@item Field:
+        newvalue
+@item Description:
+The new value for the given attribute.
+The format of this new value is dependant on the type of the attribute.
+@item Syntax:
+@samp{<input type=text name=newvalue>}
+@end table
+
+@c ****************************************************************************
+@chapter vchforwards
+
+@c ============================================================================
+@section Overview
+
+This CGI program can be used to change the forwarding destination of an
+existing user.
+
+@c ============================================================================
+@section Form Configuration
+
+@c ----------------------------------------------------------------------------
+@subsection Required Form Fields
+
+@table @strong
+@item Field:
+        username
+@item Description:
+The virtual user name to modify.
+@item Syntax:
+@samp{<input type=text name=username>}
+@end table
+
+@table @strong
+@item Field:
+        destination
+@item Description:
+The destination address or addresses of the alias, separated by commas.
+If an address does not contain a host name (separated from the user name
+with an @samp{@@}), it is treated as local to the virtual domain and
+must already exist.
+@item Syntax:
+@samp{<input type=text name=destination>}
+@end table
+
+@c ----------------------------------------------------------------------------
+@subsection Optional Form Fields
+
+@table @strong
+@item Field:
+        enable
+@item Description:
+Set this field to @samp{0} to cause mailbox delivery to this account to
+be disabled after changing the alias.
+Set it to any number except @samp{0} to cause mailbox delivery to be
+enabled before changing the alias.
+If it is not set, the mailbox is neither enabled nor disabled.
+@item Syntax:
+@samp{<select name=enable>
+<option value=0>Disable
+<option value=1>Enable
+</select>}
+@end table
+
+@c ****************************************************************************
+@chapter vdeluser
+
+@c ============================================================================
+@section Overview
+
+This CGI program deletes a user from a virtual domain.
+
+@c ============================================================================
+@section Form Configuration
+
+@c ----------------------------------------------------------------------------
+@subsection Required Form Fields
+
+@table @strong
+@item Field:
+        username
+@item Description:
+The virtual user name of the user to delete.
+@item Syntax:
+@samp{<input type=text name=username>}
+@end table
+
+@c ****************************************************************************
+@chapter vpasswd
+
+@c ============================================================================
+@section Overview
+
+This CGI program can be used to change the password of a user either by
+the user themself or by the domain administrator.
+
+@c ============================================================================
+@section Form Configuration
+
+The password field used by this CGI may match either the password of the
+virtual domain administrator or that of the user being modified.
+
+@c ----------------------------------------------------------------------------
+@subsection Required Form Fields
+
+@table @strong
+@item Field:
+        username
+@item Description:
+This field specifies the name of the user that is to be modified.
+@item Syntax:
+@samp{<input type=text name=username>}
+@end table
+
+@table @strong
+@item Field:
+        newpass1, newpass2
+@item Description:
+These two fields specify the new password of the user.
+They must match for the password to be changed.
+The password may contain any combination of
+letters, digits, or punctuation symbols.
+@item Syntax:
+@samp{<input type=password name=newpass1> <input type=password name=newpass2>}
+@end table
+
+@c ****************************************************************************
+@contents
+
+@bye
+
+@c ****************************************************************************
+@chapter template
+
+@c ============================================================================
+@section Overview
+
+This CGI program ...
+
+@c ============================================================================
+@section Form Configuration
+
+@c ----------------------------------------------------------------------------
+@subsection Required Form Fields
+
+@table @strong
+@item Field:
+        fieldname
+@item Description:
+@item Syntax:
+@end table
+
+@c ----------------------------------------------------------------------------
+@subsection Optional Form Fields
+
+@table @strong
+@item Field:
+        fieldname
+@item Description:
+@item Syntax:
+@end table
+