davmail 配置
官网
DavMail 是一个Java 编写Exchange 的代理gateway软件,让一般smtp+imap/pop3 客户端可以通过这个代理收发邮件
davmail 安装
- unzip -d davmailxxx.zip -d /opt/davmail
davmail 配置
- 创建/opt/davmail/davmail.properties 拷贝官方实例配置 Official Config
- 如果是服务器注意修改davmail.url 为内部服务器地址
- 修改davmail.logFilePath=/opt/davmail/davmail.log
- 将davmail 注册到本地服务
- useradd davmail
- sudo chown -R davmail:davmail /opt/davmail
- sudo vim /lib/systemd/system/davmail.service
1
2
3
4
5
6
7
8
9
10[Unit]
Description=davmail proxy for exchange
[Service]
User=davmail
Group=davmail
Type=simple
ExecStart=/opt/davmail/davmail.sh /opt/davmail/davmail.properties
PIDFile=/var/run/davmail.pid
[Install]
WantedBy=multi-user.target graphical.target - systemctl enable davmail
- systemctl start davmail
- ps aux|grep davmail 检查服务是否正常 可以通过直接运行 /opt/davmail/davmail.sh /opt/davmail/davmail.properties 查看错误信息
- 修改/opt/davmail/davmail.sh
1
2
3
4
5
6#!/bin/bash
BASE=`dirname $0`
BASE=/opt/davmail
for i in $BASE/lib/*; do export CLASSPATH=$CLASSPATH:$i; done
JAVA=`which java`
$JAVA -Xmx512M -Dsun.net.inetaddr.ttl=60 -cp $BASE/davmail.jar:$CLASSPATH davmail.DavGateway $1
Thunder bird 配置
- STMP
- Server:localhost Port:1025
- UserName: you namee
- Connection security:Non
- Authentication Method:Password ,transmitted insecureity
- IMAP:
- Server:localhost Port:1143
- UserName: you name
- Connection security:None
- Authentication Method:Password ,transmitted insecureity