From fcc863e8b8157d9e3900bcfce8eecbb4f03b73eb Mon Sep 17 00:00:00 2001
From: Jinnrry <19919556+Jinnrry@users.noreply.github.com>
Date: Sat, 10 May 2025 09:31:23 +0800
Subject: [PATCH] feature/v2.8.4 (#277)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
1、发件列表不展示bug修复
2、smtps支持587端口
3、发件代码优化
---
Dockerfile | 2 +-
DockerfileGithubAction | 2 +-
README.md | 6 +-
README_CN.md | 6 +-
fe/src/views/ListView.vue | 134 +++++++++----------
server/controllers/email/move.go | 14 +-
server/controllers/group.go | 10 +-
server/dto/parsemail/email.go | 2 +-
server/hooks/spam_block/export/export.go | 19 ++-
server/hooks/spam_block/spam_block.go | 6 +-
server/listen/smtp_server/action.go | 117 ++++++++++++++++
server/listen/smtp_server/smtp.go | 144 +++++---------------
server/main_test.go | 4 +-
server/models/user_email.go | 2 +-
server/res_init/init.go | 1 +
server/services/list/list.go | 4 +-
server/utils/send/send.go | 163 ++++++++---------------
server/utils/smtp/smtp.go | 4 +
18 files changed, 334 insertions(+), 306 deletions(-)
create mode 100644 server/listen/smtp_server/action.go
diff --git a/Dockerfile b/Dockerfile
index 2d24182..bc1f50e 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -34,6 +34,6 @@ COPY --from=serverbuild /work/server/hooks/telegram_push/output/* ./plugins/
COPY --from=serverbuild /work/server/hooks/wechat_push/output/* ./plugins/
COPY --from=serverbuild /work/server/hooks/spam_block/output/* ./plugins/
-EXPOSE 25 80 110 443 465 995 993
+EXPOSE 25 80 110 443 465 587 995 993
CMD /work/pmail
diff --git a/DockerfileGithubAction b/DockerfileGithubAction
index fb0ff2c..cef164c 100644
--- a/DockerfileGithubAction
+++ b/DockerfileGithubAction
@@ -28,6 +28,6 @@ COPY --from=serverbuild /work/hooks/telegram_push/output/* ./plugins/
COPY --from=serverbuild /work/hooks/wechat_push/output/* ./plugins/
COPY --from=serverbuild /work/hooks/spam_block/output/* ./plugins/
-EXPOSE 25 80 110 443 465 995 993
+EXPOSE 25 80 110 443 465 587 995 993
CMD /work/pmail
diff --git a/README.md b/README.md
index 54f7567..9307e60 100644
--- a/README.md
+++ b/README.md
@@ -57,10 +57,10 @@ First go to [spamhaus](https://check.spamhaus.org/) and check your domain name a
Or
-`docker run -p 25:25 -p 80:80 -p 443:443 -p 110:110 -p 465:465 -p 995:995 -p 993:993 -v $(pwd)/config:/work/config ghcr.io/jinnrry/pmail:latest`
+`docker run -p 25:25 -p 80:80 -p 443:443 -p 110:110 -p 465:465 -p 587:587 -p 995:995 -p 993:993 -v $(pwd)/config:/work/config ghcr.io/jinnrry/pmail:latest`
> [!IMPORTANT]
-> If your server has a firewall turned on, you need to open ports 25, 80, 110, 443, 465, 993, 995
+> If your server has a firewall turned on, you need to open ports 25, 80, 110, 443, 465,587, 993, 995
## 3、Configuration
@@ -102,7 +102,7 @@ POP3 Port: 110/995(SSL)
SMTP Server Address : smtp.[Your Domain]
-SMTP Port: 25/465(SSL)
+SMTP Port: 25/465、587(SSL)
IMAP Server Address : imap.[Your Domain]
diff --git a/README_CN.md b/README_CN.md
index ba92dba..86422bb 100644
--- a/README_CN.md
+++ b/README_CN.md
@@ -65,10 +65,10 @@ PMail是一个追求极简部署流程、极致资源占用的个人域名邮箱
或者
-`docker run -p 25:25 -p 80:80 -p 443:443 -p 110:110 -p 465:465 -p 995:995 -p 993:993 -v $(pwd)/config:/work/config ghcr.io/jinnrry/pmail:latest`
+`docker run -p 25:25 -p 80:80 -p 443:443 -p 110:110 -p 465:465 -p 587:587 -p 995:995 -p 993:993 -v $(pwd)/config:/work/config ghcr.io/jinnrry/pmail:latest`
> [!IMPORTANT]
-> 如果你服务器开启了防火墙,你需要打开25、80、110、443、465、995、993端口
+> 如果你服务器开启了防火墙,你需要打开25、80、110、443、465、587、995、993端口
## 3、配置
@@ -107,7 +107,7 @@ POP3端口: 110/995(SSL)
SMTP地址: smtp.[你的域名]
-SMTP端口: 25/465(SSL)
+SMTP端口: 25/465、587(SSL)
IMAP地址: imap.[Your Domain]
diff --git a/fe/src/views/ListView.vue b/fe/src/views/ListView.vue
index dcf71df..96eb74e 100644
--- a/fe/src/views/ListView.vue
+++ b/fe/src/views/ListView.vue
@@ -13,14 +13,14 @@