On 12 Feb 2021, at 01:41, Chris Green <c...@isbd.net> wrote:
> On Thu, Feb 11, 2021 at 11:09:06PM -0700, Bob Proulx wrote:
>> Bryan L. Gay wrote:
>>> I'm seeing some mailing list messages with to:
>>> postfix-us...@cloud9.net in the header. I had to update my filters to
>>> get them sorted into my postfix mailing list folder.
>> 
>> If one is filtering mail selecting for mail through a mailing list
>> then one should not use the To: or Cc: for that filtering.  The best
>> and expected header to use is the List-Id: header.  That's the
>> standard mailing list header.  See RFC2929.
>> 
>>    RFC 2929 https://tools.ietf.org/html/rfc2919
>> 
>> All mail through this mailing list sets this header.
>> 
>>    List-Id: Postfix users <postfix-users@postfix.org>

> Yes, that's all very well, but not all mailing lists are so well
> behaved

Most are. The drawback is that some marketing emails pretend to be mailing list 
messages as well. mcsv.net is one popular mailer that does this.

> so a general mailing list filter can't rely on this. One would
> have to base the filter on a combination of things.

I think I have three rules in Sieve that catch all list mail, but nearly all is 
caught by the first that checked List-ID.

Ah, nope, I see I trimmed back to just the single list-id rule.

if header :regex "list-id" "^\\s*<?([a-z_0-9-]+)[.@]" {
   set :lower "listname" "${1}";
   fileinto :create "${listname}";
}

(I do have some custom rules for some lists to rewrite the reply-to header, or 
to group related lists into a single folder


-- 
It's the terror of knowing what this world is about
Watching some good friends screaming let me out
Gets me higher pressure on people, people on the streets

Reply via email to