summaryrefslogtreecommitdiffstats
path: root/util/unknownuser.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 09:44:07 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 09:44:07 +0000
commit39ce00b8d520cbecbd6af87257e8fb11df0ec273 (patch)
tree4c21a2674c19e5c44be3b3550b476b9e63d8ae3d /util/unknownuser.sh
parentInitial commit. (diff)
downloadexim4-39ce00b8d520cbecbd6af87257e8fb11df0ec273.tar.xz
exim4-39ce00b8d520cbecbd6af87257e8fb11df0ec273.zip
Adding upstream version 4.94.2.upstream/4.94.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'util/unknownuser.sh')
-rwxr-xr-xutil/unknownuser.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/util/unknownuser.sh b/util/unknownuser.sh
new file mode 100755
index 0000000..fe04dc6
--- /dev/null
+++ b/util/unknownuser.sh
@@ -0,0 +1,32 @@
+#! /bin/sh
+
+# 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
+
+
+