char *opt;
     const notmuch_show_format_t *format = &format_text;
     notmuch_show_params_t params;
+    int mbox = 0;
     int i;
 
     params.entire_thread = 0;
                params.entire_thread = 1;
            } else if (strcmp (opt, "mbox") == 0) {
                format = &format_mbox;
+               mbox = 1;
            } else if (strcmp (opt, "raw") == 0) {
                format = &format_raw;
                params.raw = 1;
        return 1;
     }
 
+    if (mbox && params.part > 0) {
+       fprintf (stderr, "Error: specifying parts is incompatible with mbox output format.\n");
+       return 1;
+    }
+
     if (*query_string == '\0') {
        fprintf (stderr, "Error: notmuch show requires at least one search term.\n");
        return 1;