ietf-mta-filters
[Top] [All Lists]

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

2001-08-10 16:56:55
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" "boss(_at_)frobnitzm(_dot_)edu" { 
         redirect "pleeb(_at_)xanadu(_dot_)wv(_dot_)us";
    } 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 "postmaster(_at_)ourdomain(_dot_)com" 
: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
<Prev in Thread] Current Thread [Next in Thread>