On 1/31/2015 3:36 AM, Jan Ingvoldstad wrote:
On Fri, Jan 30, 2015 at 11:06 AM, Mark Constable <[email protected] <mailto:[email protected]>> wrote:

    I've been meaning to do this for the past decade...

    #!/bin/bash
    # autoreply 20150130 (C) Mark Constable <[email protected]
    <mailto:[email protected]>> (AGPL-3.0)
    #
    # A simple vacation autoreply script for courier-mta based
    mailservers.


I'm not sure that sharing this script is wise, as it will – unless I misunderstood something – generate an automatic response to absolutely everything, every single time.

If I haven't misunderstood, then this script is going to create problems for anyone using it.

No, it only sends one message per email address per day.

`mailbot -t "./autoreply.txt" -d "./autoreply" -A "To: \$MAILFROM" -A "From: \$MAILTO" -s 
"\$SUBJECT" -T forwardatt \$SENDMAIL -f "\$MAILTO"\`

Take a look at the mailbot manpage if you want to know exactly what it does. In particular, the '-d' option creates a database of email addresses that prevents the autoreply from being sent to the same address more than once per day. The '-T forwardatt' option sends the original message back as an attachment.

I do something similar with my email when I go on vacation. In addition, I wrap it with a test that looks for spam, list mail, and bulk mail headers and does not respond to those.

If you are interested, it looks like this:

if (! (/^X-Spam-Flag: YES/ || /^List-id:/ || /^Precedence: bulk/ || /^Precedence: junk/) )
{
#send autoreply#
}

--
Bowie
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to