67 lines
2.3 KiB
Markdown
67 lines
2.3 KiB
Markdown
1.将配置文件进行改造:初始页生成基础配置,然后管理员账户登陆后进行后续配置,如:{
|
||
"logLevel": "",
|
||
"domain": "vcer.cn",
|
||
"domains": ["vcer.cn"],
|
||
"webDomain": "xuans.vcer.cn",
|
||
"dkimPrivateKeyPath": "/xmail/config/dkim/dkim.priv",
|
||
"sslType": "1",
|
||
"SSLPrivateKeyPath": "/etc/ssl/vcer.cn/vcer.cn.key",
|
||
"SSLPublicKeyPath": "/etc/ssl/vcer.cn/fullchain.crt",
|
||
"dbDSN": "xuans:Xuans@1234@tcp(127.0.0.1:3306)/xmail?charset=utf8mb4&parseTime=True&loc=Local",
|
||
"dbType": "mysql",
|
||
"httpsEnabled": 2,
|
||
"spamFilterLevel": 0,
|
||
"httpPort": 3001,
|
||
"httpsPort": 3002,
|
||
"weChatPushAppId": "",
|
||
"weChatPushSecret": "",
|
||
"weChatPushTemplateId": "",
|
||
"weChatPushUserId": "",
|
||
"tgBotToken": "",
|
||
"tgChatId": "",
|
||
"isInit": true,
|
||
"webPushUrl": "",
|
||
"webPushToken": "",
|
||
"outboundMode": "relay",
|
||
"smtpRelayHost": "smtpdm.aliyun.com",
|
||
"smtpRelayPort": 465,
|
||
"smtpRelayEncryption": "tls",
|
||
"smtpRelayAuthType": "login",
|
||
"smtpRelayUsername": "xuans@vcer.cn",
|
||
"smtpRelayPassword": "XuansparkB34",
|
||
"smtpRelayFrom": "xuans@vcer.cn",
|
||
"emailCodeEnabled": true,
|
||
"emailCodeFrom": "xuans@vcer.cn",
|
||
"emailCodeFromName": "xuans@vcer.cn",
|
||
"emailCodeExpireMinutes": 5,
|
||
"emailCodeSendIntervalSeconds": 60,
|
||
"emailCodeMaxPerHour": 5,
|
||
"emailCodeMaxVerifyAttempts": 5,
|
||
"emailCodeTokenExpireMinutes": 5,
|
||
"emailCodeHashSecret": "OKLbGcd11c1slSdAh8YgHnSTC1e3gi9drVj5W/a/eEE="
|
||
},这些配置可以在管理员的设置页面进行修改
|
||
2.将config.json进行拆分,smtp、email、ssl、plugins做成单独的文件,config.json只保留数据库、域名、端口等基础配置
|
||
|
||
|
||
xxx/(部署目录)
|
||
├──config/(配置文件)
|
||
| ├── config.json
|
||
| ├── smtp.json
|
||
| ├── email.json
|
||
| ├── ssl.json
|
||
| └── plugins.json
|
||
|
|
||
├──ssl/(ssl证书文件)
|
||
| ├── xxx.crt
|
||
| ├── xxx.key
|
||
| ├── xxx.xxx
|
||
| └── .....
|
||
├──data/(数据库文件,数据库相关的文件均可存放)
|
||
| └── xxx.db/sql(数据库文件)
|
||
|
|
||
├──log/(日志文件)
|
||
| └── xxx.log
|
||
├──smail-admin(管理员重置密码程序)
|
||
└──smail(运行程序)
|
||
|
||
进行全面审查,然后使用mcp工具进行全面测试,每个功能都测试 |