summaryrefslogtreecommitdiffstats
path: root/src/local_scan.c
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 /src/local_scan.c
parentInitial commit. (diff)
downloadexim4-60bddf70a0555b5f386aa68ac440742aefbfa361.tar.xz
exim4-60bddf70a0555b5f386aa68ac440742aefbfa361.zip
Adding upstream version 4.94.2.upstream/4.94.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/local_scan.c65
1 files changed, 65 insertions, 0 deletions
diff --git a/src/local_scan.c b/src/local_scan.c
new file mode 100644
index 0000000..4dd0b2b
--- /dev/null
+++ b/src/local_scan.c
@@ -0,0 +1,65 @@
+/*************************************************
+* Exim - an Internet mail transport agent *
+*************************************************/
+
+/* Copyright (c) University of Cambridge 1995 - 2009 */
+/* 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)
+{
+fd = fd; /* Keep picky compilers happy */
+return_text = return_text;
+return LOCAL_SCAN_ACCEPT;
+}
+
+/* End of local_scan.c */