1 From: John Horne <J.Horne@plymouth.ac.uk>
4 The following configuration file entries can be used to provide a 'vacation'-
5 style function for a mailhub which has no local users. (In our case the mail is
6 sent from the mailhub to users on file servers.)
8 The procedure is that the user's local part is added to a lookup file. A
9 directory is then created for the user to store a log file and a list of
10 sites which have received a reply already (this avoids a sender receiving
11 numerous vacation messages).
13 When a message for a vacation user is received a director lookups up the
14 users local part address. If found then a transport is invoked which sends
15 either a user supplied message or a default message back to the sender.
16 The default message is held in '/usr/local/exim/messages/vacation'; it simply
17 states that the user is away (word this to your own needs!).
19 When the user returns to your site simply remove them from the lookup file,
20 and delete the directory created for them.
22 Note: The following changes were provided by Richard Gilbert of the
23 University of Sheffield (R.Gilbert@sheffield.ac.uk) -
24 The file lookup could be a simple text file:
25 local_parts = lsearch;/usr/local/exim/vacation-users
27 The lookup file may not be necessary since the 'require_files' option
30 The condition statement could be further extended:
32 and{{or{{match{$header_to:}{(?i)${local_part}@shef(field)?\\.ac\\.uk}} \
33 {match{$header_cc:}{(?i)${local_part}@shef(field)?\\.ac\\.uk}}}} \
34 {!eq{$sender_address}{}} \
35 {!match{$message_precedence}{(?i)bulk|junk|list}}}{yes}{no}}"
37 The following exceptions could be included:
38 except_senders = "^.*-request@:^owner-:^postmaster@:^.*daemon@:\
39 ^.*server@:^root@:^${local_part}@shef(field)?\\.ac\\.uk"
41 ---------------------------------------------------------------------
42 The director and transport entries to use are:
44 Add to the transport section:
48 subject = "${if def:h_Subject: {Re: $h_Subject:} {I am on vacation}}"
49 file = "${if exists {/usr/local/exim/vacation/$local_part/msg} \
50 {/usr/local/exim/vacation/$local_part/msg} \
51 {/usr/local/exim/messages/vacation}}"
52 log = /usr/local/exim/vacation/${local_part}/log
53 once = /usr/local/exim/vacation/${local_part}/once
59 Add to the top of the director section:
65 condition = "${if or {{match {$h_precedence:} {(?i)junk|bulk|list}} \
66 {eq {$sender_address} {}}} {no} {yes}}"
67 local_parts = cdb;/usr/local/exim/tables/vacation-users.cdb
68 require_files = /usr/local/exim/tables/vacation/$local_part/
69 transport = vacation_user
71 errors_to = postmaster@plymouth.ac.uk