Hi guys,
I need guidance about filters / rules for incoming mail, failing which, volunteers to help produce such guidelines.
For background, I have been using Outlook for Mac as primary email client and apart from one actual exchange account (hosted on Microsoft 365) all my MiaB hosted accounts are defined as IMAP accounts on Outlook for Mac. Since I have a whole lot of inbox rules defined, which isn’t supported on the “new” Outlook for Mac I have been using Classic Outlook for Mac exclusively. Microsoft is threatening to discontinue the classic version (at least on Windows there’s a date set but the Mac version is likely to follow suit) yet they refuse to even put rule support for IMAP on the roadmap for the new Outlook for Mac.
As I looked a little deeper into the situation with filters and rules on the server and in the IMAP domain I found that there seems to be a huge amont of movement in RFCs and implementations happening in that space which could explain why Microsoft might be worried that some of the IMAP filter support might outshine their native features and they’re not controlling things on the IMAP side as they’re used to. While that might explain their resistance, it does not help me much.
My objective is relatively clear and simple - to migrate my ruleset and its management away from Outlook and into whatever is natively involved in such rules within the suite of services comprising MiaB, presumably Dovecot and Roundcube in this case.
That said, I don’t and never have run dovecot directly as a user. I think it got involved a few times in migrating mailboxes as administrator, but I cannot even confirm or whether it actually is an email client or what it looks like when you’re using it as one. My email client, if not Outlook, had been webmail, i.e. Roundcube. My reading about rules though had made me aware that the sieve-filter domain belongs to Dovecot, not RoundCube and that a big chunk of the conversation is about managing rules via IMAP. Is the interface between Roundube and Dovecot IMAP based or via some internal API/file access? While I couldn’t tell yet, what I did notice is that on the RoundCube interface under settingsfilters the defined filters appear to be in a set called roundcube, suggesting that roundcube only manages its own subset of the rules that apply to a mailbox. IDK, it’s a little confusing.
Nevertheless, I made a valiant effort to take on of my mailboxes and manually convert them as best I could into what theRoundCube web mail interface allows me to define. There isn’t an axact 1:1 mapping between what rules can do in Outlook to what rules can talk about in sieve-filter/Dovecot/Roundcube. For starters, Outlook has a flag that says if this rule applied to an email then don’t run any other rules on the same email. I had used that feature to create a set of rules to classify my postgres mailing list traffic into folders so that only the email threads I start or got involved in personally say in the Inbox while the rest go into one of three folders - General (corresponding to the mailing list pgsql-general, Hackers (group pgsql-hackers) and Other (all the other mailing lists).
Now, I got it almost work with the following set of rules (as displayed when selecting Edit rule-set on RoundCube):
require ["fileinto","imap4flags"];
# rule:[PGSQL-Hackers]
if allof (header :contains "to" "pgsql-hackers")
{
fileinto "INBOX.Hackers";
setflag "\\Seen";
}
# rule:[PGSQL-General]
if allof (header :contains "to" "pgsql-general")
{
fileinto "INBOX.General";
setflag "\\Seen";
}
# rule:[My PGSQL List Traffic]
if allof (header :contains "to" "postgres@mydomain.tld")
{
setflag "\\Flagged";
}
# rule:[PGSQL-Others]
if allof (not header :contains "to" "postgres@mydomain.tld")
{
fileinto "INBOX.Other";
setflag "\\Seen";
}
First question is, where do these definitions actually end up on disk, what needs to / could be done to ensure what’s defined as such in in effect (reload, restart, reboot?) and how would one go about applying/re-applying one or all the rules agains the contents of a folder or inbox as allowed for in the (Classic) Outook user interface?
I haven’t made test posts to the list yet to verify my own posts ending staying in the inbox flagged for attention, because the result I see already doesn’t match my expectations or what I believe the rule definitions to mean. The rules as shown end up moving new emails to their designated subfolders but they’re not gettin gmarked as read (//Seen) at all. The General subfolder might be the exception but traffic is slow on that channel and I didn’t keep accurate enough track of exactly when I switched to the new rule to know if the latest emails in that subfolder arrived before or after the switch. If they arrived after, they somehow got marked as read as intended while the others didn’t.
My point is this. Whatever motivates each of us, whether it’s contending with Microsoft’s nonsense or merely being able to assist ourselves and the users whose mailboxes we host in MiaB, I would argue that it ought to be well worth our collective effort to get to grips with how to correctly and effectively define and manage inbox rules and filters to run on the server rather than the client.
This would unltimately in my opinion also extend to handling spam filtering. We can talk more about that later on, but in brief it comes down to a difference in approach between how Ooutlook and Dovecot identifiy mail you’ve previously marked as spam. Outlook keeps a blacklist on the client itself and Dovecot appears to regard the content of the spam folder as the blacklist.
Obviously everyone will have their own views on what suits them best, but I am of opinion that it’s up to us as community to help each other understand the facilities offered by the collection of tools we know as MailInABox well enough to know how we and our users would need to go about properly using and controlling things like inbox filtering, rules and spam detection.
If any of you good folk have a working knowledge of dovecot’s sieve-filter and/or how roundcube drives it, please raise your hands. Anyone willing to help me tackle this domain, get a solid grip on how it works, what the pitfalls and the pillars of it are, with a view to ultimately to publish some sort of guideline for others, step forward as well please. I’ll coordinate and provide overview as needed but I cannot afford the time to do it all on my own.