<?xml version="1.0"?>
<!DOCTYPE config [
<!ENTITY listserverConfig SYSTEM "../conf/james-listmanager.xml">
<!ENTITY listserverStores SYSTEM "../conf/james-liststores.xml">
<!ENTITY fetchmailConfig SYSTEM "../conf/james-fetchmail.xml">
]>
*******mailet意思是:邮件处理程序(邮件处理引擎)*******
*******matcher意思为:匹配器***********
<!-- Configuration file for the ASF James server -->
这个是ASF James服务器的配置文件
<!-- This file contains important settings that control the behaviour -->
这个文件包含控制所有服务和数据库行为的重要设置
<!-- of all of the services and repositories. -->
<!-- README! -->
<!-- This configuration file is designed to run without alteration for simple tests. -->这个配置文件用来设计运行没有变化的简单测试。
<!-- It assumes you have a DNS server on localhost and assigns a root password of root. -->他假定你有一个在本机运行的DNS服务,分配root一个root密码。
<!-- In case the defaults do not suit you, the items you are most likely to need to change -->万一默认的不适合你,可能需要改变部分配置项(并给予一定的注释)。
<!-- are preceded by a CHECKME! or CONFIRM? comment in the left margin. -->
<!-- For production use you will probably need to make more extensive changes, see -->要感觉实际的需要,做大量的改动,请参考网址:http://james.apache.org/documentation_2_1.html
<!-- http://james.apache.org/documentation_2_1.html -->
<!-- $Revision: 1.40.2.26 $ Committed on $Date: 2004/06/16 02:42:08 $ by: $Author: noel $ -->修订版本:1.40.2.36 $ 提交日期:2004/06/16 02:42:08作者:noel
<config>
<James>
<!-- CHECKME! -->
<!-- This is the postmaster email address for this mail server. -->
这是邮件管理员为邮件服务器准备的email地址。
<!-- Set this to the appropriate email address for error reports -->
设置为错误报告的适当邮件地址
<!-- If this is set to a non-local email address, the mail server -->
<!-- will still function, but will generate a warning on startup. -->
如果是非本地的email地址,邮件服务将会继续运行,但在启动是会报告错误。
<postmaster>Postmaster@tech21</postmaster>
<!-- servernames identifies the DNS namespace served by this instance of James. -->servernames识别DNS服务于james实例的名字空间
<!-- These servernames are used for both matcher/mailet processing and SMTP auth -->这些服务名用在匹配信件进程(matcher/mailet)和SMTP发送者程序两者之间.
<!-- to determine when a mail is intended for local delivery. -->
<!-- -->
<!-- If autodetect is TRUE, James wil attempt to discover its own host name AND -->如果autodetect设定为TRUE,JAMES将试图找到特定的host名字和使用的任意一个明确的已经指定的servernames
<!-- use any explicitly specified servernames. -->
<!-- If autodetect is FALSE, James will use only the specified servernames. -->
<!-- -->如果检测失败,james将使用仅有的指定servernames
<!-- If autodetectIP is not FALSE, James will also allow add the IP address for each servername. -->如果autodetectIP不失败,james同样允许为每个servername添加ip
<!-- The automatic IP detection is to support RFC 2821, Sec 4.1.3, address literals. -->automatic IP检测支持RFC 2821, Sec 4.1.3参照的地址
<!-- -->
<!-- To override autodetected server names simply add explicit servername elements. -->覆盖自动检测外部添加的服务元素的服务名称。
<!-- In most cases this will be necessary. -->这在大部分情况下是必须的。
<!-- By default, the servername 'localhost' is specified. This can be removed, if required. -->默认情况下,服务名'localhost'是被指定的,如果需要用到,它不能被移除。
<!-- -->
<!-- Warning: If you are using fetchpop it is important to include the -->
<!-- fetched domains in the server name list to prevent looping. -->
提示:如果用到“成批接受邮件”,可能要在服务器名字列表里包含成批的域名来防止回路。
<servernames autodetect="true" autodetectIP="true">
<!-- CONFIRM? -->
<servername>tech21</servername>
</servernames>
<!-- Set whether user names are case sensitive or case insensitive -->
设置是否区分大小写
<!-- Set whether to enable local aliases -->
设置是否区分本地别名
<!-- Set whether to enable forwarding -->
设置是否前导
<usernames ignoreCase="true" enableAliases="true" enableForwarding="true"/>
<!-- The inbox repository is the location for users inboxes -->
本地的收件箱库。
<!-- Default setting: file based repository - enter path ( use "file:///" for absolute) -->
默认设置:文件基本库,输入路径(使用绝对路径"file:///")
<!--<inboxRepository>
<repository destinationURL="file://var/mail/inboxes/" type="MAIL"/>
</inboxRepository>
-->
<!-- Alternative inbox repository definition for DB use. -->
选择自定义的数据库收件箱。
<!-- The format for the destinationURL is "db://<data-source>/<table>" -->
格式表示为目的的URL,"db://<data-source>/<table>"
<!-- <data-source> is the datasource name set up in the database-connections block, below -->
<data-source>是设定数据库连接语句块的数据源名字
<!-- <table> is the name of the table to store user inboxes in -->
<!-- The user name is used as <repositoryName> for this repository config. -->
<table>是在<repositoryName>标签配置的数据库的表名
<inboxRepository>
<repository destinationURL="db://maildb/inbox/" type="MAIL"/>
</inboxRepository>
<!-- Alternative inbox repository definition for DB use. -->
<!-- Stores message body in file system, rest in database -->
<!--
<inboxRepository>
<repository destinationURL="dbfile://maildb/inbox/" type="MAIL"/>
</inboxRepository>-->
<!-- Alternative inbox repository definition for mbox use. -->
<!-- This method uses UNIX standard mbox files and is meant for people using mbox files -->
<!-- with systems such as mail list archive displayers -->
<!-- Note that dot-locking is not currently supported -->
<!-- so network (write) accesses may cause mbox corruption -->
<!-- the sample mbox URL is an absolute URL; mbox:///var/mail will put the users mbox files in /var/mail/-->
<!--
<inboxRepository>
<repository destinationURL="mbox:///var/mail/" type="MAIL"/>
</inboxRepository>
-->
</James>
<!-- Fetch pop block, fetches mail from POP3 servers and inserts it into the incoming spool -->
<!-- Warning: It is important to prevent mail from looping by setting the -->
<!-- fetched domains in the <servernames> section of the <James> block -->
<!-- above. This block is disabled by default. -->
<!-- FetchPOP is being deprecated in favor of FetchMail -->
<fetchpop enabled="false">
<!-- You can have as many fetch tasks as you want, but each must have a -->
<!-- unique name by which it identified -->
<fetch name="mydomain.com">
<!-- Host name or IP address -->
<host>mail.mydomain.com</host>
<!-- Account login username -->
<user>username</user>
<!-- Account login password -->
<password>pass</password>
<!-- How frequently this account is checked - in milliseconds. 600000 is every ten minutes -->
<interval>600000</interval>
</fetch>
</fetchpop>
<!-- This is an example configuration for FetchMail, a JavaMail based gateway -->
<!-- service that pulls messages from other sources, and inserts them into the -->
<!-- spool. They are then processed normally, although FetchMail generally -->
<!-- has to fabricate some of the envelope information. FetchMail should be -->
<!-- considered a mail gateway, rather than a relay, in RFC terms. -->
<!-- Fetchmail is a functionally richer replacement for FetchPOP. -->
<!-- CHECKME: FetchMail is disabled by default, and must be configured to use. -->
<!-- Edit the file referred to by fetchmailConfig to enable and configure. -->
&fetchmailConfig;
<!-- The James Spool Manager block -->James缓冲池管理部分
<!-- -->
<!-- This block is responsible for processing messages on the spool. -->
这部分处理在缓冲池中的消息
<spoolmanager>
<!-- Number of spool threads -->池中的线程数
<threads> 10 </threads>
<!-- Set the Java packages from which to load mailets and matchers -->
设定载入邮件匹配里的java包
<mailetpackages>
<mailetpackage>org.apache.james.transport.mailets</mailetpackage>
</mailetpackages>
<matcherpackages>
<matcherpackage>org.apache.james.transport.matchers</matcherpackage>
</matcherpackages>
<!-- The root processor is a required processor - James routes all mail on the spool -->root进程是必须的进程,james首先通过这个进程发送缓冲池中的所有邮件。
<!-- through this processor first. -->
<!-- -->这个配置是一个root进程的示例配置。
<!-- This configuration is a sample configuration for the root processor. -->
<processor name="root">
<!-- Checks that the email Sender is associated with a valid domain. -->
检查email发送者是一个关联有效的域名
<!-- Useful for detecting and eliminating spam. -->
对于检测排除广告是非常有用的。
<!-- For this block to function, the spam processor must be configured. -->
运行这个部分,广告进程必须配置。
SenderInFakeDomain --> 伪装的发件人域名列表
<!--
<mailet match="SenderInFakeDomain=64.55.105.9,64.94.110.11,194.205.62.122,194.205.62.62,195.7.77.20,206.253.214.102,212.181.91.6,219.88.106.80,194.205.62.42,216.35.187.246,203.119.4.6" class="ToProcessor">
<processor> spam </processor>
</mailet>
-->
<!-- Important check to avoid looping -->检测消除回路非常重要
<mailet match="RelayLimit=30" class="Null"/>
<!--
<mailet match="All" class="XMLVirtualUserTable">
<!- 1:1 mapping ->
<mapping>morgoth@middle-earth=sauron@mordor</mapping>
<!- 1:n mapping ->
<mapping>istari@middle-earth=saruman@isengard;radigast;gandalf</mapping>
<!- DSN mapping ->
<mapping>boromir@osgilliath=error:550 Requested action not taken: no such user here</mapping>
<!- regex based mapping ->
<mapping>*@osgilliath=regex:(.*)@osgilliath:${1}@minas-tirith</mapping>
<!- both standard and regex mapping ->
<mapping>ring@*=onering@mordor;regex:ring@(.*):ring@${1}</mapping>
<!- conditional regex mapping example ->
<mapping>*@listserver=regex:(.*)-on@listserver:${1}-subscribe@listserver;
regex:(.*)-off@listserver:${1}-unsubscribe@listserver
</mapping>
</mailet>
--&g