Skip to main content
Glama
block3-execute-rule-actions.txt2.73 kB
### Calculate rule actions {{{ if jmapquery "{\"someInThreadHaveKeyword\":\"$followed\"}" { set "threadstatus" "followed"; addflag "$followed"; } elsif jmapquery "{\"someInThreadHaveKeyword\":\"$muted\"}" { set "threadstatus" "muted"; addflag "$muted"; } # No user configured rules ### }}} ### Execute rule actions {{{ # Muted/followed if string :is "${threadstatus}" "followed" { addflag "$notify"; } elsif string :is "${threadstatus}" "muted" { removeflag "$notify"; set "skipinbox" "Y"; } # Delete/spam always skips inbox if anyof( string :is "${deletetotrash}" "Y", string :is "${spam}" "Y" ) { set "skipinbox" "Y"; } # Copies always get marked read for better compatibility with IMAP clients # and labels mode. if anyof( string :is "${read}" "Y", not string :is "${skipinbox}" "Y" ) { if hasflag "\\Seen" { set "read" "Y"; } else { addflag "\\Seen"; } } # Similarly, only the inbox copy gets flagged if allof( string :is "${flagged}" "Y", string :is "${skipinbox}" "Y" ) { addflag "\\Flagged"; } # Rule sent message to trash if string :is "${deletetotrash}" "Y" { fileinto :specialuse "\\Trash" "INBOX.Trash"; } # Rule says message is spam elsif string :is "${spam}" "Y" { fileinto :specialuse "\\Junk" "INBOX.Spam"; } # Otherwise, do rule actions else { ### Sieve generated for calendar preferences {{{ set "processimip_outcome" "no_action"; set "processimip_error" ""; if header :contains "X-Spam-Known-Sender" "in-addressbook" { processcalendar :allowpublic :outcome "processimip_outcome" :reason "processimip_error" :deletecancelled :calendarid "57F34C08-E011-11EF-925B-58C65685D807"; } else { processcalendar :allowpublic :outcome "processimip_outcome" :reason "processimip_error" :deletecancelled :updatesonly; } if string :is "${processimip_outcome}" ["added","updated"] { } elsif not string :is "${processimip_outcome}" "no_action" { addheader "X-ME-Cal-Outcome" "${processimip_outcome}"; addheader "X-ME-Cal-Error" "${processimip_error}"; } ### }}} ### File into folder actions {{{ # Then archive or clear implicit keep if skipping inbox if string :is "${skipinbox}" "Y" { if not string :is "${hasmailbox}" "Y" { fileinto :specialuse "\\Archive" "INBOX.Archive"; } else { discard; } } else { # Set flags for inbox copy if not string :is "${read}" "Y" { removeflag "\\Seen"; } if string :is "${flagged}" "Y" { addflag "\\Flagged"; } # MailFetch stop action } ### }}} ### Sieve generated for vacation responses {{{ # You do not have vacation responses enabled. ### }}} } ### }}} if string :is "${stop}" "Y" { stop; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gr3enarr0w/fastmail-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server