当前位置: 首页 > news >正文

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

http://www.lryc.cn/news/278118.html

相关文章:

  • Elasticsearch 基本概念:快速入门指南【记录】
  • 【JVM 基础】类字节码详解
  • 【算法】基础算法001之双指针
  • [力扣 Hot100]Day2 字母异位词分组
  • 记一次 easyswoole 热重载失效复盘 grpc扩展惹的祸
  • 存储过程从表中获取数据库名称
  • .NET 反射的介绍和简单应用
  • 在drawio中使用BPMN2.0绘制详细的业务流程图和编排模型
  • GO——defer函数
  • 【UE Niagara学习笔记】06 - 制作火焰喷射过程中飞舞的火星
  • 机器学习笔记一之入门概念
  • 用于脚本支持的 CSS 媒体查询
  • 【HBase】——整合Phoenix
  • 【操作系统xv6】学习记录5--实验1 Lab: Xv6 and Unix utilities
  • Python从入门到网络爬虫(控制语句详解)
  • transbigdata笔记:数据预处理
  • java中解码和编码出现乱码原因
  • 60V降压3.3V稳压芯片 60V降压5V稳压芯片60V降压12V稳压芯片
  • 01第一个Mybatis程序+引入Junit+引入日志文件logback
  • 音乐制作软件Studio One mac有哪些特点
  • 开源C语言库Melon之日志模块
  • [NOIP2006 提高组] 作业调度方案(修改)
  • uniapp微信小程序投票系统实战 (SpringBoot2+vue3.2+element plus ) -全局异常统一处理实现
  • 浏览器缓存引发的odoo前端报错
  • 如何搭建开源知识库软件AFFiNE并实现公网环境远程协作【内网穿透】
  • 记忆泊车信息安全技术要求
  • 开源分布式任务调度系统DolphinScheduler本地部署与远程访问
  • C++day3作业
  • 设计模式⑤ :一致性
  • Android通过Recyclerview实现流式布局自适应列数及高度