aboutsummaryrefslogtreecommitdiffstats
path: root/worker/imap/search.go
diff options
context:
space:
mode:
Diffstat (limited to 'worker/imap/search.go')
-rw-r--r--worker/imap/search.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/worker/imap/search.go b/worker/imap/search.go
index ba7b9174..77a18990 100644
--- a/worker/imap/search.go
+++ b/worker/imap/search.go
@@ -38,7 +38,13 @@ func parseSearch(args []string) (*imap.SearchCriteria, error) {
criteria.WithoutFlags = append(criteria.WithoutFlags, f)
}
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':