Sieve by the addressee

@lbutlr kremels at kreme.com
Sun Feb 21 05:35:08 EET 2021



> On 20 Feb 2021, at 11:02, Shawn Heisey <elyograg at elyograg.org> wrote:
> 
> On 2/20/2021 8:50 AM, Markus Schönhaber wrote:
>> I consider it a better idea to filter mailing list messages by their
>> List-ID header.
> 
> I agree with Markus.  It's what I do.  This works well:
> 
> if header :regex "list-id" "solr-user.lucene.apache.org"
> {
>        fileinto "asf.solr-user";
>        stop;
> }

    if header :regex "list-id" "<([a-z_0-9-]+)[.@]" {
        set :lower "listname" "${1}";
        addheader "X-Listname" "${listname}";
        fileinto :create "${listname}";
        stop; }

> I do not know if List-ID is common to all mailing list software, but even if it's not, there should be something available in the message headers that you can use.

It is not universal, but it is nearly so. There are still some old lists running old software that do not support I, but they are few enough that I no longer have rules to catch those lists.

-- 
A bad day using a Mac is better than a good day using Windows



More information about the dovecot mailing list