Re: sieve question
Masaru Nomiya <[email protected]> Fri, 03 Jul 2026 20:35:41 +0900
| Newsgroups | gmane.linux.suse.general |
|---|---|
| Message-ID | <[email protected]> |
Hello, In the Message; Subject : Re: sieve question Message-ID : <[email protected]> Date & Time: Fri, 03 Jul 2026 19:37:28 +0900 [MN] == Masaru Nomiya <[email protected]> has written: MN> Hello, MN> In the Message; MN> Subject : Re: sieve question MN> Message-ID : <[email protected]> MN> Date & Time: Fri, 03 Jul 2026 11:07:41 +0200 MN> [mh] == [email protected] has written: mh> On Freitag, 3. Juli 2026 04:08:47 Mitteleuropäische Sommerzeit Masaru Nomiya wrote: mh> > Hello, mh> > mh> > In the Message; mh> > mh> > Subject : sieve question mh> > Message-ID : <[email protected]> mh> > Date & Time: Thu, 02 Jul 2026 20:40:33 +0200 mh> > mh> > [mh] == [email protected] has written: MN> [...] mh> >> It always gets to the else branch, when I get a mail from the bug mh> >> list. mh> >> If I copy the Subject line from the file in my dovecot maildir mh> >> and send a mail manually with this subject it works as expected - mh> >> the mail will be filed into bugs-vul. MN>> How about this? MN>> header :regex "Subject" "\\s+VUL\-[0-9]:\\s+" MN> | MN> Y MN>> header :regex "Subject" "VUL\-[0-9]:\\s+" mh> thx, but this also doesn't work, MN>> In short, don't emails from ML start without a space? mh> The subject line looks like that: mh> "Subject: [Bug 1270051] VUL-0: chromium: security fixes in 150.0.7871.46" mh> I can check my regex against that string using perl, python, mh> ... - it always succeeds, but not within my sieve script. MN> Ah, I see. MN> The [] symbol needs to be escaped. MN> How does this? MN> header :regex "Subject" "\\[[^]]*\\]\\s*VUL-[0-9]+:" MN> But as a safe and reliable method, I'd recommend doing it this way, MN> wouldn't you? MN> if anyof( MN> header :contains "Subject" "VUL-", MN> header :contains "Subject" "VUL.0" MN> ) { MN> fileinto :create "Mailarchiv/nach Themen/Computer & Elektronik - System - linux - opensuse - bugs-vul"; MN> } else { MN> fileinto :create "Mailarchiv/nach Themen/Computer & Elektronik - System - linux - opensuse - bugs"; MN> } FYI. I strongly recommend that you do not use the "Subject" field when filing emails. In the past, it was standard practice for the Subject of emails sent from mailing lists to include the mailing list name. For example, for this mailing list, [SLE] was placed at the beginning of the Subject field. However, this practice was discontinued as a spam countermeasure. In other words, if [SLE] appears at the beginning of the Subject field, recipients assume the email is from the mailing list and open it. Therefore, I recommend using more reliable fields in the email headers. I use procmail for 1). virus scanning, 2). spam filtering, and 3). email filing of incoming messages, and my configuration looks like this; :0 H * 9876543210^0 ^Return-Path:.*[email protected] * 9876543210^0 ^To:.*[email protected] * 9876543210^0 ^From:.*OPENSUSE-UPDATES * 9876543210^0 ^List-Id:.*updates.lists.opensuse.org mh/Linux/suse-updates/. Best Regards & Good Night. -- ┏━━┓彡 Masaru Nomiya mail-to: nomiya @ ab.auone-net.jp ┃\/彡 ┗━━┛ "To hire for skills, firms will need to implement robust and intentional changes in their hiring practices — and change is hard." -- Employers don’t practice what they preach on skills-based hiring --