|
FastMail Forum All posts relating to FastMail.FM should go here: suggestions, comments, requests for help, complaints, technical issues etc. |
|
Thread Tools |
20 Jan 2022, 11:34 PM | #1 |
Member
Join Date: Jan 2009
Posts: 54
|
Sieve code for flagging all sent mail from a particular sending identity?
Hello. Would you kind readers please give advice?
I have a particular sending identity. For this sending identity I want to automate two things: (a) the filing of sent mail; and (b) the flagging of sent mail. Fastmail 'sending identities' interface allows for specifying a 'sent mail' folder. But what about instructions for flagging? I'm familiar with Sieve but not with the ordered arrangement of several different blocks that Fastmail now requires. I go to Settings > Filters & Rules > Edit custom Sieve code. I see the non-editable '1. Sieve generated for save-on SMTP identities' section. Just underneath, I see the user-editable '(Insert Sieve code here)' block... Then I see the non-editable '4. User configured rules' block. And just underneath I see the second user-editable block, which is where I copy/paste my big Sieve script. In which of those two user-editable blocks (the first one, which I don't currently use? Or the second one, which I do currently use?) can I add-in an `addflag ["\\Flagged"]` directive so that all mails sent from a particular identity get flagged at the time of sending? Thanks in advance! |
21 Jan 2022, 12:27 AM | #2 |
Essential Contributor
Join Date: Dec 2017
Location: Scotland
Posts: 490
|
As far as I know Sieve is /only/ used to process incoming mails, so it won't be possible to write any sieve code to do anything at all when mails are being sent.
Why do you need to flag an outgoing mail, if you're saving it in a specific sent-mail folder? |
21 Jan 2022, 12:33 AM | #3 |
The "e" in e-mail
Join Date: May 2003
Location: mostly in Thailand
Posts: 3,095
|
The first thing to understand is that Fastmail only supports sieve scripts to be applied at the time of email delivery. Sieve scripts on outgoing mail, for instance, is not supported.
As far as incoming mail is concerned, the sieve support is pretty comprehensive. However, it is recommended to minimise custom sieve using the Rules interface as far as possible. This insulates you against rearrangement of the overall script's structure by Fastmail over time. Sometimes, if you really want to take some action at the same time as you send messages, you can arrange to trigger your sieve script by using a bcc. For example, you can include a bcc to Bank+JustSent@yourFastmailAlias.com, and generate appropriate actions accordingly. |
21 Jan 2022, 07:59 AM | #4 | |
Essential Contributor
Join Date: May 2018
Posts: 478
|
Quote:
There's only three user edit sections. An "initialization" (for lack of a better term) section, the section before the UI rules code, and a "end" section following the UI rules code. There was a fourth section once upon a time (in the"old" UI) but they got rid of it I think because it's position never really did make much sense. Maybe FM will make changes to their standard script in the future. But unless they drop Sieve or the "language" radically changes I still see they will always leave a user edit section at the start, before and after the generated rules code. I'm willing to take my chances. Last edited by xyzzy : 21 Jan 2022 at 08:08 AM. |
|