1 parent
5af46b32f6
commit
69800a8a0e
19 files changed
+73
-1166
No files matched your search
@@ -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":
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
Reference in new issue
Block a user