Hi,
I've just gotten around to using sieve with Dovecot, and trying to work out how scripts should be written has been a bit of a headache. There doesn't seem to be coherent documentation, just various people's cobbled together notes. So I'm wondering if anybody can see anything glaringly wrong, or missing, that I haven't noticed in this script. It seems to be working, but I don't know if that's by accident, or I've done it right.
require ["fileinto"];
##### mail test 1 ##### #if header :contains "subject" "mailtest" #{ # fileinto "tests"; # stop; #}
##### Fedora list ##### if header :contains "List-Id" "users.lists.fedoraproject.org" { fileinto "lists.Fedora 2021"; stop; }
###### Fedora 32 updates ##### if allof ( header :contains "List-Id" "package-announce.lists.fedoraproject.org", header :contains "subject" "Fedora 32 update" ) { fileinto "announcements.Fedora 32"; stop; }
##### Fedora 33 updates ##### if allof ( header :contains "List-Id" "package-announce.lists.fedoraproject.org", header :contains "subject" "Fedora 33 update" ) { fileinto "announcements.Fedora 33"; stop; }
On 4/26/21 1:43 PM, Tim via users wrote:
I've just gotten around to using sieve with Dovecot, and trying to work out how scripts should be written has been a bit of a headache. There doesn't seem to be coherent documentation, just various people's cobbled together notes. So I'm wondering if anybody can see anything glaringly wrong, or missing, that I haven't noticed in this script. It seems to be working, but I don't know if that's by accident, or I've done it right.
It looks fine. Did you have any specific concern?
As a side note, I use Thunderbird and there's a nice extension for connecting to the server to manage and edit the sieve scripts. You can edit them as text or in a kind of graphical drag&drop programming interface.
On Tue, 27 Apr 2021 06:13:48 +0930 Tim via users wrote:
There doesn't seem to be coherent documentation
There is an RFC for sieve: https://tools.ietf.org/html/rfc5228 (or maybe there is a newer one than that these days, I see "updated by" links at the top.)
On Mon, 26 Apr 2021 13:51:29 -0700 Samuel Sieb wrote:
As a side note, I use Thunderbird and there's a nice extension for connecting to the server to manage and edit the sieve scripts. You can edit them as text or in a kind of graphical drag&drop programming interface.
Supposedly, there is also a web interface for that (but I've never tried it, I just edit the scripts in emacs when I want to make a change).
On Mon, 2021-04-26 at 13:51 -0700, Samuel Sieb wrote:
It looks fine. Did you have any specific concern?
One thing I couldn't find was how you supposed to write up a long list of different rules, like how I've got a rule for this list, another rule for that. If I simply list one clause after another, as I've done; or if I was supposed to do if, else, else, else, statements.
As a side note, I use Thunderbird and there's a nice extension for connecting to the server to manage and edit the sieve scripts. You can edit them as text or in a kind of graphical drag&drop programming interface.
I use Evolution. Somewhere I saw a comment about Evolution supporting it, elsewhere that was denied.
I don't really mind that I set the rules totally outside of the mail client. I would have thought that someone might have written a standalone editor.
I still have some rules that I run from the mail client, because it can do other things. e.g. Highlight special messages with colours, filter messages that I've already read leaving unread messages in the inbox.
On Tue, 2021-04-27 at 12:54 +0930, Tim via users wrote:
On Mon, 2021-04-26 at 13:51 -0700, Samuel Sieb wrote:
It looks fine. Did you have any specific concern?
One thing I couldn't find was how you supposed to write up a long list of different rules, like how I've got a rule for this list, another rule for that. If I simply list one clause after another, as I've done; or if I was supposed to do if, else, else, else, statements.
As a side note, I use Thunderbird and there's a nice extension for connecting to the server to manage and edit the sieve scripts. You can edit them as text or in a kind of graphical drag&drop programming interface.
I use Evolution. Somewhere I saw a comment about Evolution supporting it, elsewhere that was denied.
Maybe ask on the Evolution list? That will get you the real answer (the devs are very responsive).
poc
On Tue, 2021-04-27 at 12:19 +0100, Patrick O'Callaghan wrote:
Maybe ask on the Evolution list? That will get you the real answer (the devs are very responsive).
Well, so far it seems to be working. I was mostly trying to avoid it unexpectedly blowing up in the future. Being able to configure it from an email program would have been a bonus. But being able to configure one dovecot server's sieve filters from various different mail clients might have been tempting fate a bit much.
So far I've got dovecot and sieve to filter mail from various different things into the wanted mail folders. And I've managed to get it to rewrite the useless subject lines from a security device which gives every different alert the same subject line, and only puts useful information in the message body (now the subject lines are easily scannable by a human).
I do wish that either I could get it to add a content disposition notice in the MIME parts to display JPEGs inline (there's some body rewriting ability, but my head's spinning from all the reading), or change Evolution so that I didn't have to click on every email then click to expand every hidden image, to see what's in them.
On Tue, 2021-04-27 at 22:49 +0930, Tim via users wrote:
I do wish that either I could get it to add a content disposition notice in the MIME parts to display JPEGs inline (there's some body rewriting ability, but my head's spinning from all the reading), or change Evolution so that I didn't have to click on every email then click to expand every hidden image, to see what's in them.
From the Help:
You can download images from emails sent by your contacts. To do this, go to Edit ▸ Preferences ▸ Mail Preferences ▸ HTML Messages ▸ Loading Images. Enable the Load images only in messages from contacts option.
However I'm not sure that will do what you want (I don't have HTML enabled by default).
poc
On Tue, 2021-04-27 at 15:16 +0100, Patrick O'Callaghan wrote:
From the Help:
You can download images from emails sent by your contacts. To do this, go to Edit ▸ Preferences ▸ Mail Preferences ▸ HTML Messages ▸ Loading Images. Enable the Load images only in messages from contacts option.
However I'm not sure that will do what you want (I don't have HTML enabled by default).
No, different application. And they're not HTML emails, and they've attached the files in a simple manner to plain text posts that Evolution won't show them without you doing something.
Imagine you have a device that takes a photo whenever it detects movement, and emails it to you. You receive a plethora of emails, with masses of false positives, and you have to step through each one to see each image. But, wait, it's not that easy. You also have to click in each email to see the picture.
I had considered batch stripping all the JPEGs from all the emails (they, at least, have unique filenames). But Evolution doesn't want to let me select a bunch of emails and download all attachments in one go. I'd have to parse the emails externally.
On Wed, 2021-04-28 at 00:41 +0930, Tim via users wrote:
On Tue, 2021-04-27 at 15:16 +0100, Patrick O'Callaghan wrote:
From the Help:
You can download images from emails sent by your contacts. To do this, go to Edit ▸ Preferences ▸ Mail Preferences ▸ HTML Messages ▸ Loading Images. Enable the Load images only in messages from contacts option.
However I'm not sure that will do what you want (I don't have HTML enabled by default).
No, different application. And they're not HTML emails, and they've attached the files in a simple manner to plain text posts that Evolution won't show them without you doing something.
Imagine you have a device that takes a photo whenever it detects movement, and emails it to you. You receive a plethora of emails, with masses of false positives, and you have to step through each one to see each image. But, wait, it's not that easy. You also have to click in each email to see the picture.
I had considered batch stripping all the JPEGs from all the emails (they, at least, have unique filenames). But Evolution doesn't want to let me select a bunch of emails and download all attachments in one go. I'd have to parse the emails externally.
Feel free to file a Request For Enhancement, but would still make sense to ask on the Evo list. There may be a workaround I'm not aware of and you would get some feedback.
poc