User Tools

Site Tools


vacation_messages_setup

This is an old revision of the document!


Vacation messages setup

You can setup a vacation message while you are away from your email in several ways. The most simple method is email yourself a specific message (see below). This may, however, not be so simple if you setup your mail program to use HTML formatted email or if you use an exotic program such as Outlook. For such occasions the webmail utility provides a nice feature (also see below). 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).


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


Use Roundcube WEB mail

The Observatory and Lorentz Institute provide web mail facilities ( STRW and IL respectively) that allow you to read and write email from your account using a standard WEB browser. The tool providing this facility is based on the open source package Roundcube. This package has several plugins, one of which is the vacation plugin. You can access this plugin by selecting the Settings option (top right). Once selected you are presented a window with tabs, one of the tabs is the Vacation Tab:

Click on the Vacation tab and (after some time) you are presented the vacation form:

If you did not yet set a vacation message, a default text is filled in for you to modify. Then select the checkbox 'Enable vacation message' and click on the Save button. Now this text is put into your vacation message file and from this point on people who send you an email will get this text in reply.

If you have a vacation message setup previously, you will see the text from that vacation message in the form. You now have two options,

  • modify the text, tick the checkbox and click Save to update your message text, or
  • leave the checkbox unchecked and click Save to remove the vacation message and thus disabling the vacation messaging system

Procmail Setup

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

Below you find the lines (that may already in your .procmailrc file) which have to be 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.1530696091.txt.gz · Last modified: 2018/07/04 09:21 by deul