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执行

keytool -genkey -alias james -keyalg RSA -keystore conf/keystore

密码设置为:

james72laBalle

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

创建数据库

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

修改 conf/james-database.properties

注释

#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

添加

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文件

原内容

<domainlist class="org.apache.james.domainlist.jpa.JPADomainList">
   <autodetect>false</autodetect>
   <autodetectIP>false</autodetectIP>
   <defaultDomain>localhost</defaultDomain>
</domainlist>

修改为

<domainlist class="org.apache.james.domainlist.jpa.JPADomainList">
   <autodetect>false</autodetect>
   <autodetectIP>false</autodetectIP>
   <defaultDomain>bo.com</defaultDomain>
</domainlist>

修改mailetcontainer.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>

修改为

    <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>

@@@@第二处@@@@

直接注释掉这一段内容

原内容

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

修改为

       <!-- <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启动

相关推荐

  1. windows安装运行Apache James(基于spring版本

    2024-01-11 08:50:05       39 阅读
  2. windows各个版本安装SSH

    2024-01-11 08:50:05       23 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-01-11 08:50:05       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-01-11 08:50:05       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-01-11 08:50:05       18 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-01-11 08:50:05       20 阅读

热门阅读

  1. python 安装 cv2报错 conda install PackagesNotFoundError

    2024-01-11 08:50:05       47 阅读
  2. 华纳云:在Conda中环境迁移有哪些步骤

    2024-01-11 08:50:05       35 阅读
  3. conda的安装资源链接

    2024-01-11 08:50:05       39 阅读
  4. achievement_criteria_data

    2024-01-11 08:50:05       37 阅读
  5. Red Hat 8.0 本地源配置方法

    2024-01-11 08:50:05       30 阅读
  6. 迁移学习的最新进展和挑战

    2024-01-11 08:50:05       29 阅读
  7. RTL8762D I2C外设驱动

    2024-01-11 08:50:05       23 阅读
  8. Golang 泛型

    2024-01-11 08:50:05       25 阅读
  9. 03-编码篇-x264编译与介绍

    2024-01-11 08:50:05       29 阅读
  10. 编程笔记 html5&css&js 033 HTML SVG

    2024-01-11 08:50:05       27 阅读
  11. WPF 实现Popup不在最上层显示、随窗口移动

    2024-01-11 08:50:05       38 阅读
  12. Salesforce CPQ简介:视频+文档

    2024-01-11 08:50:05       36 阅读