You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by er...@apache.org on 2011/04/08 08:37:20 UTC
svn commit: r1090132 - in /james/server/trunk/src/site/xdoc:
manage-domains.xml manage-recipientrewrite.xml manage-users.xml manage.xml
Author: eric
Date: Fri Apr 8 06:37:19 2011
New Revision: 1090132
URL: http://svn.apache.org/viewvc?rev=1090132&view=rev
Log:
Updates on management section for 3.0-M3 (JAMES-1219)
Modified:
james/server/trunk/src/site/xdoc/manage-domains.xml
james/server/trunk/src/site/xdoc/manage-recipientrewrite.xml
james/server/trunk/src/site/xdoc/manage-users.xml
james/server/trunk/src/site/xdoc/manage.xml
Modified: james/server/trunk/src/site/xdoc/manage-domains.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/src/site/xdoc/manage-domains.xml?rev=1090132&r1=1090131&r2=1090132&view=diff
==============================================================================
--- james/server/trunk/src/site/xdoc/manage-domains.xml (original)
+++ james/server/trunk/src/site/xdoc/manage-domains.xml Fri Apr 8 06:37:19 2011
@@ -25,35 +25,24 @@
<body>
- <section name="Manage Domains via Telnet">
+ <section name="Manage Domains">
<p>Domain accounts are shared across services. A common Domain repository is shared across James
services. That is, once you've created a POP3 mail and set a password, that same
- is available for authenticated SMTP and NNTP.</p>
+ is available for authenticated SMTP and NNTP.</p>
<p>If you have XMLDomainList (default setup), you can only list the available domains. To add a domain,
you must add it in the domainlist.xml file.</p>
<p>If you have JPADomainList for example, you can add, delete and list the domains.</p>
+
+ </section>
- <p>Once James is up and listening, with JPADomainList, adding a Domain is simple:</p>
-
- <p><ol>
-
- <li>Telnet to the host and port on which the RemoteManager is listening. For command-line telnet clients
- this is generally done by typing "telnet <host> <port>" where <host> is the James
- hostname and <port> is the RemoteManager port specified in the James domainlist.xml.</li>
+ <section name="Manage Domains via Cli">
- <li>You will be prompted for your administrator userid and password. Enter the values you specified
- in the James remotemanager.xml.</li>
-
- <li>After logging in, type "adddomain <domain>" where <domain> is the domain name
+ <p>Invoke "james-cli.sh adddomain <mydomain.tls> <mydomain.tls> is the domain name
of the domain you wish to create.</li>
- <li>Repeat step 3 for all domains you wish to create.</li>
-
- </ol></p>
-
<p>That's it. Your domains are now created and can be used by all James services.</p>
</section>
Modified: james/server/trunk/src/site/xdoc/manage-recipientrewrite.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/src/site/xdoc/manage-recipientrewrite.xml?rev=1090132&r1=1090131&r2=1090132&view=diff
==============================================================================
--- james/server/trunk/src/site/xdoc/manage-recipientrewrite.xml (original)
+++ james/server/trunk/src/site/xdoc/manage-recipientrewrite.xml Fri Apr 8 06:37:19 2011
@@ -20,52 +20,121 @@
<document>
<properties>
- <title>Manage Virtual Users</title>
+ <title>Manage Recipient Rewrite Table</title>
</properties>
<body>
- <section name="Introduction to Virtual Users">
+ <section name="Manage Recipient Rewrite">
- <p>The only way to manage the virtual users is called "mapping"
- (the previous "alias" and "forwarding" functions are
- deprecated and you should not use them anymore.</p>
-
-<source>
-addmapping [toUser@toDomain] [fromMapping] add mapping for the given email addres
-listallmappings list all mappings
-listmapping [user@domain] list all mappings for the given emailaddress
-removemapping [toUser@toDomain] [fromMapping] remove mapping for the given emailaddress
-</source>
-
- <p>You will add mapping from an existing user to a virtual user. So read "addmapping toVirtual fromExisting".</p>
+ <p>You will rewrite any recipient to an existing recipient. So read "mapping allows to rewrite a 'fromAny(Existing/NotExisting)' to a 'toExisting'".</p>
- <p>You can also use wildcards (*) and regular expressions in the fromExisting.</p>
+ <p>'An existing' means a user defined in James.</p>
+
+ <p>You can also use wildcards (*) and regular expressions in the fromAny.</p>
+
+ <p>The implemented management interface is the following</p>
+
+ <source>
+ /**
+ * Add regex mapping
+ *
+ * @param user the username. Null if no username should be used
+ * @param domain the domain. Null if no domain should be used
+ * @param regex the regex.
+ */
+ void addRegexMapping(String user, String domain, String regex) throws Exception;
+
+ /**
+ * Remove regex mapping
+ *
+ * @param user the username. Null if no username should be used
+ * @param domain the domain. Null if no domain should be used
+ * @param regex the regex.
+ */
+ void removeRegexMapping(String user, String domain, String regex) throws Exception;
+
+ /***
+ * Add address mapping
+ *
+ * @param user the username. Null if no username should be used
+ * @param domain the domain. Null if no domain should be used
+ * @param address the address.
+ */
+ void addAddressMapping(String user, String domain, String address) throws Exception;
+
+ /**
+ * Remove address mapping
+ *
+ * @param user the username. Null if no username should be used
+ * @param domain the domain. Null if no domain should be used
+ * @param address
+ */
+ void removeAddressMapping(String user, String domain, String address) throws Exception;
+
+ /**
+ * Add error mapping
+ *
+ * @param user the username. Null if no username should be used
+ * @param domain the domain. Null if no domain should be used
+ * @param error
+ */
+ void addErrorMapping(String user, String domain, String error) throws Exception;
+
+ /**
+ * Remove error mapping
+ *
+ * @param user the username. Null if no username should be used
+ * @param domain the domain. Null if no domain should be used
+ * @param error
+ * @return true if successfully
+ */
+ void removeErrorMapping(String user, String domain, String error) throws Exception;
+
+ /**
+ * Return the explicit mapping stored for the given user and domain. Return
+ * null if no mapping was found
+ *
+ * @param user the username
+ * @param domain the domain
+ * @return the collection which holds the mappings.
+ */
+ Collection<String> getUserDomainMappings(String user, String domain) throws Exception;
+
+ /**
+ * Try to identify the right method based on the prefix of the mapping and
+ * add it.
+ *
+ * @param user the username. Null if no username should be used
+ * @param domain the domain. Null if no domain should be used
+ * @param mapping the mapping.
+ */
+ void addMapping(String user, String domain, String mapping) throws Exception;
+
+ /**
+ * Try to identify the right method based on the prefix of the mapping and
+ * remove it.
+ *
+ * @param user the username. Null if no username should be used
+ * @param domain the domain. Null if no domain should be used
+ * @param mapping the mapping.
+ */
+ void removeMapping(String user, String domain, String mapping) throws Exception;
+
+ /**
+ * Return a Map which holds all mappings. The key is the user@domain and the
+ * value is a Collection which holds all mappings
+ *
+ * @return Map which holds all mappings
+ */
+ Map<String, Collection<String>> getAllMappings() throws Exception;
+ </source>
</section>
- <section name="Manage Virtual Users via Telnet">
-
- <p>Once James is up and listening, adding a virtual user is simple:</p>
-
- <p><ol>
-
- <li>Telnet to the host and port on which the RemoteManager is listening. For command-line telnet clients
- this is generally done by typing "telnet <host> <port>" where <host> is the James
- hostname and <port> is the RemoteManager port specified in the James remotemanager.xml.</li>
+ <section name="Manage Recipient Rewrite Table via Cli">
- <li>You will be prompted for your administrator userid and password. Enter the values you specified
- in the James remotemanager.xml.</li>
-
- <li>After logging in, type "addmapping <to> <from>" where <to> is the new user name
- and <from> is the existing username you wish to map. Please note that the user name
- MUST be a complete email address.</li>
-
- <li>Repeat step 3 for all mapping you wish to create.</li>
-
- </ol></p>
-
- <p>That's it. Your mappings are now created and can be used by all James services.</p>
+ <p>Not available in this release.</p>
</section>
Modified: james/server/trunk/src/site/xdoc/manage-users.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/src/site/xdoc/manage-users.xml?rev=1090132&r1=1090131&r2=1090132&view=diff
==============================================================================
--- james/server/trunk/src/site/xdoc/manage-users.xml (original)
+++ james/server/trunk/src/site/xdoc/manage-users.xml Fri Apr 8 06:37:19 2011
@@ -20,38 +20,28 @@
<document>
<properties>
- <title>Adding Users</title>
+ <title>Manage Users</title>
</properties>
<body>
- <section name="Manage Users via Telnet">
+ <section name="Manage Users">
<p>User accounts are shared across services. A common user repository is shared across James
- services. That is, once you've created a POP3 mail account and set a password, that same
- account is available for authenticated SMTP and NNTP.</p>
-
- <p>Once James is up and listening, adding a user is simple:</p>
+ services. That is, once you've created a POP3 mail account and set a password, that same
+ account is available for authenticated SMTP and NNTP.</p>
+
+ </section>
- <p><ol>
-
- <li>Telnet to the host and port on which the RemoteManager is listening. For command-line telnet clients
- this is generally done by typing "telnet <host> <port>" where <host> is the James
- hostname and <port> is the RemoteManager port specified in the James userrepository.xml.</li>
+ <section name="Manage Users via Cli">
- <li>You will be prompted for your administrator userid and password. Enter the values you specified
- in the James remotemanager.xml.</li>
+ <p>Invoke "james-cli.sh adduser <user> <password>" where <user> is the user name
+ and <password> is the password of the account you wish to create.</p>
- <li>After logging in, type "adduser <user> <password>" where <user> is the user name
- and <password> is the password of the account you wish to create. Please note that the user name
- MUST be a complete email address of the form <user>@<domain>
+ <p>Please note that the user name MUST be a complete email address of the form <user>@<domain>
(where <domain> is any of the values specified in the <servernames> block of XMLDomainList or
- a domain defined via the <a href="manage-domains.html">domain management</a>).</li>
+ a domain defined via the <a href="manage-domains.html">domain management</a>).</p>
- <li>Repeat step 3 for all user accounts you wish to create.</li>
-
- </ol></p>
-
<p>That's it. Your users are now created and can be used by all James services.</p>
</section>
Modified: james/server/trunk/src/site/xdoc/manage.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/src/site/xdoc/manage.xml?rev=1090132&r1=1090131&r2=1090132&view=diff
==============================================================================
--- james/server/trunk/src/site/xdoc/manage.xml (original)
+++ james/server/trunk/src/site/xdoc/manage.xml Fri Apr 8 06:37:19 2011
@@ -20,13 +20,14 @@
<document>
<properties>
- <title>Management</title>
+ <title>Manage James Server</title>
</properties>
<body>
<section name="Manage James Server">
-
+<!--
+-->
<p>You need to make sure that your user/domain/mail repository configuration is correct before managing. If
you change your user/domain/mail repository type (i.e. file to database) or the configuration of your user repository
(i.e. the file or database URL) after you have added user/domain/mail, you may lose your user/domain/mail data. Please change these
@@ -36,26 +37,39 @@
the configuration are incorporated into the running system.</p>
<p>You are now ready to manage <a href="manage-domains.html">Domains</a>,
- <a href="manage-users.html">Users</a> and <a href="manage-recipientrewrite.html">Virtual Users</a>.</p>
+ <a href="manage-users.html">Users</a> and <a href="manage-recipientrewrite.html">Recipient Rewrite Table</a>.</p>
<p>You can manage James via:</p>
<ol>
- <li><a href="Manage_via_Telnet">Telnet (Remote Manager)</a></li>
- <li><a href="Manage_via_JMX">JMX</a></li>
+ <li><a href="Manage_via_Cli">CLI (Client Line Interface)</a></li>
+ <li><a href="Manage_via_JMX">JMX (Java Management Extension)</a></li>
</ol>
- <subsection name="Manage via Telnet">
+ <subsection name="Manage via Cli">
- <p>Once James is up and listening, manage via telnet is simple:</p>
- <ul>
- <li>Telnet to the host and port on which the RemoteManager is listening. For command-line telnet clients
- this is generally done by typing "telnet <host> <port>" where <host> is the James
- hostname and <port> is the RemoteManager port specified in the James remotemanager.xml config file.</li>
- <li>You will be prompted for your administrator userid and password. Enter the values you specified
- in the James remotemanager.xml.</li>
- <li>type help to get a list of available commands.</li>
- </ul>
+ <p>Once James is up and listening, managin via cli is simple.</p>
+
+ <p>Note the address and port defined in conf/jmx.properties (default is jmx.address=127.0.0.1 and jmx.port=9999)</p>
+
+ <p>cd bin</p>
+
+ <p>./james-cli.sh (or james-cli.bat on windows) ./james-cli.sh -h localhost -p 9999</p>
+
+ <p>You will be shown with a list of commands.</p>
+
+ <source>
+ usage: java org.apache.james.cli.ServerCmd --host <arg> <command>
+ -h,--host </arg> node hostname or ip address
+ -p,--port </arg> remote jmx agent port number
+ Available commands:
+ adduser </username> </password>
+ removeuser </username>
+ listusers
+ adddomain </domainname>
+ removedomain </domainname>
+ listdomains
+ </source>
</subsection>
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org