EmailDiscussions.com  

Go Back   EmailDiscussions.com > Email Service Provider-specific Forums > FastMail Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
Stay in touch wirelessly

FastMail Forum All posts relating to FastMail.FM should go here: suggestions, comments, requests for help, complaints, technical issues etc.

Reply
 
Thread Tools
Old 21 Jan 2022, 12:34 AM   #1
aoeuaoeu
Member
 
Join Date: Jan 2009
Posts: 53
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!
aoeuaoeu is offline   Reply With Quote

Old 21 Jan 2022, 01:27 AM   #2
JeremyNicoll
Essential Contributor
 
Join Date: Dec 2017
Location: Scotland
Posts: 483
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?
JeremyNicoll is offline   Reply With Quote
Old 21 Jan 2022, 01:33 AM   #3
BritTim
The "e" in e-mail
 
Join Date: May 2003
Location: mostly in Thailand
Posts: 3,084
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.
BritTim is offline   Reply With Quote
Old 21 Jan 2022, 08:59 AM   #4
xyzzy
Essential Contributor
 
Join Date: May 2018
Posts: 474
Quote:
Originally Posted by BritTim View Post
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.
Heh, certainly not a philosophy I follow! I use Sieve to support additional functionality not supported by the UI, stuff to do what the rules UI doesn't support (or doesn't easily support) like complex pattern conditions, and IMO sometimes it's just plain easier to update and be more readable than a UI rule (e.g., when lists of matches are involved). Also put back desired functions that FM once supported but no longer supports (remember the "{SPAM xx.x}" prefix -- I liked that thing).

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 09:08 AM.
xyzzy is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +9. The time now is 02:45 PM.

 

Copyright EmailDiscussions.com 1998-2022. All Rights Reserved. Privacy Policy