James 3.0 邮箱配置

默认使用文件存储信息,如果用mysql,只需修改conf/james-database.properties即可:

database.driverClassName=com.mysql.jdbc.Driver
database.url=jdbc:mysql://localhost:3306/mail?autoReconnect=true&zeroDateTimeBehavior=convertToNull&noAccessToProcedureBodies=true


database.username=root
database.password=****


# Supported adapters are:
# DB2, DERBY, H2, HSQL, INFORMIX, MYSQL, ORACLE, POSTGRESQL, SQL_SERVER, SYBASE 
vendorAdapter.database=MYSQL


# Use streaming for Blobs
# This is only supported on a limited set of databases atm. You should check if its supported by your DB before enable
# it. 
# 
# See:
# http://openjpa.apache.org/builds/latest/docs/manual/ref_guide_mapping_jpa.html  #7.11.  LOB Streaming 
# 
openjpa.streaming=false



启用conf/smtpserver.conf后,可以

1. 限制邮件大小: <maxmessagesize>10240</maxmessagesize>,限制10M

2. 注释掉: <authorizedAddresses>127.0.0.0/8</authorizedAddresses>,否则外网邮件发布出去;


如果在james服务器前加nginx,那么james接收的到的是本地localhost的邮件,默认对localhost信任,所以所有的邮件都能发。


smtp server

from:http://mail-archives.apache.org/mod_mbox/james-server-user/201201.mbox/<4F04A9A3.3030705@campanell.com>

> When with authRequired=true, James will always ask a username/password
> for the SMTP connection (initiated by a mail client or a another SMTP
> server).
> ...except indeed for the hostname (or IP addresses) listed in the
> authorizedAddresses tag.
> 
> You are using the correct syntax, but you should add in the
> authorizedAddresses list the exact IP address (or hostname) from which
> you are sending the mail.
> 

第一次测试符合此段描述;

第二次测试,结果是:authRequired=true,只能给本域名的用户发邮件。

------------------------------

ehlo localhost

mail from:<a@b.com>
rcpt to:<a@b.com> 
DATA
TO:aa
FROM:bb
SUBJECT:yyyyyyyy
fds
test
.

NOOP

----------------------

James部署结构图:


1. Mysql Server: mail提供邮件存储;

2.James server: smtp 25提供其他smtp发送到本邮箱的邮件(在smtpserver.conf将authRequired=true,防止此服务器沦落为垃圾邮件的中继器);

3. James server: smtp 465, IMAP 995, POP3 993提供邮件客户端的加密连接(ssl证书为认真也可用),同时提供账号管理服务,可以直接调用:james-cli.sh;




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值