Jump to content

This is the support site for Andrews & Arnold Ltd, a UK Internet provider. Information on these pages is generally for our customers but may be useful to others, enjoy!

Sieve-Example:Notify: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
 
(9 intermediate revisions by the same user not shown)
Send a notification email to another mailbox when the mailbox gets an email:
 
[[File:Sieve-roundcube-notify.png|none|frame|Roundcube screenshot for sending a notification email to another address]]
 
If you can edit the sieve filter manually, then you can also get the Sender and add that to the subject line:
<syntaxhighlight>
 
<syntaxhighlight lang="python">
# rule:[notify]
if header :matches "subjectSubject" "*"
{
set "subject" "${1}";
notify :importance "2" :message "[Notification] ${subject}" "mailto:someone@example.com";
}
 
if header :matches "From" "*"
{
set "from" "${1}";
}
notify :importance "2" :message "[Notification] ${from}: ${subject}" "mailto:someone@example.com";
 
</syntaxhighlight>
 
This sets a variable of the subject, and then sends an email to another mailbox using the subject line.
 
 
 
[[Category:Sieve]]
autoreview, Bureaucrats, editor, Interface administrators, reviewer, Administrators
12,274

edits