summaryrefslogtreecommitdiffstats
path: root/src/local_scan.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 16:16:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 16:16:13 +0000
commite90fcc54809db2591dc083f43ef54c6ec8c60847 (patch)
treef20bc206c3c2d5d59d37c46c5cf5d53a20642556 /src/local_scan.c
parentInitial commit. (diff)
downloadexim4-e90fcc54809db2591dc083f43ef54c6ec8c60847.tar.xz
exim4-e90fcc54809db2591dc083f43ef54c6ec8c60847.zip
Adding upstream version 4.96.upstream/4.96upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/local_scan.c')
-rw-r--r--src/local_scan.c64
1 files changed, 64 insertions, 0 deletions
diff --git a/src/local_scan.c b/src/local_scan.c
new file mode 100644
index 0000000..7a3bae7
--- /dev/null
+++ b/src/local_scan.c
@@ -0,0 +1,64 @@
+/*************************************************
+* Exim - an Internet mail transport agent *
+*************************************************/
+
+/* Copyright (c) University of Cambridge 1995 - 2009 */
+/* Copyright (c) The Exim Maintainers 2021 */
+/* See the file NOTICE for conditions of use and distribution. */
+
+
+/******************************************************************************
+This file contains a template local_scan() function that just returns ACCEPT.
+If you want to implement your own version, you should copy this file to, say
+Local/local_scan.c, and edit the copy. To use your version instead of the
+default, you must set
+
+HAVE_LOCAL_SCAN=yes
+LOCAL_SCAN_SOURCE=Local/local_scan.c
+
+in your Local/Makefile. This makes it easy to copy your version for use with
+subsequent Exim releases.
+
+For a full description of the API to this function, see the Exim specification.
+******************************************************************************/
+
+
+/* This is the only Exim header that you should include. The effect of
+including any other Exim header is not defined, and may change from release to
+release. Use only the documented interface! */
+
+#include "local_scan.h"
+
+
+/* This is a "do-nothing" version of a local_scan() function. The arguments
+are:
+
+ fd The file descriptor of the open -D file, which contains the
+ body of the message. The file is open for reading and
+ writing, but modifying it is dangerous and not recommended.
+
+ return_text A pointer to an unsigned char* variable which you can set in
+ order to return a text string. It is initialized to NULL.
+
+The return values of this function are:
+
+ LOCAL_SCAN_ACCEPT
+ The message is to be accepted. The return_text argument is
+ saved in $local_scan_data.
+
+ LOCAL_SCAN_REJECT
+ The message is to be rejected. The returned text is used
+ in the rejection message.
+
+ LOCAL_SCAN_TEMPREJECT
+ This specifies a temporary rejection. The returned text
+ is used in the rejection message.
+*/
+
+int
+local_scan(int fd, uschar **return_text)
+{
+return LOCAL_SCAN_ACCEPT;
+}
+
+/* End of local_scan.c */