Wednesday, July 3, 2013

So you want a mail server to play with, try apache james

Forget sendmail. Download apache james, and

1. vi bin/phoenix.sh and add a JAVA_HOME pointing to some non-IBM JVM such as sun's

#   JAVA_HOME          Must point at your Java Development Kit installation.
#export JAVA_HOME=/home/leoks/ibm-java-i386-70/
export JAVA_HOME=/opt/j2sdk1.4.2_19/


just because IBM JVM does not have the encryption algorithm you'll need.

2. vi apps/james/SAR-INF/config.xml and change all the ports to something higher, so you don't have to be root to start it (basically POP3=9110, NNTP=9119 and SMTP=9025)

3. start it up

[leoks@xxx bin]$ ./run.sh
Using PHOENIX_HOME:   /home/leoks/Downloads/james-2.3.2
Using PHOENIX_TMPDIR: /home/leoks/Downloads/james-2.3.2/temp
Using JAVA_HOME:      /opt/j2sdk1.4.2_19/
Running Phoenix:

Phoenix 4.2

James Mail Server 2.3.2
Remote Manager Service started plain:4555
POP3 Service started plain:9110
SMTP Service started plain:9025
NNTP Service started plain:9119
FetchMail Disabled

^Z
[1]+  Stopped                 ./run.sh
[leoks@xxx bin]$ bg


4. then add your users (user and password are root/root)

[leoks@xxx bin]$ telnet localhost 4555
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
JAMES Remote Administration Tool 2.3.2
Please enter your login and password
Login id:
root
Password:
root
Welcome root. HELP for a list of commands
adduser leoks xxx
User leoks added
quit
Bye
Connection closed by foreign host.


and you're good to go

No comments:

Post a Comment