User Tools

Site Tools


vacation_messages_setup

Vacation messages setup | E-mail auto reply

You can setup a “vacation message” while you are away from your email in several ways. All this makes use of the Linux specific procmail utiltity, which for all STRW and IL accounts has been setup for you already (see last section below).


We provide a form to set this up at the STRW Self service This from is only accessible from inside the institute, so you either have to be there physically, or use VPN, VPC or any of the other remote access methods.


Below are some older methods that are still available:

Email yourself

Turn on auto reply

To turn on the “vacation” message, send yourself an e-mail with subject: vacation on. The message body will become the message sent to others when they mail you. Be sure to send the mail from your local strw or Lorentz Institute account, otherwise it will not get processed (we don't want that others can turn this feature on or off for you!)

Turn off auto reply

To turn the “vacation” feature off, send yourself a message with subject: vacation off


Procmail Setup

Vacation messages are setup at the mail server using the procmail program facilities.

Below you find the lines (that may already be in your .procmailrc file) which have to be in the .procmailrc file to make procmail perform the same actions as the vacation program. If you don't have a .procmailrc file, or an older one without these additions, run SfinxUpdate .procmailrc to install a procmail setup on your account.

########################################################################
#
#
VAC_MESSAGE=$HOME/.vacation.msg
VAC_CACHE=$HOME/.vacation.cache
VAC_LOCK=$HOME/.vacation.lock
NL="
"

# test if message is to and from the same address and if suject is
# "vacation on" or "vacation off"
:0
# adressed to a system user
*$ ^TO_$LOGNAME@
# and is from that same user
*$ ^From:.*$LOGNAME@
# has subject containing only "vacation (on|off)"
*  ^Subject: *vacation *\/o(ff|n) *$
# clean out extra space
*  MATCH ?? ()\/o(ff|n)
{
    ACTION=$MATCH
    LOG="ACTION: $ACTION, USER: $LOGNAME, HOME: $HOME $NL"
 
    :0c
    * ACTION ?? off
    # remove vacation message and cache
    | rm $VAC_MESSAGE $VAC_CACHE
    :0Ebc
    # create vacation message from body
    | cat > $VAC_MESSAGE
    # FIXME: extra newline in output; how to deal with attachements?
  
    # As confirmation that vacation works the user will receive his own
    # auto-reply from the next recipe
} 
  
:0
# is there a vacation message for that user?
*$? "test -e $VAC_MESSAGE"
{ 
  
    # from procmailex
    :0 Whc: $VAC_LOCK
    # Perform a quick check to see if the mail was addressed (to|cc) us
    *$ ^TO_$\LOGNAME@
    # Don't reply to daemons and mailinglists
    *  !^FROM_DAEMON
    # Mail loops are evil
    *$ !^X-Loop: $XLOOP
    | formail -rD 8192 $VAC_CACHE

# if the name was not in the cache

    :0 ehc
    | (formail -rI"Precedence: junk" -A"X-Loop: $XLOOP" ; \
        cat $VAC_MESSAGE ) | $SENDMAIL -oi -t

}

vacation_messages_setup.txt · Last modified: 2022/08/16 08:00 by jansen