procmail
[Top] [All Lists]

Re: handling mail for users on vacation

2007-12-13 15:20:09
On Fri, Dec 14, 2007 at 08:00:19AM +1000, Troy Piggins wrote:

When staff go on holidays, to date I have set up a procmail rule
that forwards their mail to a designated user who will handle
their correspondence while they're away.  It's been pretty much
manually applying the rule when they leave and manually removing
it when they get back.

Does anyone have a little more automatic method/workflow of doing
it?  A script?  I was thinking something that takes the username,
start holiday date, end holiday date, and designated username.
How do you get it to expire when they're back?  Cronjobs?

There would be many approaches to such a thing.  One easy one
would be for procmail to look for a market file in the user's $HOME.

  :0
  * ? test -f $HOME/.vacation
  ! forward(_at_)me(_dot_)wherever

This could be at the end of the rcfile, such that if it doesn't
get invoked, the mail drops in to $DEFAULT as procmail ends
gracefully.

That's not very intensive, but if running even "test" seems too
much, we could reduce it to a file-read:

  INCLUDERC = $HOME/.vacation

If that file exists, it could contain:

   :0
   ! forward(_at_)me(_dot_)wherever

-- 
dman
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>