Add optional zstd mbox archives
This commit is contained in:
parent
21844688ac
commit
e612896e06
14 changed files with 620 additions and 39 deletions
|
|
@ -3,6 +3,7 @@ package backend
|
|||
import (
|
||||
"encoding/json"
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Cfg ist die globale App-Konfiguration (config.json). Enthaelt NUR
|
||||
|
|
@ -11,13 +12,14 @@ import (
|
|||
var Cfg Config
|
||||
|
||||
type Config struct {
|
||||
Bind string `json:"bind"`
|
||||
Port string `json:"port"`
|
||||
AdminUser string `json:"admin_user"`
|
||||
AdminPass string `json:"admin_pass"`
|
||||
DBPath string `json:"db_path"`
|
||||
MboxRoot string `json:"mbox_root"`
|
||||
ForwardSMTP SMTPConfig `json:"forward_smtp"`
|
||||
Bind string `json:"bind"`
|
||||
Port string `json:"port"`
|
||||
AdminUser string `json:"admin_user"`
|
||||
AdminPass string `json:"admin_pass"`
|
||||
DBPath string `json:"db_path"`
|
||||
MboxRoot string `json:"mbox_root"`
|
||||
MboxCompression string `json:"mbox_compression"`
|
||||
ForwardSMTP SMTPConfig `json:"forward_smtp"`
|
||||
}
|
||||
|
||||
// SMTPConfig ist NUR fuer das manuelle Weiterleiten einzelner Mails aus dem
|
||||
|
|
@ -47,5 +49,9 @@ func LoadConfig(path string) error {
|
|||
if Cfg.MboxRoot == "" {
|
||||
Cfg.MboxRoot = "./backup"
|
||||
}
|
||||
Cfg.MboxCompression = strings.ToLower(strings.TrimSpace(Cfg.MboxCompression))
|
||||
if Cfg.MboxCompression == "" {
|
||||
Cfg.MboxCompression = "none"
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue