This commit is contained in:
jinnrry committed 2023-08-12 12:49:57 +08:00
1 parent 4a26f52fde
commit 318fea24ad
42 files changed
+890 -375

No files matched your search

+6 -4
View File
@@ -1,11 +1,13 @@
{
"domain": "",
"webDomain": "",
"logLevel": "debug",
"domain": "domain.com",
"webDomain": "mail.domain.com",
"dkimPrivateKeyPath": "config/dkim/dkim.priv",
"sslType": "0",
"SSLPrivateKeyPath": "config/ssl/private.key",
"SSLPublicKeyPath": "config/ssl/public.crt",
"dbDSN": "",
"dbType": "",
"dbDSN": "./pmail.db",
"dbType": "sqlite",
"weChatPushAppId": "",
"weChatPushSecret": "",
"weChatPushTemplateId": "",
+5 -1
View File
@@ -11,9 +11,11 @@ import (
var IsInit bool
type Config struct {
LogLevel string `json:"logLevel"`
Domain string `json:"domain"`
WebDomain string `json:"webDomain"`
DkimPrivateKeyPath string `json:"dkimPrivateKeyPath"`
SSLType string `json:"sslType"` // 0表示自动生成证书,1表示用户上传证书
SSLPrivateKeyPath string `json:"SSLPrivateKeyPath"`
SSLPublicKeyPath string `json:"SSLPublicKeyPath"`
DbDSN string `json:"dbDSN"`
@@ -30,10 +32,12 @@ type Config struct {
//go:embed tables/*
var tableConfig embed.FS
const Version = "1.1.0"
const Version = "2.0.0"
const DBTypeMySQL = "mysql"
const DBTypeSQLite = "sqlite"
const SSLTypeAuto = "0" //自动生成证书
const SSLTypeUser = "1" //用户上传证书
var DBTypes []string = []string{DBTypeMySQL, DBTypeSQLite}
+6 -4
View File
@@ -1,11 +1,13 @@
{
"domain": "",
"webDomain": "",
"logLevel": "info",
"domain": "domain.com",
"webDomain": "mail.domain.com",
"dkimPrivateKeyPath": "config/dkim/dkim.priv",
"sslType": "0",
"SSLPrivateKeyPath": "config/ssl/private.key",
"SSLPublicKeyPath": "config/ssl/public.crt",
"dbDSN": "",
"dbType": "",
"dbDSN": "./pmail.db",
"dbType": "sqlite",
"weChatPushAppId": "",
"weChatPushSecret": "",
"weChatPushTemplateId": "",
-1
View File
@@ -1 +0,0 @@
使用[go-msgauth](https://github.com/emersion/go-msgauth)项目的dkim-keygen工具生成公钥和私钥
-2
View File
@@ -1,2 +0,0 @@
INSERT INTO user (account, name, password) VALUES ('admin', 'admin', 'faddb6ec2efe16116a342f5512583c48');
@@ -1,2 +0,0 @@
INSERT INTO pmail.user_auth (user_id, email_account) VALUES (1, '*');
@@ -1,2 +0,0 @@
INSERT INTO user (account, name, password) VALUES ('admin', 'admin', 'faddb6ec2efe16116a342f5512583c48');
@@ -1,2 +0,0 @@
INSERT INTO user_auth (user_id, email_account) VALUES (1, '*');