From a113b8e4d7abff262f2de76983e0d372cf62d122 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 27 Dec 2017 13:14:53 +0100 Subject: dashboard/app: handle no bug ID in emails better We see these warnings when people CC syzbot on unrelated threads. If there is no command in the email, don't produce warning at all. On the other hand if there is a command, warn and send sender reply that syzbot can't find the corresponding bug. --- dashboard/app/reporting_email.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dashboard/app/reporting_email.go b/dashboard/app/reporting_email.go index 555398160..045409455 100644 --- a/dashboard/app/reporting_email.go +++ b/dashboard/app/reporting_email.go @@ -331,7 +331,13 @@ func incomingMail(c context.Context, r *http.Request) error { func loadBugInfo(c context.Context, msg *email.Email) (bug *Bug, bugReporting *BugReporting, reporting *Reporting) { if msg.BugID == "" { - log.Warningf(c, "no bug ID (%q)", msg.Subject) + if msg.Command == "" { + // This happens when people CC syzbot on unrelated emails. + log.Infof(c, "no bug ID (%q)", msg.Subject) + } else { + log.Warningf(c, "no bug ID (%q)", msg.Subject) + replyTo(c, msg, "Can't find the corresponding bug.", nil) + } return nil, nil, nil } bug, _, err := findBugByReportingID(c, msg.BugID) -- cgit mrf-deployment