File: unknownuser.sh

package info (click to toggle)
exim4 4.63-17
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 11,232 kB
  • ctags: 6,113
  • sloc: ansic: 86,696; sh: 4,495; xml: 1,876; makefile: 540; perl: 336
file content (33 lines) | stat: -rwxr-xr-x 1,001 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#! /bin/sh
# $Cambridge: exim/exim-src/util/unknownuser.sh,v 1.1 2004/10/07 10:39:03 ph10 Exp $

# This is a sample script for demonstrating how to handle unknown users in
# a more friendly way than just returning a "user unknown" error. It can
# be called from a pipe transport set up like this:

# unknownuser_pipe:
#   driver = pipe;
#   command = "/opt/exim/util/unknownuser.sh",
#   ignore_status,
#   return_output,
#   user = nobody

# which is specified by a smartuser director set up like this:

# unknownuser:
#   transport = unknownuser_pipe,
#   no_verify,
#   driver = smartuser;

# Any output generated by this script is then returned to the sender of
# the message. You can run any commands you like at this point, for example,
# to attempt fuzzy matches on the local part of the address. Here we just
# give a bland message, demonstrating the availability of the variables
# $LOCAL_PART and $DOMAIN.

cat <<End
"$LOCAL_PART" is not a known user mailbox in the domain "$DOMAIN".
End