aboutsummaryrefslogtreecommitdiffstats
path: root/worker/maildir/search.go
diff options
context:
space:
mode:
Diffstat (limited to 'worker/maildir/search.go')
-rw-r--r--worker/maildir/search.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/worker/maildir/search.go b/worker/maildir/search.go
index c667d48f..49cb1c6e 100644
--- a/worker/maildir/search.go
+++ b/worker/maildir/search.go
@@ -50,7 +50,13 @@ func parseSearch(args []string) (*searchCriteria, error) {
case 'X':
criteria.WithoutFlags = append(criteria.WithoutFlags, getParsedFlag(opt.Value))
case 'H':
- // TODO
+ if strings.Contains(opt.Value, ": ") {
+ HeaderValue := strings.SplitN(opt.Value, ": ", 2)
+ criteria.Header.Add(HeaderValue[0], HeaderValue[1])
+ } else {
+ log.Errorf("Header is not given properly, must be given in format `Header: Value`")
+ continue
+ }
case 'f':
criteria.Header.Add("From", opt.Value)
case 't':