feature/v2.8.1 (#239)

修复ssl证书校验失败
部分客户端兼容性修复
修复邮件移动失败问题
支持“广告箱”
This commit is contained in:
Jinnrry authored and GitHub committed 2025-01-06 21:01:38 +08:00
1 parent 5af46b32f6
commit 69800a8a0e
19 files changed
+73 -1166

No files matched your search

+4 -2
View File
@@ -218,7 +218,8 @@ func GetGroupStatus(ctx *context.Context, groupName string, params []string) (st
case "MESSAGES":
db.Instance.Table("user_email").Select("count(1)").Where("group_id=?", group.ID).Get(&value)
case "UIDNEXT":
db.Instance.Table("email").Select("count(1)").Get(&value)
db.Instance.Table("user_email").Select("id").OrderBy("id desc").Get(&value)
value += 1
case "UIDVALIDITY":
value = group.ID
case "UNSEEN":
@@ -241,7 +242,8 @@ func GetGroupStatus(ctx *context.Context, groupName string, params []string) (st
case "MESSAGES":
value = getGroupNum(ctx, groupName, false)
case "UIDNEXT":
db.Instance.Table("email").Select("count(1)").Get(&value)
db.Instance.Table("user_email").Select("id").OrderBy("id desc").Get(&value)
value += 1
case "UIDVALIDITY":
value = models.GroupNameToCode[groupName]
case "UNSEEN":
+1 -1
View File
@@ -290,7 +290,7 @@ func CheckSSLCrtInfo() (int, time.Time, bool, error) {
nameMatchFail := true
for _, name := range cert.DNSNames {
if strings.Contains("imap", name) {
if strings.Contains(name, "imap") {
nameMatchFail = false
break
}
+2 -2
View File
@@ -9,7 +9,7 @@ import (
func TestCheckSSLCrtInfo(t *testing.T) {
config.Init()
got, got1, _, err := CheckSSLCrtInfo()
got, got1, match, err := CheckSSLCrtInfo()
fmt.Println(got, got1, err)
fmt.Println(got, got1, match, err)
}