-
Notifications
You must be signed in to change notification settings - Fork 79
/
vars.go
19 lines (16 loc) · 817 Bytes
/
vars.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package main
import "flag"
var (
flagServerName = flag.String("name", "smtp2http", "the server name")
flagListenAddr = flag.String("listen", ":smtp", "the smtp address to listen on")
flagWebhook = flag.String("webhook", "http://localhost:8080/my/webhook", "the webhook to send the data to")
flagMaxMessageSize = flag.Int64("msglimit", 1024*1024*2, "maximum incoming message size")
flagReadTimeout = flag.Int("timeout.read", 5, "the read timeout in seconds")
flagWriteTimeout = flag.Int("timeout.write", 5, "the write timeout in seconds")
flagAuthUSER = flag.String("user", "", "user for smtp client")
flagAuthPASS = flag.String("pass", "", "pass for smtp client")
flagDomain = flag.String("domain", "", "domain for recieving mails")
)
func init() {
flag.Parse()
}