aboutsummaryrefslogtreecommitdiff
path: root/main.go
blob: 60082da463bd640211b03f14e375c67fed84eeef (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package main

import (
	"flag"

	"go.lindenii.runxiyu.org/lindenii-common/clog"
)

const VERSION = "lindenii-maild v0.0.0"

func main() {
	config_path := flag.String("config", "/etc/lindenii/maild.scfg", "path to configuration file")
	flag.Parse()

	err := load_config(*config_path)
	if err != nil {
		clog.Fatal(1, "Error while loading configuration file: "+err.Error())
	}

	go serve_mx()
	go serve_imap()

	deadlock := make(chan struct{})
	deadlock <- struct{}{}
}