leahneukirchen / mblaze

Unix utilities to deal with Maildir
Other
441 stars 48 forks source link

mpick: filter by CC #186

Closed paper42 closed 3 years ago

paper42 commented 3 years ago

Is this possible? I have a mailing list where sometimes people add the ML to CC, so it doesn't get filtered when I use to =~ "@xxxxxxxx.com".

Seirdy commented 3 years ago

Putting together a tiny patch.

Duncaen commented 3 years ago

You can already use strings to match any header, the keywords were added at first and are kept for backwards compatibility.

Duncaen commented 3 years ago

"cc" =~ "foo" already works and as far as I understand this issue is about extending the to keyword to not only match the to header, but also the cc header.

Seirdy commented 3 years ago

On Fri Nov 6, 2020 at 12:25 PM PST, Duncan Overbruck wrote:

"cc" =~ "foo" already works

Ah, I didn't know that. Guess https://github.com/leahneukirchen/mblaze/pull/192 isn't needed anymore; feel free to close it if it's not necessary.

paper42 commented 3 years ago

as far as I understand this issue is about extending the to keyword to not only match the to header, but also the cc header.

I will try to phrase my issues more clearly next time. I do not think the "to" keyword should match "To" and "CC" headers, that would be confusing.

I think "cc" ~= ... is enough. I didn't know about it, but now, reading the manpage I noticed this line:

<hdrprop>  ::= from | to | subject | <str>

previously I didn't pay much attention to <str> when I saw From, To and Subject there. I guess there is a deeper reason why these headers are separate from any other header on this line, but it's a bit confusing.