summary refs log tree commit diff
path: root/imbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'imbox.c')
-rw-r--r--imbox.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/imbox.c b/imbox.c
index fff867f..e620a61 100644
--- a/imbox.c
+++ b/imbox.c
@@ -334,7 +334,13 @@ int main(int argc, char *argv[]) {
 				fprintf(imap, "%s EXAMINE \"%s\"\r\n", Atoms[Examine], mailbox);
 			}
 			break; case Examine: {
-				fprintf(imap, "%s SEARCH CHARSET UTF-8", Atoms[Search]);
+				fprintf(
+					imap,
+					"%s SEARCH CHARSET UTF-8 OR "
+					"NOT HEADER Content-Type \"\" "
+					"HEADER Content-Type \"text/plain\"",
+					Atoms[Search]
+				);
 				if (subject) fprintf(imap, " SUBJECT \"%s\"", subject);
 				if (from) fprintf(imap, " FROM \"%s\"", from);
 				if (to) fprintf(imap, " TO \"%s\"", to);