[MlMt] Unique submailboxes based on regular expression

Florian Heidenreich fheidenreich at gmail.com
Thu Mar 22 04:29:11 EDT 2018


Thanks, editing the *.plist file worked without problems for me :)

I’m aware of ${subject.blob}, but I had subject lines like

„[General Name] [Category] Topic“

and was interested in creating submailboxes for „Category“. I ended 
up using

```
{
   parsers = {
     discourse-categories = {
       header = "subject";
       specifierRegex = '\[(.*?)\] \[(.*?)\] (.*)';
             specifierCaptures = {
                 1 = { specifier = "discourse-name"; };
                 2 = { specifier = "discourse-category"; };
                 3 = { specifier = "discourse-subject"; };
             };
         };
     };
}
```

Kind regards
— Florian



On 21 Mar 2018, at 22:35, lists.freron.com at nietzold.com wrote:

> i also tried the regex and it result in submailbox for each mail :(
>
> i also don’t know how to solve it. i expected that all the same 
> results are combined in sub mailboxes with the same result.
>
>
> but as a workaround i found a solution for subjects like `“[abc] 
> subject line“` where you like to group by `[abc]`
>
> this you can get when you set in
> [x] Submailbox for each unique value of: Subject > Blob
>
> Mailbox name format: ${subject.blob}
>
>
> i hope this workaround helps you without editing *.plist files
>
>
>
>
> On 9 Mar 2018, at 13:16, Florian Heidenreich wrote:
>
>> Hi,
>>
>> I’m trying to create a smart mailbox with submailboxes for each 
>> result of a regular expression on the mail subject. I’m using a 
>> regexp format string [1] for the mailbox name format which works and 
>> produces the correct names.
>>
>> However, it seems not possible to make the submailboxes unique in the 
>> sense, that mails are grouped into one submailbox if the regexp 
>> produces the same result.
>>
>> As an example, I’m using this Mailbox name format:
>>
>> `${subject.body/\[(.*?)\].*/$1/}`
>>
>> All mails where the subject starts with `[Bug Reports]` should appear 
>> in the `Bug Reports` submailbox. Instead, one `Bug Reports` 
>> submailbox is created for each mail.
>>
>> Is there a way to create unique submailboxes based on regular 
>> expressions?
>>
>> Kind regards
>> — Florian
>>
>>
>> [1] https://manual.mailmate-app.com/format_string_syntax
>> _______________________________________________
>> mailmate mailing list
>> mailmate at lists.freron.com
>> https://lists.freron.com/listinfo/mailmate


> _______________________________________________
> mailmate mailing list
> mailmate at lists.freron.com
> https://lists.freron.com/listinfo/mailmate
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freron.com/pipermail/mailmate/attachments/20180322/c6614186/attachment.html>


More information about the mailmate mailing list