Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
更换新的下载地址,及支持TSL的二进制包
  • Loading branch information
canghai908 authored Jan 10, 2019
1 parent c156445 commit 4f8fdd4
Showing 1 changed file with 29 additions and 13 deletions.
42 changes: 29 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,24 @@ mail-provider

## 安装方法

1.二进制安装(推荐)
1.二进制安装(推荐)
sha256sum
```bash
7f714c8e4542670833505c274c420be1c89c5247dd8c72121cf0baa1d33edd49 falcon-mail-provider.tar.gz
```

下载编译好的二进制
```bash
wget https://dl.cactifans.com/open-falcon/mail-provider.tar.gz
mkdir -p mail-provider
tar zxvf mail-provider.tar.gz -C mail-provider
cd mail-provider
wget https://dl.cactifans.com/open-falcon/falcon-mail-provider.tar.gz
mkdir -p falcon-mail-provider
tar zxvf falcon-mail-provider.tar.gz -C falcon-mail-provider
cd falcon-mail-provider
```
修改cfg.json文件相关信息,使用
```bash
./control start
```
即可启动客户端
即可启动

2.源码编译(如无科学上网方法,请勿尝试)
下载之后为源码,安装golang环境,环境配置参考[golang环境配置](http://book.open-falcon.org/zh/quick_install/prepare.html)
Expand All @@ -35,21 +40,32 @@ go get ./...
```bash
./control start
```
即可启动
即可启动


## 使用方法

测试发送
启动之后使用以下命令测试:
```
curl http://$ip:4000/sender/mail -d "[email protected],[email protected]&subject=xx&content=yy"
curl http://127.0.0.1:4000/sender/mail -d "[email protected],[email protected]&subject=xx&content=yy"
```
在Alarm组件里修改配置mail地址为
是否能收到邮件,如收到邮件,表示配置成功,如未收到邮件,使用
```bash
./control tail
```
"mail": "http://127.0.0.1:4000/sender/mail",
查看日志。
在Alarm组件的配置文件里,配置对应地址即可
```json
...
"api": {
...
"mail": "http://127.0.0.1:4000/sender/mail",
...
},
...
```

## FAQ

1.此插件目前不支持smtp SSL协议
1.如使用自建邮件系统请设置 skipVerify 为 true 以避免证书校验错误,即使未开启TLS。(因为默认会尝试StartTLS)

2.对于126.163等邮箱请控制发信频率以免被封

0 comments on commit 4f8fdd4

Please sign in to comment.