<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
<style>
div.markdown { white-space: normal; }
body { font-family: sans-serif; }
h1 { font-size: 1.4em; }
h2 { font-size: 1.2em; }
h3 { font-size: 1.1em; }
a { color: #3983C4; }
blockquote a { color: #777777; }
blockquote blockquote a { color: #999999; }
blockquote blockquote blockquote a { color: #BBBBBB; }
pre { margin-left: 15px; margin-right: 15px; padding: 5px; background-color: #F7F7F7; border-radius: 5px 5px 5px 5px; overflow-x: auto; max-width: 90vw; }
code { margin: 0; padding: 0 0.4em; border-radius: 3px; background-color: #F7F7F7; }
pre > code { padding: 0px; }
math[display="inline"] > mrow { padding:5px; }
div.footnotes li p { margin: 0.2em 0; }
</style>
</head>
<body>
<div class="markdown">
<p dir="auto"><strong>Note:</strong> This message contains a change to prioritize the List-ID where present and non-gibberish. Probably the best approach. Unless someone has feedback I'd propose this as the final version. Benny, any chance you'd consider making this the Mailing List submailbox name default format string?</p>
<p dir="auto">-Ethan Schoonover<br />
<a href="mailto:es@ethanschoonover.com">es@ethanschoonover.com</a><br />
<a href="https://ethanschoonover.com">https://ethanschoonover.com</a></p>
<h1>Better MailMate Mailing List Submailbox Naming (v3)</h1>
<h2>Quick instructions</h2>
<ol>
<li>Double click your "Mailing Lists" smart mailbox in MailMate</li>
<li>Select the "Submailboxes" tab</li>
<li>Copy the following code (this is the same as the <strong>CLEAN VERSION</strong> snipped below) and paste it into your Mailing Lists > Submailboxes > Mailbox Name Format field.</li>
</ol>
<p dir="auto">Be careful when copying: the string is long and the overflow may be clipped “off the page.”</p>
<pre><code>${list-id.description:?${list-id.description/^[a-z]*\d.*/${subject.blob:?${subject.blob:/capitalize}:${from.name:${list-id.identifier.final-level:?${list-id.identifier.final-level:/capitalize}:${from.address}}}}/}:${subject.blob:?${subject.blob:/capitalize}:${from.name:${list-id.identifier.final-level:?${list-id.identifier.final-level:/capitalize}:${from.address}}}}}
</code></pre>
<h2>Summary</h2>
<p dir="auto">This submailbox string will look for each of the following variables from the mailing list messages in turn, choosing the first that is available based on the order presented below.</p>
<p dir="auto">In the special case of the List ID, these sometimes return a gibberish (to human eyes) alphanumeric string of characters. In those cases, the List-ID is not used (technically it is used but regex replaced with the options from the remainder of the sequence below).</p>
<h3>Options for list naming, in order</h3>
<ol>
<li>List ID Description (if not all alphanumerics; if alphanumerics only, then continue with options below)</li>
<li>Subject Blob</li>
<li>From Name</li>
<li>List ID Identifier (final part)</li>
<li>From Address</li>
</ol>
<p dir="auto">Below you will find three versions of the code for this mailing list naming string. The nested version is easy to read, the "commented" version can be pasted in so you can see how your lists names are being assigned, and the "clean" version is uncommented and what you will ultimately want to use.</p>
<h2>Commented Code - Nested format (DO NOT PASTE IN, FOR REFERENCE ONLY)</h2>
<pre><code>${list-id.description:?
        [[HAS-LISTID]] ${list-id.description/^[a-z]*\d.*/
                [[BAD-LISTID]] ${subject.blob:?
                        [[HAS-SUB-BLOB]] ${subject.blob:/capitalize}:
                        [[NO-SUB-BLOB]] ${from.name:
                                [[NO-FROM-NAME]] ${list-id.identifier.final-level:?
                                        [[HAS-LISTID-FINAL]] ${list-id.identifier.final-level:/capitalize}:
                                        [[NO-LISTID-FINAL]] ${from.address}
                                }
                        }
                }
        /}:
        [[NO-LISTID]] ${subject.blob:?
                [[HAS-SUB-BLOB]] ${subject.blob:/capitalize}:
                [[NO-SUB-BLOB]] ${from.name:
                        [[NO-FROM-NAME]] ${list-id.identifier.final-level:?
                                [[HAS-LISTID-FINAL]] ${list-id.identifier.final-level:/capitalize}:
                                [[NO-LISTID-FINAL]] ${from.address}
                        }
                }
        }
}
</code></pre>
<h2>Commented</h2>
<p dir="auto">Paste this if you want to see how it works with your lists.</p>
<pre><code>${list-id.description:?[[HAS-LISTID]] ${list-id.description/^[a-z]*\d.*/[[BAD-LISTID]] ${subject.blob:?[[HAS-SUB-BLOB]] ${subject.blob:/capitalize}:[[NO-SUB-BLOB]] ${from.name:[[NO-FROM-NAME]] ${list-id.identifier.final-level:?[[HAS-LISTID-FINAL]] ${list-id.identifier.final-level:/capitalize}:[[NO-LISTID-FINAL]] ${from.address}}}}/}:[[NO-LISTID]] ${subject.blob:?[[HAS-SUB-BLOB]] ${subject.blob:/capitalize}:[[NO-SUB-BLOB]] ${from.name:[[NO-FROM-NAME]] ${list-id.identifier.final-level:?[[HAS-LISTID-FINAL]] ${list-id.identifier.final-level:/capitalize}:[[NO-LISTID-FINAL]] ${from.address}}}}}
</code></pre>
<h2>CLEAN VERSION (no comments)</h2>
<p dir="auto">Paste this in if you just want better list names and don't need to see how it's working.</p>
<pre><code>${list-id.description:?${list-id.description/^[a-z]*\d.*/${subject.blob:?${subject.blob:/capitalize}:${from.name:${list-id.identifier.final-level:?${list-id.identifier.final-level:/capitalize}:${from.address}}}}/}:${subject.blob:?${subject.blob:/capitalize}:${from.name:${list-id.identifier.final-level:?${list-id.identifier.final-level:/capitalize}:${from.address}}}}}
</code></pre>
<h2>ORIGINAL MailMate Mailing Lists Subfolder Format String</h2>
<p dir="auto">Paste this in if you want to revert to the original MailMate behavior.</p>
<pre><code>${list-id.description:${subject.blob:?${subject.blob:/capitalize}:${list-id.identifier.final-level}}}
</code></pre>

</div>
</body>
</html>