Dear All, My work email comes through an Outlook server, which scans some attachments. The process seems to be to first post an email with an "Advanced Threat Protection" message and a link to a preview of the attachment. Then, after the scan is complete, to delete that message and post a second message, with the same Message ID, and the actual attachment.
Depending on how long the scan takes, getmail might pull down both of these emails. The second duplicate is available through the emacs change index command, but the attachment is not available (since it tries to pull the first attachment from the first version, which is just an html part). I can usually solve this by deleting the first one by hand, something like: notmuch search --output=files id:<mid> | head -1 | xargs rm This has a couple of problems, though. (1) It's relying on the Maildir file name being a time stamp to get rid of the earlier file, and (2) it doesn't actually reindex the file when I run notmuch new, just treating it as a rename, so I still get the search results for the older deleted file. I guess I could do a bindings-based script that gives me a bit more confidence, dump the tags, delete the messages, reindex, and reapply the tags. But I wonder if there is some way to change the priority of duplicates so that later versions overwrite earlier versions. Alternately, could there be a way to specify which file name notmuch commands pull attachments from? This would allow me to get the attachment that is only on the second dup from the emacs interface. The other (classical) approach, I guess, would be to put an mda in there which only lets the second one through. But I'm trying to avoid /dev/null-ing emails non-interactively if I possible can. Thanks, Jesse _______________________________________________ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org