aboutsummaryrefslogtreecommitdiffstats
path: root/worker
diff options
context:
space:
mode:
Diffstat (limited to 'worker')
-rw-r--r--worker/imap/search.go8
-rw-r--r--worker/maildir/search.go8
2 files changed, 12 insertions, 4 deletions
diff --git a/worker/imap/search.go b/worker/imap/search.go
index 939516dd..42e155b6 100644
--- a/worker/imap/search.go
+++ b/worker/imap/search.go
@@ -9,7 +9,7 @@ import (
func parseSearch(args []string) (*imap.SearchCriteria, error) {
criteria := imap.NewSearchCriteria()
- opts, optind, err := getopt.Getopts(args, "rubtH:f:")
+ opts, optind, err := getopt.Getopts(args, "rubat:H:f:c:")
if err != nil {
return nil, err
}
@@ -25,9 +25,13 @@ func parseSearch(args []string) (*imap.SearchCriteria, error) {
// TODO
case 'f':
criteria.Header.Add("From", opt.Value)
+ case 't':
+ criteria.Header.Add("To", opt.Value)
+ case 'c':
+ criteria.Header.Add("Cc", opt.Value)
case 'b':
body = true
- case 't':
+ case 'a':
text = true
}
}
diff --git a/worker/maildir/search.go b/worker/maildir/search.go
index f8130ac4..47eab6a1 100644
--- a/worker/maildir/search.go
+++ b/worker/maildir/search.go
@@ -29,7 +29,7 @@ func newSearchCriteria() *searchCriteria {
func parseSearch(args []string) (*searchCriteria, error) {
criteria := newSearchCriteria()
- opts, optind, err := getopt.Getopts(args, "rubtH:f:")
+ opts, optind, err := getopt.Getopts(args, "rubat:H:f:c:")
if err != nil {
return nil, err
}
@@ -45,9 +45,13 @@ func parseSearch(args []string) (*searchCriteria, error) {
// TODO
case 'f':
criteria.Header.Add("From", opt.Value)
+ case 't':
+ criteria.Header.Add("To", opt.Value)
+ case 'c':
+ criteria.Header.Add("Cc", opt.Value)
case 'b':
body = true
- case 't':
+ case 'a':
text = true
}
}