#2024 new
Jeff Templon

can't figure out how to search on first From header?

Reported by Jeff Templon | June 1st, 2018 @ 12:12 PM


When I do "View->Show Raw Message" there are two From headers. The first is the very first bit of the email, and the second one is further on down. The first one is not followed by a colon, the other one is. I have some mailboxes for which there are lots of duplicates, the duplicates having the property that the "first From" (without colon) has value "???@???". I want to do a MailMate search to select such mails (and then delete them). No matter what I try, I don't manage - it seems that the "From" search in MailMate is only looking at the second From: field (with colon). How do I accomplish what I want to do?



Comments and changes to this ticket

  • benny

    benny June 1st, 2018 @ 02:19 PM

    That first from line shouldn't be there. It's not a valid header because of the lack of the colon. I believe MailMate handles it by skipping the line.

    The line probably became part of the email as part of some export/import cycle in which the so-called mbox format was involved (this is a format which allows multiple emails in a single file, but it's not a very good format).

    That's the theoretical part. You have a practical problem, but it's not straightforward how to solve it since MailMate doesn't see this line.

    MailMate has a menu item named “View ▸ Select Duplicates” which almost solves your problem. The problem is that it looks at both Message-ID (another header) and the size of the message to find duplicates. The latter won't work for your emails because of the added line.

    But I can see I have a hidden preference which might help you:

    defaults write com.freron.MailMate MmSelectDuplicatesBasedOnMessageIDOnly -bool YES

    Be careful using that though since there is a small risk that some emails do not have unique message ids. (In most cases, that is going to be spam though.)

    I hope this helps.

  • Jeff Templon

    Jeff Templon June 1st, 2018 @ 02:38 PM

    Thanks, this does indeed remove the problem I had with it not finding duplicates. Unfortunately now it finds the wrong copy as "the duplicate to be removed" in many cases - meaning, it selects the ones with the "good" From to remove, leaving the ???@??? ones in the mailbox. I realize this is not a problem for MailMate but it could be a problem for some other mail client.

    I've found a IMAP dedup python script and I may just hack it to "do the write thing" :-)

  • benny

    benny June 2nd, 2018 @ 07:07 AM

    • State changed from “new” to “closed”

    It's kind of random which one MailMate selects. If it wasn't then MailMate should probably select the largest one (making it less likely to loose data). If you cannot solve it any other way then maybe I can add a hidden preference to prioritize the smallest ones, but it's kind of a very user-specific feature :-)

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Mac OS X email client.

Shared Ticket Bins

People watching this ticket