Subject: How about an "email" action extension instead of a "vacation" extension

From: "Nigel Swinson" <[email-masked]>
Date: Sat, 11 Aug 2001 00:51:34 +0100

Slightly extending the vacation extension idea, what would people think about and "email" action extension, that would send an email to the specified recipients, and possibly the sender of the email.  It might look something along the lines of:

Syntax:   email [":replytosender"] [":days" number] <":recipient" recipients: string-list> <":subject" subject: string> <body: string>

Where :replytosender would include the senders email address in the recipient list.  :recipient would allow you to add additional recipients for the message, :subject and body are obvious, and the email would be from the owner of script.  :days if specified would specify the minimum interval required between sending out the same message to the sender much in the same way as the vacation extension defined.

Possible uses could be as a vacation autoreply filter:

    require "email"; 

    if header :contains "from" "[email-masked]" { 
         redirect "[email-masked]";
    } else {
         email :replytosender :days 10 :subject "I'm on holiday :o)" 
                   "Sorry, I'm away for 10 days, I'll read your message when I get around to it.";
    }

A virus detector:

    require "email";

    if header :contains "I love you" {
        reject "The message contains the I love you virus";
        email :replytosender :recipient "[email-masked]" :subject "Your computer has been infected with a virus" 
            "Your computer at some time has been infected with the \"I love you virus\" and has recently send an email to our mail server.                      Please check out www.F-Secure.com for details of how to clean your system";
        stop;
    }

I suppose "email" would not cancel the implicit keep action. and could be used in conjunction with reject, discard, fileinto and keep.

Comments?

Nigel

---

From: David Roxe <[email-masked]>
Date: Fri, 10 Aug 2001 21:04:31 -0400

> Nigel Swinson wrote:
> 
> Slightly extending the vacation extension idea, what would people
> think about and "email" action extension, that would send an email to
> the specified recipients, and possibly the sender of the email.  It
> might look something along the lines of:

How about using that notification extension proposed on the list
earlier?
Here is the header information:

Subject: 
        Notify extension to Sieve
   Date: 
        Tue, 03 Jul 2001 14:47:34 -0400
   From: 
        Wolfgang Segmuller <[email-masked]>
     To: 
        [email-masked]

That is, a Sieve action could be, "notify this list of recipients,
via email, with a message having these particular contents."