tom 2004/12/10 09:24:39 GMT
Modified files: (Branch: EXISCAN)
exim-src/OS Makefile-Base
exim-src/scripts MakeLinks
exim-src/src acl.c globals.c globals.h receive.c
Added files: (Branch: EXISCAN)
exim-src/src bmi_spam.c bmi_spam.h spf.c spf.h srs.c
srs.h
Log:
even more pre-christmas W.I.P. Sorry for the stupid comming messages, they will get better when the changes are less numerous :)
Revision Changes Path
1.1.2.4 +22 -4 exim/exim-src/OS/Makefile-Base
1.1.2.4 +21 -31 exim/exim-src/scripts/MakeLinks
1.5.2.4 +12 -0 exim/exim-src/src/acl.c
1.1.2.1 +472 -0 exim/exim-src/src/bmi_spam.c (new)
1.1.2.1 +24 -0 exim/exim-src/src/bmi_spam.h (new)
1.6.2.4 +1 -0 exim/exim-src/src/globals.c
1.6.2.3 +1 -0 exim/exim-src/src/globals.h
1.4.2.3 +2 -10 exim/exim-src/src/receive.c
1.1.2.1 +131 -0 exim/exim-src/src/spf.c (new)
1.1.2.1 +39 -0 exim/exim-src/src/spf.h (new)
1.1.2.1 +206 -0 exim/exim-src/src/srs.c (new)
1.1.2.1 +31 -0 exim/exim-src/src/srs.h (new)
Index: Makefile-Base
===================================================================
RCS file: /home/cvs/exim/exim-src/OS/Makefile-Base,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -r1.1.2.3 -r1.1.2.4
--- Makefile-Base 2 Dec 2004 16:33:30 -0000 1.1.2.3
+++ Makefile-Base 10 Dec 2004 09:24:38 -0000 1.1.2.4
@@ -1,4 +1,4 @@
-# $Cambridge: exim/exim-src/OS/Makefile-Base,v 1.1.2.3 2004/12/02 16:33:30 tom Exp $
+# $Cambridge: exim/exim-src/OS/Makefile-Base,v 1.1.2.4 2004/12/10 09:24:38 tom Exp $
# This file is the basis of the main makefile for Exim and friends. The
# makefile at the top level arranges to build the main makefile by calling
@@ -284,11 +284,17 @@
@echo ">>> convert4r4 script built"; echo ""
+# These are objects of optional features. They are always compiled, but
+# if the corresponding #defines are not set, they wind up empty and
+# are thrown away by the linker.
+
+OBJ_WITH_CONTENT_SCAN = malware.o mime.o regex.o spam.o spool_mbox.o
+OBJ_WITH_OLD_DEMIME = demime.o
+OBJ_EXPERIMENTAL = bmi_spam.o spf.o srs.o
+
# Targets for final binaries; the main one has a build number which is
# updated each time. We don't bother with that for the auxiliaries.
-OBJ_WITH_CONTENT_SCAN = demime.o malware.o mime.o regex.o spam.o spool_mbox.o
-
OBJ_EXIM = acl.o child.o crypt16.o daemon.o dbfn.o debug.o deliver.o \
directory.o dns.o drtables.o enq.o exim.o expand.o filter.o \
filtertest.o globals.o \
@@ -297,7 +303,8 @@
rda.o readconf.o receive.o retry.o rewrite.o rfc2047.o \
route.o search.o sieve.o smtp_in.o smtp_out.o spool_in.o spool_out.o \
store.o string.o tls.o tod.o transport.o tree.o verify.o \
- local_scan.o $(EXIM_PERL) $(OBJ_WITH_CONTENT_SCAN)
+ local_scan.o $(EXIM_PERL) $(OBJ_WITH_CONTENT_SCAN) \
+ $(OBJ_WITH_OLD_DEMIME) $(OBJ_EXPERIMENTAL)
exim: pcre/libpcre.a lookups/lookups.a auths/auths.a \
routers/routers.a transports/transports.a \
@@ -551,12 +558,23 @@
# Dependencies for WITH_CONTENT_SCAN modules
-demime.o: $(HDRS) demime.c
malware.o: $(HDRS) malware.c
mime.o: $(HDRS) mime.c
regex.o: $(HDRS) regex.c
spam.o: $(HDRS) spam.c
spool_mbox.o: $(HDRS) spool_mbox.c
+
+
+# Dependencies for WITH_OLD_DEMIME modules
+
+demime.o: $(HDRS) demime.c
+
+
+# Dependencies for EXPERIMENTAL_* modules
+
+bmi_spam.o: $(HDRS) bmi_spam.c
+spf.o: $(HDRS) spf.c
+srs.o: $(HDRS) srs.c
# The module containing tables of available lookups, routers, auths, and
Index: MakeLinks
===================================================================
RCS file: /home/cvs/exim/exim-src/scripts/MakeLinks,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -r1.1.2.3 -r1.1.2.4
--- MakeLinks 2 Dec 2004 16:33:30 -0000 1.1.2.3
+++ MakeLinks 10 Dec 2004 09:24:38 -0000 1.1.2.4
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Cambridge: exim/exim-src/scripts/MakeLinks,v 1.1.2.3 2004/12/02 16:33:30 tom Exp $
+# $Cambridge: exim/exim-src/scripts/MakeLinks,v 1.1.2.4 2004/12/10 09:24:38 tom Exp $
# Script to build links for all the exim source files from the system-
# specific build directory. It should be run from within that directory.
@@ -174,28 +174,15 @@
# but local_scan.c does not, because its location is taken from the build-time
# configuration. Likewise for the os.c file, which gets build dynamically.
-# NB: Files marked as "WITH_CONTENT_SCAN" contain only functions relating
-# to content scanning. They are always linked, but their contents compile
-# to nothing if WITH_CONTENT_SCAN is not set.
-
ln -s ../src/dbfunctions.h dbfunctions.h
ln -s ../src/dbstuff.h dbstuff.h
-# WITH_OLD_DEMIME
-ln -s ../src/demime.h demime.h
-#
ln -s ../src/exim.h exim.h
ln -s ../src/functions.h functions.h
ln -s ../src/globals.h globals.h
ln -s ../src/local_scan.h local_scan.h
ln -s ../src/macros.h macros.h
-# WITH_CONTENT_SCAN
-ln -s ../src/mime.h mime.h
-#
ln -s ../src/mytypes.h mytypes.h
ln -s ../src/osfunctions.h osfunctions.h
-# WITH_CONTENT_SCAN
-ln -s ../src/spam.h spam.h
-#
ln -s ../src/store.h store.h
ln -s ../src/structs.h structs.h
@@ -207,9 +194,6 @@
ln -s ../src/dbfn.c dbfn.c
ln -s ../src/debug.c debug.c
ln -s ../src/deliver.c deliver.c
-# WITH_OLD_DEMIME
-ln -s ../src/demime.c demime.c
-#
ln -s ../src/directory.c directory.c
ln -s ../src/dns.c dns.c
ln -s ../src/drtables.c drtables.c
@@ -228,13 +212,7 @@
ln -s ../src/ip.c ip.c
ln -s ../src/log.c log.c
ln -s ../src/lss.c lss.c
-# WITH_CONTENT_SCAN
-ln -s ../src/malware.c malware.c
-#
ln -s ../src/match.c match.c
-# WITH_CONTENT_SCAN
-ln -s ../src/mime.c mime.c
-#
ln -s ../src/moan.c moan.c
ln -s ../src/parse.c parse.c
ln -s ../src/perl.c perl.c
@@ -242,9 +220,6 @@
ln -s ../src/rda.c rda.c
ln -s ../src/readconf.c readconf.c
ln -s ../src/receive.c receive.c
-# WITH_CONTENT_SCAN
-ln -s ../src/regex.c regex.c
-#
ln -s ../src/retry.c retry.c
ln -s ../src/rewrite.c rewrite.c
ln -s ../src/rfc2047.c rfc2047.c
@@ -253,13 +228,7 @@
ln -s ../src/sieve.c sieve.c
ln -s ../src/smtp_in.c smtp_in.c
ln -s ../src/smtp_out.c smtp_out.c
-# WITH_CONTENT_SCAN
-ln -s ../src/spam.c spam.c
-#
ln -s ../src/spool_in.c spool_in.c
-# WITH_CONTENT_SCAN
-ln -s ../src/spool_mbox.c spool_mbox.c
-#
ln -s ../src/spool_out.c spool_out.c
ln -s ../src/store.c store.c
ln -s ../src/string.c string.c
@@ -271,5 +240,26 @@
ln -s ../src/tree.c tree.c
ln -s ../src/verify.c verify.c
ln -s ../src/version.c version.c
+
+# WITH_CONTENT_SCAN
+ln -s ../src/spam.c spam.c
+ln -s ../src/spam.h spam.h
+ln -s ../src/spool_mbox.c spool_mbox.c
+ln -s ../src/regex.c regex.c
+ln -s ../src/mime.c mime.c
+ln -s ../src/mime.h mime.h
+ln -s ../src/malware.c malware.c
+
+# WITH_OLD_DEMIME
+ln -s ../src/demime.c demime.c
+ln -s ../src/demime.h demime.h
+
+# EXPERIMENTAL_*
+ln -s ../src/bmi_spam.c bmi_spam.c
+ln -s ../src/bmi_spam.h bmi_spam.h
+ln -s ../src/spf.c spf.c
+ln -s ../src/spf.h spf.h
+ln -s ../src/srs.c srs.c
+ln -s ../src/srs.h srs.h
# End of MakeLinks
Index: acl.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/acl.c,v
retrieving revision 1.5.2.3
retrieving revision 1.5.2.4
diff -u -r1.5.2.3 -r1.5.2.4
--- acl.c 2 Dec 2004 16:33:30 -0000 1.5.2.3
+++ acl.c 10 Dec 2004 09:24:38 -0000 1.5.2.4
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/acl.c,v 1.5.2.3 2004/12/02 16:33:30 tom Exp $ */
+/* $Cambridge: exim/exim-src/src/acl.c,v 1.5.2.4 2004/12/10 09:24:38 tom Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -1577,6 +1577,18 @@
#ifdef WITH_CONTENT_SCAN
case CONTROL_FAKEREJECT:
fake_reject = TRUE;
+ if (*p == '/')
+ {
+ uschar *pp = p + 1;
+ while (*pp != 0) pp++;
+ fake_reject_text = expand_string(string_copyn(p+1, pp-p));
+ p = pp;
+ }
+ else
+ {
+ /* Explicitly reset to default string */
+ fake_reject_text = US"Your message has been rejected but is being kept for evaluation.\nIf it was a legit message, it may still be delivered to the target recipient(s).";
+ }
break;
#endif
Index: globals.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/globals.c,v
retrieving revision 1.6.2.3
retrieving revision 1.6.2.4
diff -u -r1.6.2.3 -r1.6.2.4
--- globals.c 2 Dec 2004 09:15:11 -0000 1.6.2.3
+++ globals.c 10 Dec 2004 09:24:38 -0000 1.6.2.4
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/globals.c,v 1.6.2.3 2004/12/02 09:15:11 tom Exp $ */
+/* $Cambridge: exim/exim-src/src/globals.c,v 1.6.2.4 2004/12/10 09:24:38 tom Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -492,6 +492,7 @@
#ifdef WITH_CONTENT_SCAN
BOOL fake_reject = FALSE;
+uschar *fake_reject_text = US"Your message has been rejected but is being kept for evaluation.\nIf it was a legit message, it may still be delivered to the target recipient(s).";
#endif
int filter_n[FILTER_VARIABLE_COUNT];
BOOL filter_running = FALSE;
Index: globals.h
===================================================================
RCS file: /home/cvs/exim/exim-src/src/globals.h,v
retrieving revision 1.6.2.2
retrieving revision 1.6.2.3
diff -u -r1.6.2.2 -r1.6.2.3
--- globals.h 2 Dec 2004 09:15:11 -0000 1.6.2.2
+++ globals.h 10 Dec 2004 09:24:38 -0000 1.6.2.3
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/globals.h,v 1.6.2.2 2004/12/02 09:15:11 tom Exp $ */
+/* $Cambridge: exim/exim-src/src/globals.h,v 1.6.2.3 2004/12/10 09:24:38 tom Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -285,6 +285,7 @@
#ifdef WITH_CONTENT_SCAN
extern BOOL fake_reject; /* TRUE if fake reject is to be given */
+extern uschar *fake_reject_text; /* Option for the fakereject control statement: can contain user defined message. Default is in globals.c. */
#endif
extern int filter_n[FILTER_VARIABLE_COUNT]; /* filter variables */
extern BOOL filter_running; /* TRUE while running a filter */
Index: receive.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/receive.c,v
retrieving revision 1.4.2.2
retrieving revision 1.4.2.3
diff -u -r1.4.2.2 -r1.4.2.3
--- receive.c 2 Dec 2004 16:33:30 -0000 1.4.2.2
+++ receive.c 10 Dec 2004 09:24:38 -0000 1.4.2.3
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/receive.c,v 1.4.2.2 2004/12/02 16:33:30 tom Exp $ */
+/* $Cambridge: exim/exim-src/src/receive.c,v 1.4.2.3 2004/12/10 09:24:38 tom Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -3385,11 +3385,7 @@
smtp_printf("250 OK id=%s\r\n", message_id);
#else
if (fake_reject)
- {
- smtp_printf("550-FAKE_REJECT id=%s\r\n", message_id);
- smtp_printf("550-Your message has been rejected but is being kept for evaluation.\r\n");
- smtp_printf("550 If it was a legit message, it may still be delivered to the target recipient(s).\r\n");
- }
+ smtp_respond(550,TRUE,fake_reject_text);
else
smtp_printf("250 OK id=%s\r\n", message_id);
#endif
@@ -3403,11 +3399,7 @@
else if (smtp_reply[0] != 0)
{
if (fake_reject && (smtp_reply[0] == '2'))
- {
- smtp_printf("550-FAKE_REJECT id=%s\r\n", message_id);
- smtp_printf("550-Your message has been rejected but is being kept for evaluation.\r\n");
- smtp_printf("550 If it was a legit message, it may still be delivered to the target recipient(s).\r\n");
- }
+ smtp_respond(550,TRUE,fake_reject_text);
else
smtp_printf("%.1024s\r\n", smtp_reply);
};