Hello Eric.
Your November 8 Quickstart notes did not provide any instructions for
Microsoft Windows users.
In the attached PDF and text files, I suggest some added text for those
folks. The PDF file shows the additions in yellow highlighting.
The text file is the fulltext version of the PDF.
Consider removing the list of files contained in the bin and conf folders -
or list the files with the ls parameters that only shows the names of the
files (without file attributes or timestamps, etc). The unix file list may
be confusing to windows users.
I also suggest that in mailetcontainer.xml lines 586, the default setting
for mailet Bounce should be to notify the sender if a received email is in
error and is undeliverable. Even more importantly at line 593, the mailet
NotifyPostmaster should not be commented out so that the postmaster is
advised if undeliverable emails are received. These two changes will alert
james administrators if a configuration error exists - currently the
received emails just silently disappear. I spent a lot of time adjusting
router settings and windows firewall settings before noticing that the
emails were being treated as address-errors. If invalid emails had bounced
to the sender or the postmaster I would have looked at the james config
files right away.
Thanks
Gerry
--------------------------------------------------
From: "Eric Charles" <[email protected]>
Sent: Monday, November 08, 2010 2:21 AM
To: "James Users List" <[email protected]>
Subject: Quick Start for 3.0-M2
Hi Everyone,
I tried to make a short (though complete) quick start doc for 3.0-M2.
The goal of the doc is to allow anyone to start with James binary
distribution as an operational mail server.
Feel free to give it a try (should be valid for 3.0-M1) and send your
feedback so we can have the best possible doc for upcoming 3.0-M2 release.
Tks,
Eric
Step 0: Requirements
####################
JRE 1.5+
root (linux/unix) or Administrator (Windows)
libc6 (linux)
512MB RAM
Step 1: Download
#################
Download james-server-container-spring-3.0-M2-bin.zip from
http://james.apache.org/download.cgi#Apache_James_Server
Step 2: Deploy
##############
Unzip james-server-container-spring-3.0-M2-bin.zip.
You should have a folder with sub-folders bin, conf, lib, log, var and
four text files.
$ unzip james-server-container-spring-3.0-M2-bin.tar.gz
$ cd james-server-container-spring-3.0-M2
$ ls -l
drwxrwxrwx. 2 root root 4096 2010-11-06 09:24 bin
-rw-r--r--. 1 root root 495 2010-11-06 08:56 BUILD.txt
drwxrwxrwx. 4 root root 4096 2010-11-06 14:43 conf
drwxrwxrwx. 2 root root 12288 2010-11-06 09:01 lib
-rw-r--r--. 1 root root 12082 2010-11-01 17:23 LICENSE.txt
drwxrwxrwx. 2 root root 4096 2010-11-06 09:24 log
-rw-r--r--. 1 root root 1579 2010-11-01 17:23 NOTICE.txt
-rw-r--r--. 1 root root 1545 2010-11-06 08:55 README.txt
drwxrwxrwx. 6 root root 4096 2010-11-06 09:25 var
Step 3: Configure
#################
All configuration files reside in the conf folder.
$ cd conf
$ ls -l
-rw-------. 1 root root 1414 2010-11-05 16:01 database.properties
-rw-------. 1 root root 2749 2010-10-21 14:07 dnsservice.xml
-rw-------. 1 root root 2802 2010-11-06 09:22 domainlist.xml
-rw-------. 1 root root 18599 2010-10-21 14:07 fetchmail.xml
-rw-------. 1 root root 3201 2010-10-21 14:07 imapserver.xml
-rw-------. 1 root root 2850 2010-11-04 08:10 james-listmanager.xml
-rw-------. 1 root root 5821 2010-10-21 14:07 jcr-repository.xml
-rw-------. 1 root root 0 2010-11-05 16:01 jmx.access
-rw-------. 1 root root 0 2010-11-05 16:01 jmx.password
-rw-------. 1 root root 961 2010-11-06 08:42 jmx.properties
drwxrwxrwx. 2 root root 4096 2010-10-21 14:07 lib
-rw-------. 1 root root 3129 2010-10-21 14:07 lmtpserver.xml
-rw-------. 1 root root 7463 2010-11-05 15:54 log4j.properties
-rw-------. 1 root root 31478 2010-11-06 09:22 mailetcontainer.xml
-rw-------. 1 root root 2473 2010-11-06 09:22 mailserver.xml
-rw-------. 1 root root 5234 2010-10-21 14:54 mailstore.xml
drwxrwxrwx. 2 root root 4096 2010-10-21 14:07 META-INF
-rw-------. 1 root root 8038 2010-10-21 14:07 miResources.xml
-rw-------. 1 root root 3327 2010-10-21 14:07 pop3server.xml
-rw-------. 1 root root 3369 2010-10-21 14:07 remotemanager.xml
-rw-------. 1 root root 15837 2010-11-05 15:54 smtpserver.xml
-rw-------. 1 root root 21941 2010-11-05 16:01 spring-beans.xml
-rw-------. 1 root root 48523 2010-10-21 14:07 sqlResources.xml
-rw-------. 1 root root 4301 2010-10-29 15:48 usersrepository.xml
-rw-------. 1 root root 2465 2010-10-21 14:07 virtualusertable.xml
-rw-------. 1 root root 13680 2010-11-06 09:01 wrapper.conf
James is packaged with virtual hosting disabled, XML domain list, JPA
(Derby database) storage for the mails and remote delivery from locahost
only.
You can edit the following files to change the behaviour:
- Enable virtual hosting in mailserver.xml: vi mailserver.xml
<enableVirtualHosting> true </enableVirtualHosting>
- Replace the XMLDomainList with the JPADomainList: vi usersrepository.xml
<domainlist class="org.apache.james.domainlist.jpa.JPADomainList">
<autodetect>true</autodetect>
<autodetectIP>true</autodetectIP>
</domainlist>
- Edit the database.properties and change the values according to your
database.
- Don't forget to add the needed JDBC driver jar in the ./conf/lib folder.
Step 4: Start
#############
$ cd bin
$ ./james start (!! you need libc6 installed on Linux - sudo apt-get
install libc6-i386 libc6-dev-i386 on ubuntu)
You can see log result in the log/james-server.log file.
Step 5: Create Domains and Users
################################
$ telnet localhost 4555
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
JAMES Remote Administration Tool
Please enter your login and password
Login id:
root
Password:
root
Welcome root. HELP for a list of commands
adddomain YOUR_DOMAIN
Adding domain YOUR_DOMAIN successful
adduser your_n...@your_domain YOUR_PASSWORD
User your_n...@your_domain added
quit
Bye
Connection closed by foreign host.
For example, YOUR_DOMAIN=localhost.net, YOUR_NAME=test, so you will have a
[email protected] user.
The username to use in you mail client will be [email protected].
Step 6: Test
############
$ telnet 127.0.0.1 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 172.16.1.131 SMTP Server (JAMES SMTP Server 3.0-M2) ready Sat, 6 Nov
2010 17:31:33 +0100 (CET)
ehlo test
250-172.16.1.131 Hello test (aoscommunity.com [127.0.0.1])
250-PIPELINING
250-ENHANCEDSTATUSCODES
250 8BITMIME
mail from:<your_n...@your_domain>
250 2.1.0 Sender <your_n...@your_domain> OK
rcpt to:<your_n...@your_domain>
250 2.1.5 Recipient <your_n...@your_domain> OK
data
354 Ok Send data ending with <CRLF>.<CRLF>
subject: test
this is a test
.
250 2.6.0 Message received
quit
Connection closed by foreign host.
Step 7: Manage
##############
7.1. Manage via telnet
$ telnet localhost 4555
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
JAMES Remote Administration Tool
Please enter your login and password
Login id:
root
Password:
root
Welcome root. HELP for a list of commands
help
adddomain [domainname] add domain to local domains
addmapping [tou...@todomain] [fromMapping] add mapping for the given
emailaddress
adduser [username] [password] add a new user
countusers display the number of existing accounts
deluser [username] delete existing user
help displays this help
listallmappings list all mappings
listdomains list local domains
listmapping [u...@domain] list all mappings for the given
emailaddress
listusers display existing accounts
memstat ([-gc]) shows memory usage. When called with -gc the garbage
collector get called
quit close connection
removedomain [domainname] remove domain from local domains
removemapping [tou...@todomain] [fromMapping] remove mapping for the
given emailaddress
setpassword [username] [password] sets a user's password
showalias [username] shows a user's current email alias
showforwarding [username] shows a user's current email forwarding
shutdown kills the current JVM (convenient when James is run as a
daemon)
unsetalias [user] unsets an alias for 'user'
unsetforwarding [username] removes a forward
user [repositoryname] change to another user repository
verify [username] verify if specified user exist
7.2. Manage via JMX
Launch jconsole (or any other JMX client) and connect on
URL=service:jmx:rmi:///jndi/rmi://localhost:9999/jmxrmi
Step 8: Monitor
##############
Monitor the ./log/james-server.log log file.
Monitor via JMX (launch any JMX client and connect to
URL=service:jmx:rmi:///jndi/rmi://localhost:9999/jmxrmi)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
Step 0: Requirements
####################
JRE 1.5+
root (linux/unix) or Administrator (Windows)
libc6 (linux)
512MB RAM
Step 1: Download
#################
Download james-server-container-spring-3.0-M2-bin.zip from
http://james.apache.org/download.cgi#Apache_James_Server
Step 2: Deploy
##############
Unzip james-server-container-spring-3.0-M2-bin.zip.
You should have a folder with sub-folders bin, conf, lib, log, var and
four text files.
Unix:
$ unzip james-server-container-spring-3.0-M2-bin.tar.gz
$ cd james-server-container-spring-3.0-M2
$ ls -l
drwxrwxrwx. 2 root root 4096 2010-11-06 09:24 bin
-rw-r--r--. 1 root root 495 2010-11-06 08:56 BUILD.txt
drwxrwxrwx. 4 root root 4096 2010-11-06 14:43 conf
drwxrwxrwx. 2 root root 12288 2010-11-06 09:01 lib
-rw-r--r--. 1 root root 12082 2010-11-01 17:23 LICENSE.txt
drwxrwxrwx. 2 root root 4096 2010-11-06 09:24 log
-rw-r--r--. 1 root root 1579 2010-11-01 17:23 NOTICE.txt
-rw-r--r--. 1 root root 1545 2010-11-06 08:55 README.txt
drwxrwxrwx. 6 root root 4096 2010-11-06 09:25 var
Step 3: Configure
#################
All configuration files reside in the conf folder.
$ cd conf
$ ls -l
-rw-------. 1 root root 1414 2010-11-05 16:01 database.properties
-rw-------. 1 root root 2749 2010-10-21 14:07 dnsservice.xml
-rw-------. 1 root root 2802 2010-11-06 09:22 domainlist.xml
-rw-------. 1 root root 18599 2010-10-21 14:07 fetchmail.xml
-rw-------. 1 root root 3201 2010-10-21 14:07 imapserver.xml
-rw-------. 1 root root 2850 2010-11-04 08:10 james-listmanager.xml
-rw-------. 1 root root 5821 2010-10-21 14:07 jcr-repository.xml
-rw-------. 1 root root 0 2010-11-05 16:01 jmx.access
-rw-------. 1 root root 0 2010-11-05 16:01 jmx.password
-rw-------. 1 root root 961 2010-11-06 08:42 jmx.properties
drwxrwxrwx. 2 root root 4096 2010-10-21 14:07 lib
-rw-------. 1 root root 3129 2010-10-21 14:07 lmtpserver.xml
-rw-------. 1 root root 7463 2010-11-05 15:54 log4j.properties
-rw-------. 1 root root 31478 2010-11-06 09:22 mailetcontainer.xml
-rw-------. 1 root root 2473 2010-11-06 09:22 mailserver.xml
-rw-------. 1 root root 5234 2010-10-21 14:54 mailstore.xml
drwxrwxrwx. 2 root root 4096 2010-10-21 14:07 META-INF
-rw-------. 1 root root 8038 2010-10-21 14:07 miResources.xml
-rw-------. 1 root root 3327 2010-10-21 14:07 pop3server.xml
-rw-------. 1 root root 3369 2010-10-21 14:07 remotemanager.xml
-rw-------. 1 root root 15837 2010-11-05 15:54 smtpserver.xml
-rw-------. 1 root root 21941 2010-11-05 16:01 spring-beans.xml
-rw-------. 1 root root 48523 2010-10-21 14:07 sqlResources.xml
-rw-------. 1 root root 4301 2010-10-29 15:48 usersrepository.xml
-rw-------. 1 root root 2465 2010-10-21 14:07 virtualusertable.xml
-rw-------. 1 root root 13680 2010-11-06 09:01 wrapper.conf
James is packaged with virtual hosting disabled, XML domain list, JPA
(Derby database) storage for the mails and remote delivery from localhost
only.
You can edit the following files to change the behaviour:
- Enable virtual hosting in mailserver.xml: vi mailserver.xml
<enableVirtualHosting> true </enableVirtualHosting>
- Replace the XMLDomainList with the JPADomainList: vi usersrepository.xml
<domainlist class="org.apache.james.domainlist.jpa.JPADomainList">
<autodetect>true</autodetect>
<autodetectIP>true</autodetectIP>
</domainlist>
- Edit the database.properties and change the values according to your
database.
- Don't forget to add the needed JDBC driver jar in the ./conf/lib folder.
On Windows:
You should execute run.bat from a DOS command window to ensure that james
starts up without errors. If you see the error message Error: Password
file read access must be restricted: ../conf/jmx.password then will need to
modify the file permissions on two JMX related files in the CONF folder
jmx.access and jmx.properties. The file security procedure to follow is
documented at
http://download.oracle.com/javase/1.5.0/docs/guide/management/security-windo
ws.html. See the next paragraph before following this procedure.
If you intend to run james as a windows service, you must create a windows
userid and password under which the service will run (this is the
recommended practice but is a required practice for the Apache James Service
because that userid/password must be designated as the file owners for the
two jmx control files noted in the previous paragraph. For example, you
might create a userid james3 with password james3 and use those credentials
and the file security procedure noted above making userid james3 the
official owner of files jmx.access and jmx.password. Do NOT keep any rights
for the Administrator group only the james3 userid should have any rights
and that id should have full rights.
After following this procedure, execute run.bat and the error message
Password file read access must be restricted: should no longer appear.
Use Control-C to shutdown james when started using run.bat
To create the Apache James Service on windows, execute james.bat install.
Then open the windows service manager, right-click the service Apache James
Server Container Spring and select properties. Click the logon tab and
click the radio button beside This Account. Enter the james3 userid and
password (you may need to enter the userid as .\james3 if you are not
using a domain controller). When you click ok you should see a popup window
stating that james3 has been granted the RunAsService right.
Step 4: Start
#############
Unix:
$ cd bin
$ ./james start (!! you need libc6 installed on Linux - sudo apt-get
install libc6-i386 libc6-dev-i386 on ubuntu)
You can see log result in the log/james-server.log file.
Windows:
Start the Apache James Service using the Windows service manager. Select
the service, right-click and select start. Or, open a DOS window and
execute james start.
Step 5: Create Domains and Users
################################
$ telnet localhost 4555
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
JAMES Remote Administration Tool
Please enter your login and password
Login id:
root
Password:
root
Welcome root. HELP for a list of commands
adddomain YOUR_DOMAIN
Adding domain YOUR_DOMAIN successful
adduser your_n...@your_domain YOUR_PASSWORD
User your_n...@your_domain added
quit
Bye
Connection closed by foreign host.
For example, YOUR_DOMAIN=localhost.net, YOUR_NAME=test, so you will have
a [email protected] user.
The username to use in your mail client will be [email protected].
Step 6: Test
############
$ telnet 127.0.0.1 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 172.16.1.131 SMTP Server (JAMES SMTP Server 3.0-M2) ready Sat, 6 Nov
2010 17:31:33 +0100 (CET)
ehlo test
250-172.16.1.131 Hello test (aoscommunity.com [127.0.0.1])
250-PIPELINING
250-ENHANCEDSTATUSCODES
250 8BITMIME
mail from:<your_n...@your_domain>
250 2.1.0 Sender <your_n...@your_domain> OK
rcpt to:<your_n...@your_domain>
250 2.1.5 Recipient <your_n...@your_domain> OK
data
354 Ok Send data ending with <CRLF>.<CRLF>
subject: test
this is a test
.
250 2.6.0 Message received
quit
Connection closed by foreign host.
Step 7: Manage
##############
7.1. Manage via telnet
$ telnet localhost 4555
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
JAMES Remote Administration Tool
Please enter your login and password
Login id:
root
Password:
root
Welcome root. HELP for a list of commands
help
adddomain [domainname] add domain to local domains
addmapping [tou...@todomain] [fromMapping] add mapping for the
given emailaddress
adduser [username] [password] add a new user
countusers display the number of existing accounts
deluser [username] delete existing user
help displays this help
listallmappings list all mappings
listdomains list local domains
listmapping [u...@domain] list all mappings for the given emailaddress
listusers display existing accounts
memstat ([-gc]) shows memory usage. When called with -gc the garbage
collector get called
quit close connection
removedomain [domainname] remove domain from local domains
removemapping [tou...@todomain] [fromMapping] remove mapping for the
given emailaddress
setpassword [username] [password] sets a user's password
showalias [username] shows a user's current email alias
showforwarding [username] shows a user's current email forwarding
shutdown kills the current JVM (convenient when James is run as a
daemon)
unsetalias [user] unsets an alias for 'user'
unsetforwarding [username] removes a forward
user [repositoryname] change to another user repository
verify [username] verify if specified user exist
7.2. Manage via JMX
Launch jconsole (or any other JMX client) and connect on
URL=service:jmx:rmi:///jndi/rmi://localhost:9999/jmxrmi
Step 8: Monitor
##############
Monitor the ./log/james-server.log log file.
Monitor via JMX (launch any JMX client and connect to
URL=service:jmx:rmi:///jndi/rmi://localhost:9999/jmxrmi)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]