Hello, On Tue, 10 Nov 2020, Carlos E. R. wrote:
On 10/11/2020 21.00, David Haller wrote:
Hello,
On Tue, 10 Nov 2020, Carlos E. R. wrote:
On 10/11/2020 19.43, Bengt Gördén wrote:
On 2020-11-10 19:19, David Haller wrote:
Now I need one rule like this (for this list) for each of the 11 lists
I'm subscribed to:
Just one rule is needed. Add more uniq id inside () if you want. I just use this because I'm lazy.
* ^List-Id.*(opensuse)
But you can have more specific id like this:
* ^List-Id.*(users.lists.opensuse.org|opensuse-factory.lists.opensuse.org)
Something like this might work:
* ^List-Id.*((users.|opensuse-factory.)lists.opensuse.org)
And how do you sort each list into it's own folder? I.e. "users" into "opensuse" ("users" would be ok though, (sym-)linking would help), "factory" into "factory", etc...
I thought you wanted all opensuse lists in a single folder. If you want each list to go to a different folder, you need one full rule for each list.
Nope! ONE rule for _all_ 11 opensuse lists, sorting _each_ into its own folder! Has been working like a charm since the switch to mlmmj. ==== :0 H: * ^X-Mailinglist: *\/opensuse.* $MATCH ==== E.g. to make it clearer, the factory list had this header: ==== X-Mailinglist: opensuse-factory ==== ==== man 5 procmailrc ==== [..] MATCH This variable is assigned to by procmail whenever it is told to extract text from a matching regular expression. It will contain all text matching the regular expression past the `\/' token. [..] \/ Splits the expression in two parts. Everything matching the right part will be assigned to the MATCH environment vari- able. [..] ==== This means: for each list, the stuff after the \/, i.e. the list-name is put into the variable $MATCH and the _EXPANSION_ of that variable is then used as the name of the target folder. :0 H: ### egrep header * ^X-Mailinglist: *\/opensuse.* ### egrep '^X-Mailinglist: *opensuse.*' and ### put stuff after the '\/', i.e. the ### "opensuse.*" into the variable MATCH $MATCH ### now use the EXPANSION of $MATCH as ### the assigned foldername to ### sort the mail into So, with this simple single ONE 3 line rule I got: X-Mailinglist: opensuse -> folder: opensuse X-Mailinglist: opensuse-de -> folder: opensuse-de X-Mailinglist: opensuse-factory -> folder: opensuse-factory X-Mailinglist: opensuse-project -> folder: opensuse-project [..] for all opensuse-lists I am subscribed to. Now I need one rule for each and every one list/folder. I thought of writing a filter to call, but "meh!". And then you have people/software filtering on the Subject header! What's all that about anyway, the german list has never, for IIRC 23+ years, ever had a mangled subject -- until today! Now the subject is also bloated with that totally superfluous "[opensuse-de] " stuff for retarded mailfiltering software and their users. And in my typical terminal window and mutt setup, I see next to nothing of the actual subject anymore. ... .oO( words )Oo. I hope now you understand my sentiment better ... BTW: for MH format folders, you need to use "$MATCH/." instead of the plain "$MATCH" for mbox format folders... see 'man 5 procmailex'. HTH, -dnh -- "We must do something. This is something. Therefore we must do this." -- Military and Corporate Logic