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=truedatabase.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;
總結
以上是生活随笔為你收集整理的James 3.0 邮箱配置的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: http各种中的各种timeout
- 下一篇: Spring Controller接收h