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.
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:
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. ===== Begin Vacation 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 Vacation 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 reservedGot something to add? Send me email.
More Articles by Tony Lawrence © 2011-07-04 Tony Lawrence
Any problem in computer science can be solved with another level of indirection. (David Wheeler)
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:
https://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: 3342 TonyLawrence
It's been implemented.
James Cetrangelo made a procmail recipe that does this
- see (link)
------------------------
Printer Friendly Version
Vacation Manager Copyright © August 2003 Tony Lawrence
Have you tried Searching this site?
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.
Contact us
Printer Friendly Version