|
FastMail Forum All posts relating to FastMail.FM should go here: suggestions, comments, requests for help, complaints, technical issues etc. |
|
Thread Tools |
19 Sep 2023, 12:38 AM | #1 |
Junior Member
Join Date: Aug 2016
Posts: 4
|
mail rues: sieve code: notifications
Hello,
thanks to anyone who might be helping me with answering this question: In the bottommost code box on the advanced sieve edit page in Fastmail settings, there's the following code (I have changed the email addresses) Code:
if not string :is "${deletetotrash}" "Y" { if header :contains ["to", "cc", "resent-to"] "x@fastmail.net" { notify :options ["Text","Only"] :message "/ New email from $from$ arrived at x@fastmail.net/ New email from $from$ arrived at x@fastmail.net" "mailto:my@mailaddress.com"; } } |
19 Sep 2023, 02:29 AM | #2 |
Junior Member
Join Date: Aug 2016
Posts: 4
|
Ummmm, in might be I did this myself 15 years ago, just sayin'. ....
|
24 Sep 2023, 06:18 AM | #3 |
Intergalactic Postmaster
Join Date: May 2004
Location: Irving, Texas
Posts: 8,965
|
Sorry for the delay - I just noticed your thread several days after you posted.
In the Edit custom Sieve code screen, the user-editable code sections have a white background while the automatically generated from rules code has a shaded background. The automatically generated code has automatic comments. Each section of automatic code starts with a ### comment. If you add a name to each of your rules (a good idea), that rule code will be commented #Rule your rule name. The example you gave is for notification of new messages sent to a specific address. But it doesn’t look like the current code, and my guess is that you wrote it from scratch yourself. In the Fastmail Rules interface you can specify to receive a notification in the browser or iOS/Android app when that rule catches a specific message. But the code you posted sends a notification email (not a browser or app pop up alert), and that would seem only to be of value if you were wanting to be notified of a new message by sending an email to a different email system. For example, there is a mostly obsolete device called a pager which initially could only be activated to sound and/or vibrate an alert when a phone call was placed to the pager telephone number. After email became popular, some systems could also be triggered by sending an email to a particular address for that pager. Similarly, you might have wanted for new messages sent to a specific Fastmail address to trigger a notification in your Gmail or other email account. The current Fastmail automatic Sieve code adds the $notify flag when that box is selected in a rule. But you won’t find any code in the Sieve script which executes a RFC5435 notification (the top of Sieve script “enotify” entry). So the Fastmail internal code which executes your Sieve script must examine the $notify flag after the script terminates and if set a notification is sent. I hope this helps. Several years ago I switched from a long custom Sieve script to using the rules system for nearly all of my needs. The advantages of using the normal rules system include:
|
Thread Tools | |
|
|