Vacation Manager

The usual way to implement a vacation autoresponder is to use the "vacation" program with procmail (or .qmail files if using qmail).

I've never liked that. First, ordinary users don't necessarily have the expertise to do this. Often either the administrator has to set it up for the users, or the users have to access a web page that lets them turn it on or off. The web page concept is an improvement on having the administrator do it, but I'd like to avoid that too.


Hate these ads?

The other thing I don't like about vacation is that its database of messages responded to is scattered about in users directories and isn't flexible. You can't control how it responds with any degree of flexibilty.

So, I've been thinking about how I'd like it to work. I'd like it email based: the user sends email to a "vacationmanager" address to turn responding on or off. This doesn't need to be super-secure, but we don't want people (except perhaps the administrator) turning other people's vacation on or off, so the program will respond to the "From" address with a key, and won't actually do anything until it gets another email containing that key. The flow is something like this:

  • User sends message to vacationmanager with the subject and body they want to use for responses.
  • Vacation program sends back a message confirming this request and includes a "key" in the body.
  • User ordinarily simply replies to that message to turn on vacation.
  • Vacation program sets up forwarding to itself and manages responses until it receives another email from the user.
  • Recognizing that this person is "on vacation" now, the program responds with another key offering to turn vacation responses off.
  • User replies and vacation is now turned off


That's all simple enough. We can expand the concept for more control by letting the response by the user contain more information. For example, the initial response from the program might look like this:



Hi, this is the vacation manager program at xyz.com.  You (or 
someone pretending to be you) have requested that you be put 
"on vacation" and that people sending you email be sent 
the following notice:








===== YOUR SUBJECT  ======
Subject: Re: (their subject)
===== your subject  ======



===== YOUR MESSAGE  ======
Joe Smith is on vacation and will return on August 15th.



===== your message  ======



If that's acceptable, simply hit "Reply" and I'll take care of everything
else.  If you wish, you can modify any of the following.  You can 
also save this email and by modifying and replying later, you 
can change my behavior at any time.  For example, if you need to 
change your message because your return time has changed, you can 
modify that.



You can turn off these automatic responses simply by sending me 
a new message with any subject and body, or by modifying this 
message as instructed below.


ad



===== Begin Vacaation Manager Control =====
# DON"T CHANGE THIS:



SECRET_KEY=3ADFGJ8&



# Change this to off if you want to turn notification off, 
# or just send a new message



VACATION=ON



# This determines whether my reply includes RE: and their subject
INCLUDE_THEIR_SUBJECT=YES



# This determines whether to quote their text in my reply
# and whether to send back any attachments they sent.
INCLUDE_THEIR_BODY=NO
STRIP_ATTACHMENTS=YES



# The subject of my response (can be blank)
YOUR_SUBJECT=""



# The body
YOUR_BODY="
Joe Smith is on vacation and will return on August 15th.



"



# The rest of these are more techy, don't mess with them if you
# don't understand.  I will remember these the next time you 
# are on vacation if you change them



# Your email can be multiple values
YOUR_EMAIL="joesmith@xyz.com";
YOUR_EMAIL="joe@xyz.com";
YOUR_EMAIL="";



# Days between responses to same address
RESPONSE_DAYS=5



# Don't respond can take multiple email addresses.
# For example, you might not respond to mail from a mailing 
# lists you subscribe to.
# Examples:
#      NO_RESPONSE="lvm_list@lvm.org"
#      NO_RESPONSE="list@xyz.org"
NO_RESPONSE=""
NO_RESPONSE=""
NO_RESPONSE=""



# Don't respond to subjects containing these strings.  
NOT_IF_SUBJECT=""
NOT_IF_SUBJECT=""
NOT_IF_SUBJECT=""



# more specialized uses: respond with attached files if 
# subject matches strings.  Or could use for auto fax-back
ATTACH_IF_1=
ATTACH_FILE_1=
ATTACH_IF_2=
ATTACH_FILE_2=





===== End Vacaation Manager Control =====





I'm sure there are other features that could or should be added, so any suggestions are appreciated. I'm going to start developing some code toward this end, and will of course publish it here.

© August 2003 Tony Lawrence All rights reserved


Comments
VacManager :

I use this little cgi script for our companies vacation manager, which uses "vacation", by utilizing a .procmailrc file in the users home directory. It has worked well for us, and uses my philosopy of "webifying" everything:

http://staf.patat.org/cgipaf/develop/

It also allows users to change their smb passwords, and unix passwd.

I also hacked up the source with the authors help, to disallow forwarding of mail over a certain size, so people with mail accounts that usually refuse mail over a certain size, do not get email that is too large forwarded to their blackberry or other handheld.

- Bruce Garlock

Other Examples:
Being able to send messages to the mail system to enable/disable vacation auto-respond is great. Anyone know where to find this script? Has someone written it yet?

Does anyone know of any other examples of how to allow users to easily enable/disable vacation auto-responders?

- Brian



Thu Dec 20 17:03:21 2007: Subject:   TonyLawrence
It's been implemented.



James Cetrangelo made a procmail recipe that does this

- see http://aplawrence.com/Programming/procmail_vacation.html

Add your comments

Enter your email address for automatic notification of new posts here
(be sure to whitelist 'feedburner.com' if you use spam filtering)

Or use any RSS reader

Delivered by FeedBurner



Views for this page
Today This Week This Month This Year  Overall
343715 5,114

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

pavatar.jpg
More:
       - Mail




Unix/Linux Consultants


http://echo3.net/ Unix/Linux Custom Applications, Web Hosting, C/C++ Programming Courses


http://www.cleverminds.net Need expert advice? Want a second opinion? CleverMinds is a one-stop-shop for a wide range of technology solutions. We support Unix, Linux, SCO as well as CMS, ecom, blogs, podcasts, search engines consulting and more. Contact us at web2.0@cleverminds.net 0r (617) 894-1282


larryi@ccamedical.com SCO OS5, Debian Linux, RedHat Linux, MySQL, Apache, AJAX development using dXport/dL4/Unibasic, Windows Connectivity, Sharing Resouces, Automation, Shell Scripting



Twitter
  • Nov 30 20:25
    I have 37,000 words of a 50,000 word project. I'd like to finish it this week..
  • Nov 30 20:05
    My wife made turkey sandwiches with stuffing and cranberry orange relish - I did not want to eat the last bite. Didn't want it to end!




card_image








Change Congress


Related Posts


Publish your articles, comments, book reviews or opinions here!