Exim 4.72 release
[exim-website.git] / config.samples / C019
1 From: John Horne <J.Horne@plymouth.ac.uk>
2 Date: 20 May 1999
3
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.)
7
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).
12
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!).
18
19 When the user returns to your site simply remove them from the lookup file,
20 and delete the directory created for them. 
21
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
26
27   The lookup file may not be necessary since the 'require_files' option
28   is present.
29
30   The condition statement could be further extended:
31     condition = "${if \
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}}"
36
37   The following exceptions could be included:
38     except_senders = "^.*-request@:^owner-:^postmaster@:^.*daemon@:\
39                       ^.*server@:^root@:^${local_part}@shef(field)?\\.ac\\.uk"
40
41 ---------------------------------------------------------------------
42 The director and transport entries to use are:
43
44 Add to the transport section:
45
46 vacation_user:
47   driver = autoreply;
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
54   to = $reply_address
55   from = $local_part
56   user = exim
57
58
59 Add to the top of the director section:
60
61 vacation:
62   unseen
63   no_expn
64   no_verify
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
70   driver = smartuser;
71   errors_to = postmaster@plymouth.ac.uk
72