+ from = notmuch_message_get_header (message, "from");
+ subject = notmuch_message_get_header (message, "subject");
+ to = notmuch_message_get_header (message, "to");
+
+ if (from == NULL &&
+ subject == NULL &&
+ to == NULL)
+ {
+ notmuch_message_close (message);
+ return NOTMUCH_STATUS_FILE_NOT_EMAIL;
+ } else {
+ db->add_document (doc);
+ }