diff --git a/parser/parser.go b/parser/parser.go index 901813b..d675c79 100644 --- a/parser/parser.go +++ b/parser/parser.go @@ -52,7 +52,7 @@ func ParseMailQ(dataSource io.Reader) ([]QEntry, error) { line = scanner.Text() if strings.HasPrefix(line, "Mail queue is empty") { // If mail queue is empty, there is nothing to do - return nil, errors.New(line) + return []QEntry{}, nil } else if strings.HasPrefix(line, "-Queue ID-") == false { // Abort if input does not look like output from mailq(1) return nil, errors.New("Sorry, this does not look like output from mailq(1).")