1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2026-01-27 20:45:56 +00:00

Turn chasquid-userdb into chasquid-util

This patch removes chasquid-userdb and adds a more generic and extensive
chasquid-util, that supports various operations on user databases as well as
aliases lookups.

The code is not very pretty but for now I took a more practical approach, the
tool is ancillary and can be tidied up later.
This commit is contained in:
Alberto Bertogli
2016-09-24 00:44:13 +01:00
parent 859d4733f8
commit 3d06fb3a78
6 changed files with 205 additions and 101 deletions

View File

@@ -69,11 +69,11 @@ type Recipient struct {
Type RType
}
type RType int
type RType string
const (
EMAIL RType = iota
PIPE
EMAIL RType = "(email)"
PIPE RType = "(pipe)"
)
var (

View File

@@ -62,11 +62,10 @@ func Load(path string) (*Config, error) {
c.DataDir = "/var/lib/chasquid"
}
logConfig(c)
return c, nil
}
func logConfig(c *Config) {
func LogConfig(c *Config) {
glog.Infof("Configuration:")
glog.Infof(" Hostname: %q", c.Hostname)
glog.Infof(" Max data size (MB): %d", c.MaxDataSizeMb)