Hi again
Â
But then again, it's not a general issue to have emojis in the names of
subfolders.
I've got this rule:if anyof (address :regex :comparator "i;octet" "from"
".*@(company\\.com|skwar\\.me|5y5\\.one)$") { fileinto "INBOX/🫥 Privat";}
And it filed mails with “<something>@skwar.me” just fine to "INBOX/🫥 Privat",
ie. to the subfolder “🫥 Privat” which is under “INBOX”.
What's up with that?
Â
Best regards,
Â
Â
Alexander
--Â
Complete contact details at https://a.skwar.xyz/
Â
On Monday, 31. March 2025 06:58 CEST, "Alexander Skwar" <[email protected]> wrote:
Â
Hi
Yes, the sieve server understands and can cope with emojis. Certain non-emoji
chars, like “&” (ampersand) cause issues on the IMAP side. Due to this, SOGo
(or whatever…) fails to create a folder named “MLs & Foren”. I've renamed this
to “MLs + Foren” now, which is good enough for me.
Emojis per se are not causing issues. The folder is actually not simply called
“MLs + Foren” but rather “🗣 MLs + Foren”. Mails from this mailinglist
([email protected]) get filed properly, thanks to this filter:require
["fileinto","imap4flags","regex"];if anyof (header :contains "List-Id"
"users.sogo.nu") { fileinto "đź—Ł MLs + Foren";}Â
BUT…
I've now created a new folder simply named “Draussen” (the “original” folder is
named “🏔🚴 Draussen”) as a subfolder of “Social Networks”.
The rule looks like this:require ["fileinto","imap4flags","regex"];if anyof
(address :regex :comparator "i;octet" "from"
".*@(bergportal\\.ch|freezetag\\.com|garmin\\.com|geocaching\\.com|komoot\\.de|munzee\\.com|quaeldich\\.de|spontacts\\.com|squadrats\\.com|strava\\.com|update\\.strava\\.com|velocity\\.ch|wandrer\\.earth)$",
address :regex :comparator "i;octet" ["to", "cc"]
"hiking-buddies@acc\\.alexs77\\.rodeo|carving\\.fleshed313@alexs77\\.foobar\\.vip|com\\+wandrer\\.earth@skwar\\.me|squadrats\\.com@acc\\.alexs77\\.rodeo",
address :contains "from" "[email protected]") { fileinto "Social
Networks/Draussen";}
I've got one email from [email protected] and that got properly filed away.
Are there logs somewhere?Â
Is it maybe the fact, that it is a subfolder?
That's getting annoying, got to say…
………… Let it run over the weekend, and, yes, something's not working with
subfolders. I created “🏔🚴 Draussen” as a “main folder” and filtering with this
rule worked fine:
 if anyof (address :regex :comparator "i;octet" "from"
".*@(bergportal\\.ch|freezetag\\.com|garmin\\.com|geocaching\\.com|komoot\\.de|munzee\\.com|quaeldich\\.de|spontacts\\.com|squadrats\\.com|strava\\.com|update\\.strava\\.com|velocity\\.ch|wandrer\\.earth)$")
{ fileinto "🏔🚴 Draussen";}
Â
I wonder — which part on the server side is so very fragile? The matching
works, so, that's not it. Is it sieve? Is it the storage? Which part breaks due
to emojis?Â
As asked before — are there logs? If so, where?
Stopping to use emojis is not a solution. Not using subfolders is also not a
solution.
Cheers,Â
Â
Alexander
--Â
Complete contact details at https://a.skwar.xyz/
Â
On Friday, 28. March 2025 11:08 CET, "qhivert" ([email protected])
<[email protected]> wrote:
Â
Hello,
With my test where it works, I have:
Â
require ["regex","fileinto"];
if anyof (address :regex :comparator "i;octet" "from"
.*@(bergportal\\.ch|example\\.org|garmin\\.com|geocaching\\.com|komoot\\.de|munzee\\.com|quaeldich\\.de|spontacts\\.com|squadrats\\.com|strava\\.com|update\\.strava\\.com|velocity\\.ch|wandrer\\.earth)$)
{
   fileinto "Trash";
}
Â
Notice I just change freezetag\.com to example\.org in my filter.
The double dash is not an error and expected.
But I’m wondering if your sieve server can understand emojis. Could you try
with a folder that only has characters?
You said it works with this:
* From, matches re, .*@(company\.com|name1\.me|name2\.one)$
Could you do this one again and compare the sieve script?
Quentin
Â
From: [email protected] <[email protected]> On Behalf Of "Alexander
Skwar"
Sent: jeudi 27 mars 2025 17:49
To: [email protected]
Subject: [SOGo] [SPAM] Re: [SPAM] RE: [SPAM] Regexp filter does not match
Â
Hello
Did my message from yesterday at about 21:00 not make it through? Really
curious, because somehow the message coming back always have the “[SPAM]”
“flag” in the subject…
Here it was:
--------
Okay, I finally found the sieve file. And the filters, they are broken. No
wonder it's not working.
Â
>From the file:
Â
if anyof (address :regex :comparator "i;octet" "from"
“.*@(bergportal\\.ch|freezetag\\.com|garmin\\.com|geocaching\\.com|komoot\\.de|munzee\\.com|quaeldich\\.de|spontacts\\.com|squadrats\\.com|strava\\.com|update\\.strava\\.com|velocity\\.ch|wandrer\\.earth)$”)
{
  fileinto "Social Networks/🏔🚴 Draussen";
}
Â
That's verbatim how it looks like and that's of course wrong. Why in the world
would it escape the “\”? It must be left alone.
In the UI, I entered:
.*@(bergportal\.ch|freezetag\.com|garmin\.com|geocaching\.com|komoot\.de|munzee\.com|quaeldich\.de|spontacts\.com|squadrats\.com|strava\.com|update\.strava\.com|velocity\.ch|wandrer\.earth)$
Â
For the last entry, it means: “wandrer” followed by EXACTLY the char “.”
followed by “earth”.
Now, with whatever SOGo did, it came out as: wandrer\\.earth
That's “wandrer” followed by “\.” (backslash dot) followed by “earth”.
That's broken.
No wonder it's not working.
I'm using mailcow 2025-03 and SOGo that comes with it (v5.11.2).
Now, I could of course write in the filter condition:
…|wandrer.earth)$
That WOULD be left alone, but that's wrong. It would mean “wandrer” followed by
any char followed by “earth”.
Â
----------
--Â
Â
Â
Alexander
--Â
Complete contact details at https://a.skwar.xyz/
Â
On Thursday, 27. March 2025 14:13 CET, "Christian Mack"
([email protected]) <[email protected]> wrote:
Â
Hello
Disclaimer: I don't know mailcow.
Am 25.03.25 um 22:48 schrieb "Alexander Skwar" ([email protected]):
> Hi
>Â
> Thanks a lot for confirming that it should work.
>Â
> Can you please tell me how I would get the created filter?
>Â
You can get the generated sieve rules from your postbox server viaÂ
managesieve, or if you use dovecot from the users sieve folder.
> And while we're at it — is there a way to create more filters at once, without
> having to use the UI? As mentioned, I'm migrating from Gmail and would "need"
> to
> create a bunch of filters. Not having to resort to the UI would be useful.
>Â
As an admin you can use sogo-tool for changing sieve rules from theÂ
command line of the SOGo server.
You can get the current sieve rules with:
# /usr/sbin/sogo-tool user-preferences get defaultsÂ
${USER_WITH_SIEVE_FILTERS} SOGoSieveFilters
You can set new/changed sieve rules with:
# /usr/sbin/sogo-tool user-preferences set defaultsÂ
${USER_WITH_SIEVE_FILTERS} -p /etc/sogo/sieve.creds SOGoSieveFiltersÂ
'{"SOGoSieveFilters":[{"actions":[{"argument": "Spam-Folder","method":Â
"fileinto"},{"argument": "<null>","method": "stop"}],"name":Â
"Filter-SPAM-into-other-folder","rules": [{"field": "header","operator":Â
"is","custom_header": "X-Spam","value": "YES"}],"match": "any","active":Â
1}]}'
Beware, you have always to provide all Filters in that Json, as only theÂ
ones provided will be set.
Kind regards,
Christian Mack
> Am 25.03.2025 17:01 schrieb qhivert <[email protected]>:
>Â
> Hello,
>Â
> I’ve just tested your first filter with all the conditions and this work well.
>Â
> To be sure, can you get the sieve script generated by sogo? And see if what’s
> in
> there match your filter.
>Â
> Quentin
>Â
> *From:*[email protected] <[email protected]> *On Behalf Of *"Alexander
> Skwar"
> *Sent:* mardi 25 mars 2025 16:27
> *To:* [email protected]
> *Subject:* [SOGo] [SPAM] Regexp filter does not match
>Â
> Hello
>Â
> Currently trying to move from Gmail to maicow + SOGo. One of the issues I
> encounter is the filtering in mailcow/SOGo.
>Â
> I've got the following filter:
>Â
> * Match any of the following rules
> o From, matches regex, .*@(bergportal\.ch|freezetag\.com|garmin\.com|
> geocaching\.com|komoot\.de|munzee\.com|quaeldich\.de|spontacts\.com|
> squadrats\.com|strava\.com|update\.strava\.com|velocity\.ch|
> wandrer\.earth)$ <mailto:.*@(bergportal\.ch|freezetag\.com|garmin\.com|
> geocaching\.com|komoot\.de|munzee\.com|quaeldich\.de|spontacts\.com|
> squadrats\.com|strava\.com|update\.strava\.com|velocity\.ch|
> wandrer\.earth)$>
> o To or Cc, matches regex, hiking-buddies@dom1\.rodeo|
> carving\.fleshed313@dom2\.vip|com\+wandrer\[email protected]|
> squadrats\.com@dom1\.rodeo <mailto:hiking-buddies@dom1\.rodeo|
> carving\.fleshed313@dom2\.vip|com\+wandrer\[email protected]|
> squadrats\.com@dom1\.rodeo>
> o From, contains, [email protected]
> <mailto:[email protected]>
> * Actions
> o File the message in, 🏔🚴Draussen
>Â
> However, it does not work. But why? Are there logs somewhere?
>Â
> It should match - I'm looking for “From” “matches” "…freezetag\.com
>Â
> $ grep -i freezetag\.com ~/tmp/message-headers-freezetag.txt
> dkim=pass header.d=freezetag.com header.s=k3 header.b=PLkik2a8;
> dmarc=pass (policy=none) header.from=freezetag.com
> dkim=pass header.d=freezetag.com header.s=k3 header.b=PLkik2a8;
> dmarc=pass (policy=none) header.from=freezetag.com
> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freezetag.com; s=k3;
> t=1742915017; x=1743185017; [email protected]
> <mailto:[email protected]>;
> From: Munzee Gardening Club <[email protected] <mailto:[email protected]>>
> Reply-To: =?utf-8?Q?Munzee=20Gardening=20Club?= <[email protected]
> <mailto:[email protected]>>
> FORGED_SENDER(0.30)[[email protected],bounce-mc.us10_38846137.13528275-
> [email protected]];
> R_DKIM_ALLOW(0.00)[freezetag.com:s=k3];
> DMARC_POLICY_ALLOW(0.00)[freezetag.com,none];
> FROM_NEQ_ENVFROM(0.00)[[email protected],bounce-
> [email protected]];
> HAS_REPLYTO(0.00)[[email protected]];
> DKIM_TRACE(0.00)[freezetag.com:+];
>Â
> I'll attach the complete headers.
>Â
> Any ideas about why it does not work? How can I test this?
>Â
> I would have thought it might be, because I'm doing “.*@freezetag.com$
> <mailto:.*@freezetag.com$>”, ie. freezetag.com must be at the end of the line.
> But in the “From:” line, there's the “>” after “freezetag.com”.
>Â
> BUT… I've got a different filter with this rule:
>Â
> * From, matches re, .*@(company\.com|name1\.me|name2\.one)$
> <mailto:.*@(company\.com|name1\.me|name2\.one)$>
>Â
> And this DOES work. It matched an email with this from line in the headers:
>Â
> From: Alexander Skwar <[email protected] <mailto:[email protected]>>
>Â
> There was also a “>” at the end (which there will almost always be; at least
> if there's a “real name” and if it's not using the outdated syntax of
> “[email protected] <[email protected]> (real name)”).
>Â
> Help would be immensely appreciated for getting filters with regexps to work.
>Â
> Thanks a lot,
>Â
> Alexander
>Â
> --Â
> Complete contact details at https://a.skwar.xyz/ <https://a.skwar.xyz/>
>Â
--Â
Christian Mack
Universität Konstanz
Kommunikations-, Informations-, Medienzentrum (KIM)
Abteilung IT-Dienste Forschung, Lehre, Infrastruktur
78457 Konstanz
+49 7531 88-4416
Â