jinnrry 2 роки тому
батько
коміт
ff455e4a59
3 змінених файлів з 24 додано та 24 видалено
  1. 8 9
      Dockerfile
  2. 6 6
      README.md
  3. 10 9
      README_CN.md

+ 8 - 9
Dockerfile

@@ -7,17 +7,16 @@ RUN yarn && yarn build
 
 
 FROM golang:alpine as serverbuild
-
+ARG VERSION
 WORKDIR /work
 
-COPY server .
 COPY --from=febuild /work/dist /work/http_server/dist
 
 RUN apk update && apk add git
-RUN go build -ldflags "-s -w -X 'main.goVersion=$(go version)' -X 'main.gitHash=$(git show -s --format=%H)' -X 'main.buildTime=$(TZ=UTC-8 date +%Y-%m-%d" "%H:%M:%S)'" -o pmail main.go
-RUN cd /work/hooks/telegram_push && go build -ldflags "-s -w" -o output/telegram_push main.go
-RUN cd /work/hooks/web_push && go build -ldflags "-s -w" -o output/web_push main.go
-RUN cd /work/hooks/wechat_push && go build -ldflags "-s -w" -o output/wechat_push main.go
+RUN go build -ldflags "-s -w -X 'main.version=${VERSION}' -X 'main.goVersion=$(go version)' -X 'main.gitHash=$(git show -s --format=%H)' -X 'main.buildTime=$(TZ=UTC-8 date +%Y-%m-%d" "%H:%M:%S)'" -o pmail main.go
+RUN cd /work/hooks/telegram_push && go build -ldflags "-s -w" -o output/telegram_push telegram_push.go
+RUN cd /work/hooks/web_push && go build -ldflags "-s -w" -o output/web_push web_push.go
+RUN cd /work/hooks/wechat_push && go build -ldflags "-s -w" -o output/wechat_push wechat_push.go
 
 
 FROM alpine
@@ -33,8 +32,8 @@ RUN apk add --no-cache tzdata \
 
 
 COPY --from=serverbuild /work/pmail .
-COPY --from=serverbuild /work/hooks/telegram_push/output/* ./plugin/
-COPY --from=serverbuild /work/hooks/web_push/output/* ./plugin/
-COPY --from=serverbuild /work/hooks/wechat_push/output/* ./plugin/
+COPY --from=serverbuild /work/hooks/telegram_push/output/* ./plugins/
+COPY --from=serverbuild /work/hooks/web_push/output/* ./plugins/
+COPY --from=serverbuild /work/hooks/wechat_push/output/* ./plugins/
 
 CMD /work/pmail

+ 6 - 6
README.md

@@ -33,11 +33,7 @@ beautiful and cute Logo for this project!
 
 * Support pop3, smtp protocol, you can use any mail client you like.
 
-## Disadvantages
 
-* At present, only the core function of sending and receiving emails has been completed. Basically, it can only be used
-  by a single person, and does not deal with issues related to permission management in the process of multiple users.
-* The UI is ugly
 
 # How to run
 
@@ -111,7 +107,11 @@ SMTP Port: 25/465(SSL)
 
 [Web Push](server/hooks/wechat_push/README.md)
 
+## Plugin Install
+> [!IMPORTANT]
+> Plugins run on your server as independent processes, please review the security of third-party plugins on your own.PMail currently only maintains the three plugins mentioned above.
 
+Copy plugin binary file to `/plugins`
 
 # For Developer
 
@@ -127,9 +127,9 @@ The code is in `server` folder.
 
 ## Api Documentation
 
-[go to wiki](https://github.com/Jinnrry/PMail/wiki)
+[go to wiki](https://github.com/Jinnrry/PMail/wiki/%E5%90%8E%E7%AB%AF%E6%8E%A5%E5%8F%A3%E6%96%87%E6%A1%A3)
 
 ## Plugin Development
 
-Reference this file. `server/hooks/wechat_push/wechat_push.go`
+[go to wiki](https://github.com/Jinnrry/PMail/wiki/%E6%8F%92%E4%BB%B6%E5%BC%80%E5%8F%91%E8%AF%B4%E6%98%8E)
 

+ 10 - 9
README_CN.md

@@ -39,13 +39,6 @@ PMail是一个追求极简部署流程、极致资源占用的个人域名邮箱
 
 只要支持pop3、smtp协议的邮件客户端均可使用
 
-## 其他
-
-### 不足
-
-1、目前只完成了最核心的收发邮件功能。基本上仅针对单人使用,没有处理多人使用、权限管理相关问题。
-
-2、前端UI交互较差
 
 # 如何部署
 
@@ -117,6 +110,12 @@ SMTP端口: 25/465(SSL)
 
 [WebHook推送](server/hooks/wechat_push/README.md)
 
+## 插件安装
+> [!IMPORTANT]
+> 插件已独立进程的方式运行在你的服务器上,请自行审查第三方插件的安全性。PMail目前仅维护上述三款插件
+
+将插件二进制文件放到`plugins`文件夹中即可
+
 # 参与开发
 
 ## 项目架构
@@ -131,8 +130,10 @@ SMTP端口: 25/465(SSL)
 
 ## 后端接口文档
 
-[参见Wiki](https://github.com/Jinnrry/PMail/wiki)
+[go to wiki](https://github.com/Jinnrry/PMail/wiki/%E5%90%8E%E7%AB%AF%E6%8E%A5%E5%8F%A3%E6%96%87%E6%A1%A3)
 
 ## 插件开发
 
-参考微信推送插件 `server/hooks/wechat_push/wechat_push.go`
+[go to wiki](https://github.com/Jinnrry/PMail/wiki/%E6%8F%92%E4%BB%B6%E5%BC%80%E5%8F%91%E8%AF%B4%E6%98%8E)
+
+