aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/email/parser.go
Commit message (Collapse)AuthorAgeFilesLines
* pkg/email: extract base-commit hash from emailsPimyn Girgis2026-01-091-28/+40
| | | | If the author of a patch series provides a base-commit tag, extract and store the hash.
* pkg/email: decode rfc2047 subjectsAleksandr Nogikh2025-10-151-1/+11
| | | | | It's not done transparently by the email library. Add a test that verifies the result.
* all: apply linter auto fixesTaras Madan2025-07-171-2/+2
| | | | ./tools/syz-env bin/golangci-lint run ./... --fix
* pkg/email: share raw email addressesAleksandr Nogikh2025-07-101-5/+19
| | | | These will be necessary to properly route emails in dashboard.
* dashboard: prefix forwarded email subjectsAleksandr Nogikh2025-07-101-0/+2
| | | | This will allow us to easily identify them.
* dashboard: forward emails from designated inboxesAleksandr Nogikh2025-07-031-1/+5
| | | | | | For some specified inboxes, forward the emails that contain syz commands. Add tests to verify the behavior.
* dashboard: adapt to the new Googe Groups footerAleksandr Nogikh2024-10-251-2/+6
| | | | | | It changed recently and it broke our email discussion link extraction. Closes #5431.
* pkg/email: remove the debugging codeAleksandr Nogikh2024-06-121-1/+0
| | | | This is not needed for the actual operation.
* dashboard: auto-guess kernel and repo for #syz testAleksandr Nogikh2023-09-061-7/+16
| | | | | We used to support this only for external reportings, but let's auto-guess these parameters for all incoming patch testing commands.
* all: use special placeholder for errorsTaras Madan2023-07-241-8/+8
|
* dashboard: support bug labelsAleksandr Nogikh2023-04-271-1/+4
| | | | | | | | | | | | | | | | Let bug labels come in three flavours: 1) Bug labels with multiple values (e.g. `subsystems`). 2) Bug labels with only one value (e.g. `prio`). 3) Flags. Let users configure bug labels via email by issuing the following commands: #syz set subsystems: abc, def #syz set no-reminders #syz unset no-reminders Also let users set tags for invididual bugs in reported bug lists: #syz set <1> some-tag
* pkg/email: support multiple commandsAleksandr Nogikh2023-04-271-28/+41
| | | | | | | | | | It's not always convenient that we can receive only one command per email. Update pkg/email parsing code to extract everything which there is. Update reporting_email.go to handle multiple email commands. Set different limits for bug email commands and bug list commands.
* pkg/email: expose OwnEmail flagAleksandr Nogikh2023-04-121-0/+2
| | | | | We anyway already extract this information, there's no sense in extracting it again in other places.
* pkg/email: parse multiple In-Reply-To message IDsAleksandr Nogikh2023-04-121-1/+15
| | | | | Even though the standard seems to prohibit it, there are real world cases of messages with multiple IDs in an "In-Reply-To" header.
* pkg/email: extract more informationAleksandr Nogikh2023-04-061-8/+60
| | | | | | | | | Extract Date and InReplyTo. Extract not just one, but multiple BugIDs from multiple sources: 1) Email addresses in From/To/Cc. 2) Email addresses in Body. 3) Dashboard links in Body.
* dashboard: support `#syz regenerate` commandAleksandr Nogikh2023-03-281-0/+3
| | | | | | If the `#syz regenerate` command is sent in response to a bug list, dashboard will schedule its regeneration the next time the corresponding cron job is run.
* pgk/email: parse the new "set" commandAleksandr Nogikh2023-02-241-0/+5
| | | | For now this command will be used to manually set bug's subsystems.
* all: ioutil is deprecated in go1.19 (#3718)Taras Madan2023-02-231-3/+2
|
* all: fix duplicate parameter typesDmitry Vyukov2023-01-131-1/+1
|
* pkg/email: refactor ParsePatchAleksandr Nogikh2022-12-051-2/+2
| | | | | Currently the function returns the values that are not being used anywhere. Refactor it.
* pkg/email: tolerate newline characters after #syzAleksandr Nogikh2022-11-291-1/+2
| | | | It look like email clients can insert newlines there if the line is too long.
* pkg/email: detect author and mailing listAleksandr Nogikh2022-11-211-19/+47
| | | | | | Handle two types of mailing list responses: * From contains the original author. * From is replaced by the mailing list.
* dashboard: reduce CanonicalEmail callsAleksandr Nogikh2022-11-211-2/+2
| | | | | | | Sometimes we call it before accessing emails, sometimes we do not. This is prone to errors. Always canonicalize From and Cc, this should somewhat reduce the problem.
* pkg/email: add support for Sender extractionAleksandr Nogikh2022-11-071-0/+13
|
* pkg/email: strip \t in test command argsDmitry Vyukov2021-03-091-3/+6
| | | | | | There was a precedent of using: syz fix: repo \t commit This was rejected as error. Support \t between tokens.
* dashboard/app: add unfix commandDmitry Vyukov2020-10-011-22/+29
| | | | | Add "#syz unfix" command that undoes "#syz fix" effects and resets any existing fixing commits.
* pkg/email: accept #syz- prefix for commandsDmitry Vyukov2020-01-071-4/+11
| | | | | Some users spell the command as "#syz-dup:". Support this and few more variations.
* pkg/email: allow commands in subjectDmitry Vyukov2019-05-131-16/+16
| | | | | | Several users attempted this and there does not seem to be any reason to not allow this. So parse out command from subject as well.
* dashboard/app: restore printing of email commandsDmitry Vyukov2019-05-081-6/+7
| | | | | | | After commit 9ad9ef29caa52714dd5faff167e4b61643e40a7e we started saying "your command '3' is accepted" because we use numbers now. Keep string representation of the command when parsing and use it in reply emails.
* dashboard/app: slightly relax command parsingDmitry Vyukov2019-03-221-10/+51
| | | | | Users have misspelled test: multiple times. Accept commands without the colon.
* dashboard/app: add uncc commandDmitry Vyukov2019-03-221-0/+11
| | | | | | | | | Add "#syz uncc" command as a safety handle. The command allows sender to unsubscribe from all future communication on the bug. Linus mentioned possibility of saying "I'm not the right person for this report" in the context of bug reminders: https://groups.google.com/d/msg/syzkaller/zYlQ-b-QPHQ/AJzpeObcBAAJ
* gometalinter: clean up vetshadowDmitry Vyukov2018-07-311-1/+4
| | | | | | | This just cleans up existing warnings. vetshadow is not enabled yet because it crashes. Update #538
* pkg/email: support quoted-printable emailsDmitry Vyukov2018-06-181-2/+5
| | | | | | We did not handle quoted-printable because mime package handles it. But we can have a non-mime email in quoted-printable. Simply handle it always, it's not hard.
* gometalinter: enable line length checkingDmitry Vyukov2018-05-041-1/+2
| | | | | | | 120 columns looks like a reasonable limit and requires few changes to existing code. Update #538
* pkg/email: handle emails without Content-Type headerDmitry Vyukov2018-01-241-3/+8
| | | | | git-send-email sends emails without Content-Type, let's assume it's text.
* pkg/email: don't add <> to email when name is emptyDmitry Vyukov2017-12-281-2/+6
| | | | Just unnecessary clutter.
* dashboard/app: extract fixing tags from commitsDmitry Vyukov2017-12-271-5/+9
| | | | | | | | | | | | | Support the new scheme of associating fixing commits with bugs. Now we provide a tag along the lines of: Reported-by: <syzbot+a4a91f6fc35e102@syzkaller.appspotmail.com> The tag is supposed to be added to the commit. Then we parse commit logs and extract these tags. The final part on the dashboard is not ready yet, but syz-ci should already parse and send the tags.
* pkg/email: improve parsing of splitted linesDmitry Vyukov2017-12-191-17/+44
| | | | | | | | | | Allow: full-commit-title-on-next-line This allows commit titles between 70 and 80 cols with gmail. Also be more permissive wrt spaces and tabs.
* pkg/email: ignore missing To: headerDmitry Vyukov2017-11-221-4/+2
| | | | We've got such email.
* pkg/email: unsplit arguments for test commandDmitry Vyukov2017-11-171-1/+23
|
* pkg/email: fix base64-encoded body parsingDmitry Vyukov2017-11-161-4/+4
| | | | | We currently handle base64 only for attachments, but text/plain body can also be base64-encoded.
* dashboard/app: email fixesDmitry Vyukov2017-10-311-0/+15
| | | | | | | 1. Allows sending emails upstream. 2. Filter out duplicate emails coming from our mailing lists. 3. Increase retry attempts for email commands (don't want them to fail due to concurrent crash reports from managers).
* dashboard/app: heavylifting of email reportingDmitry Vyukov2017-08-171-22/+68
| | | | | | | | | - save Message-ID and use In-Reply-To in subsequent messages - remember additional CC entries added manually - don't mail to maintainers if maintainers list is empty - improve mail formatting and add a footer - implement upstream/fix/dup/invalid commands over email - add tests
* pkg/email: fix bug in context extractionDmitry Vyukov2017-07-051-0/+6
| | | | Compare email addresses without full name.
* pkg/email: add AddAddrContext/RemoveAddrContextDmitry Vyukov2017-07-051-30/+39
| | | | Replace extractBugID function with more general AddAddrContext/RemoveAddrContext.
* pkg/email: don't add own email address to CC listDmitry Vyukov2017-07-031-8/+12
| | | | Otherwise we we send each reply to ourselves and receive it again.
* pkg/email: add function that forms reply to an emailDmitry Vyukov2017-07-021-1/+3
|
* pkg/email: add email parsing functionalityDmitry Vyukov2017-07-021-0/+183
Parse extracts all potentially interesting info from an incoming email.