diff --git a/cmd/smtp-dispatcher/main.go b/cmd/smtp-dispatcher/main.go index f7bcc3d..937642f 100644 --- a/cmd/smtp-dispatcher/main.go +++ b/cmd/smtp-dispatcher/main.go @@ -117,14 +117,15 @@ func usage(message string) { fmt.Fprintf(os.Stderr, "\n%s\n\n"+ "usage: %s \n"+ " where is one of\n"+ - " install, remove, debug, start, stop, pause, or continue.\n\n", - message, os.Args[0]) + " install, remove, debug, start, stop, pause, or continue.\n\n"+ + " or %s -g to generate the settings file.\n\n", + message, os.Args[0], os.Args[0]) os.Exit(8) } func generate() { buf := `{ - "interval": 45, + "interval": 47, "mailqueue": "c:\\mailqueue", "badmail": "c:\\badmail", "connections": { diff --git a/config/settings.go b/config/settings.go index 4160e0e..8e27d3d 100644 --- a/config/settings.go +++ b/config/settings.go @@ -17,12 +17,12 @@ import ( mqd_smtp "github.com/jw4/mqd/smtp" ) -// SmtpAuthType names smtp authentication methods -type SmtpAuthType string +// SMTPAuthType names smtp authentication methods +type SMTPAuthType string const ( - LoginAuth SmtpAuthType = "LOGIN" - PlainAuth SmtpAuthType = "PLAIN" + LoginAuth SMTPAuthType = "LOGIN" + PlainAuth SMTPAuthType = "PLAIN" ) // Settings holds the configuration parameters used by the mail queue @@ -133,7 +133,7 @@ type ConnectionDetails struct { Host string `json:"host,omitempty"` // AuthType shows which authentication mechanism should be used // when connecting to this Server. - AuthType SmtpAuthType `json:"authtype"` + AuthType SMTPAuthType `json:"authtype"` // Username of the Sender account. Username string `json:"username,omitempty"` // Password of the Sender account. diff --git a/dispatcher/mailqueue.go b/dispatcher/mailqueue.go index 1d28933..690fd0e 100644 --- a/dispatcher/mailqueue.go +++ b/dispatcher/mailqueue.go @@ -40,6 +40,10 @@ func (q *folderQueue) Process(callbackFn MailQueueCallbackFn) error { func (q *folderQueue) processItem(fn MailQueueCallbackFn) filepath.WalkFunc { return func(path string, info os.FileInfo, err2 error) error { glog.V(2).Infof("processing %q", path) + if info == nil { + glog.Warningf("path not found for %q", path) + return nil + } if info.IsDir() { if path == q.mailqueue { return nil diff --git a/img/GOPHER.md b/img/GOPHER.md index f73e4a1..4e22e96 100644 --- a/img/GOPHER.md +++ b/img/GOPHER.md @@ -2,4 +2,4 @@ The Go gopher was designed by Renee French. (http://reneefrench.blogspot.com/) The design is licensed under the Creative Commons 3.0 Attributions license. Read this article for more details: http://blog.golang.org/gopher -The Go Gopher mascot has been modified for this program. +The Go Gopher mascot has been modified for this program.