Apache James builds intranet mail server Geek 521 | Geek 521 2014-08-21
148 readingJava
About two weeks ago, the seminar introduced the building of a. NET intranet mail server. So it is necessary for me to try to build a mail server, here is the tool of James.
Why use an intranet mail server?
A. Security is limited to personal opinion here. It is very important for any enterprise to have the necessary security and secrecy.
B. Internet-not limited Although WiFi is everywhere, it is certainly a good choice to have a mail server that you can control and use on your own.
What is Apache James?
A. An enterprise-class mail server that supports multiple protocols
B. Open source, multi-platform
Open source projects mean that there are no version issues, fewer legal issues, and a guarantee of the extensibility of the platform, and that the implementation of pure Java will not have problems with systems incompatible with Windows and Linux.
Latest
- Apache James 3.0 Beta
- Apche James 2.3.2 Stable edition
This time select 2.3.2.
Configuration Step 1. Environment configuration
A.jdk
JDK 1.7, the best current is to configure the relevant environment variables, so that you do not have to go to the file every time to configure the relevant java_home and Jre_home.
B.james
Unzip the downloaded zip file into your favorite directory
1. Start
Find the Run.bat file under the bin file
Show success,
2. Use the Telnet tool to remote to port 4555 and add the user
. telnet localhost 4555;
. Enter the login user and password default to root root
. adduser CFL CFL (add user username password)
. AddUser Cfltest Cfltest
Added successfully,
2.xml Configuration
Under File James-2.3.1\apps\james\sar-inf, when you need to be aware of the. config file. The file does not appear until after it has been started.
A. Configuration of the mail server name
<span Style="Font-Size:18px; " ><postmaster>[email protected]</ Postmaster> e.g. <postmaster>[email protected]< span class= "tag" ></postmaster> <servernames autodetect= "true" Autodetectip= "true" > <servername>localhost</servername> </servernames> </span>
B. Note Mailet
<span style="font-size:18px;"><!--mailet match="RemoteAddrNotInNetwork=127.0.0.1"> <processor> relay-denied </processor> <notice>550 - Requested action not taken: relaying denied</notice> </mailet--!> </span>
Maillet similar to the servlet will do some simple processing of the message, here we do not implement this interface
C. Turn on authentication authrequired
<span style="font-size:18px;"><authRequired>true</authRequired></span>
Configure two clients on top [email protected] @chenfanglin. com. I did a simple test on my own foxmail.
Configure your Account
Effect
1. Send mail
2. Receive mail
3. Part of the problem
Telnet is not an internal command when you perform telnet, because the Telnet server is not turned on and is enabled within the Window feature item
Summarize
In general, the configuration process is not very difficult. Of course, this is just the most basic mail-building, in order to understand such a better open source tools. I want to expand and more to achieve the most exciting.
Apache James builds intranet mail server