windows安装运行Apache James(基于spring的版本)

下载地址

下载列表
https://james.apache.org/download.cgi

直接下载基于spring版本
https://www.apache.org/dyn/closer.lua/james/server/3.8.0/james-server-app-3.8.0-app.zip

设置签名

解压,并切换到james-server-spring-app-3.8.0目录下,在powershellli执行

bash 复制代码
keytool -genkey -alias james -keyalg RSA -keystore conf/keystore

密码设置为:

bash 复制代码
james72laBalle

修改数据库为MYSQL配置(可跳过,默认使用derby)

创建数据库

在数据库中创建名为james的数据库

修改 conf/james-database.properties

注释

java 复制代码
#database.driverClassName=org.apache.derby.jdbc.EmbeddedDriver
#database.url=jdbc:derby:../var/store/derby;create=true
#database.username=app
#database.password=app
#vendorAdapter.database=DERBY

添加

java 复制代码
database.driverClassName=com.mysql.cj.jdbc.Driver
database.url=jdbc:mysql://192.168.xx.xx:3306/james?zeroDateTimeBehavior=convertToNull
database.username=root
database.password=root
vendorAdapter.database=MYSQL

添加jdbc的jar包

将mysql的jar包,扔到lib文件夹下

这里我用的是mysql-connector-j-8.0.33.jar

修改domainlist.xml文件

原内容

xml 复制代码
<domainlist class="org.apache.james.domainlist.jpa.JPADomainList">
   <autodetect>false</autodetect>
   <autodetectIP>false</autodetectIP>
   <defaultDomain>localhost</defaultDomain>
</domainlist>

修改为

xml 复制代码
<domainlist class="org.apache.james.domainlist.jpa.JPADomainList">
   <autodetect>false</autodetect>
   <autodetectIP>false</autodetectIP>
   <defaultDomain>bo.com</defaultDomain>
</domainlist>

修改mailetcontainer.xml文件

@@@@第一处@@@@

原内容

xml 复制代码
    <context>
        <!-- When the domain part of the postmaster mailAddress is missing, the default domain is appended.
        You can configure it to (for example) <postmaster>postmaster@myDomain.com</postmaster> -->
        <postmaster>postmaster</postmaster>
    </context>

修改为

xml 复制代码
    <context>
        <!-- When the domain part of the postmaster mailAddress is missing, the default domain is appended.
        You can configure it to (for example) <postmaster>postmaster@myDomain.com</postmaster> -->
        <postmaster>postmaster@bo.com</postmaster>
    </context>

@@@@第二处@@@@

直接注释掉这一段内容

原内容

xml 复制代码
       <mailet match="RemoteAddrNotInNetwork=127.0.0.1" class="ToProcessor">
          <processor>relay-denied</processor>
          <notice>550 - Requested action not taken: relaying denied</notice>
       </mailet>

修改为

xml 复制代码
       <!-- <mailet match="RemoteAddrNotInNetwork=127.0.0.1" class="ToProcessor">
          <processor>relay-denied</processor>
          <notice>550 - Requested action not taken: relaying denied</notice>
       </mailet>-->

启动

执行bin目录下的run.bat启动

相关推荐
沧海寄馀生19 小时前
Apache Hadoop生态组件部署分享-zookeeper
hadoop·zookeeper·eclipse·apache·java-zookeeper
SeaTunnel19 小时前
Apache SeaTunnel 如何将 CDC 数据流转换为 Append-Only 模式?
大数据·开源·apache·开发者·seatunnel·转换插件
SelectDB技术团队1 天前
公开免费!Apache Doris & SelectDB 培训与认证课程正式上线
apache
IDOlaoluo1 天前
apache-tomcat-7.0.42.tar.gz 下载与安装完整教程(附安装包)
java·tomcat·apache
DolphinScheduler社区2 天前
结项报告完整版 | 为 Apache DolphinScheduler 添加 gRPC 插件
大数据·开源·apache·海豚调度·大数据工作流调度
SelectDB3 天前
Apache Doris AI 能力揭秘(三):AI_AGG 与 EMBED 函数深度解析
数据库·后端·apache
q***01654 天前
【保姆级教程】apache-tomcat的安装配置教程
java·tomcat·apache
lijun_xiao20095 天前
Apache Hadoop-学习笔记1
hadoop·学习·apache
SelectDB技术团队5 天前
Apache Doris 自动分区:如何应对分布式环境下的复杂并发挑战|Deep Dive
分布式·apache
StarRocks_labs6 天前
StarRocks 4.0:让 Apache Iceberg 数据真正 Query-Ready
apache·数据湖·shuffle·starrocks 4.0·query-ready