aboutsummaryrefslogtreecommitdiffstats
path: root/mail/sendmail
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2001-03-10 14:09:27 +0800
committerdinoex <dinoex@FreeBSD.org>2001-03-10 14:09:27 +0800
commit2ce9f7560f67137314d4426f837b1855e6c6b1a1 (patch)
treece8a965f55708da65fa4e6ec1e6be837ce0cf26e /mail/sendmail
parentb8fc26e72ca98f18646504e1aa62a46906db6a17 (diff)
downloadfreebsd-ports-gnome-2ce9f7560f67137314d4426f837b1855e6c6b1a1.tar.gz
freebsd-ports-gnome-2ce9f7560f67137314d4426f837b1855e6c6b1a1.tar.zst
freebsd-ports-gnome-2ce9f7560f67137314d4426f837b1855e6c6b1a1.zip
SENDMAIL_WITH_MILTER support
sample filter is build. GPL attachmentfilter ist build.
Diffstat (limited to 'mail/sendmail')
-rw-r--r--mail/sendmail/files/Makefile.milter27
-rw-r--r--mail/sendmail/files/site.config.m4.milter2
-rw-r--r--mail/sendmail/files/vbsfilter-1.3.c.patch30
3 files changed, 59 insertions, 0 deletions
diff --git a/mail/sendmail/files/Makefile.milter b/mail/sendmail/files/Makefile.milter
new file mode 100644
index 000000000000..ef6db8984ef8
--- /dev/null
+++ b/mail/sendmail/files/Makefile.milter
@@ -0,0 +1,27 @@
+# Generic Makefile for libmilter filters
+CC = gcc -Wall
+
+# point this at your sendmail source tree
+# SENDMAIL_SOURCE = /usr/local/src/sendmail-8.11.1
+
+IFLAGS+= -I$(SENDMAIL_SOURCE)/sendmail -I$(SENDMAIL_SOURCE)/include
+FLAGS+= -pthread
+LDFLAGS+= -L$(SENDMAIL_OBJECT)/libmilter -L$(SENDMAIL_OBJECT)/libsmutil
+LIBS+= -lmilter -lsmutil
+
+TARGETS?= sample vbsfilter-1.3
+
+all: $(TARGETS)
+
+.for i in ${TARGETS}
+${i}:
+ $(CC) $(IFLAGS) $(LDFLAGS) -o ${i} ${i}.c $(LIBS) $(FLAGS)
+
+.endfor
+
+clean:
+ rm -f $(TARGETS)
+
+install:
+ $(INSTALL) -c $(TARGETS) $(DEST)
+
diff --git a/mail/sendmail/files/site.config.m4.milter b/mail/sendmail/files/site.config.m4.milter
new file mode 100644
index 000000000000..6fa49ec50d17
--- /dev/null
+++ b/mail/sendmail/files/site.config.m4.milter
@@ -0,0 +1,2 @@
+APPENDDEF(`conf_libmilter_ENVDEF', `-D_FFR_MILTER=1')
+APPENDDEF(`conf_sendmail_ENVDEF', `-D_FFR_MILTER=1')
diff --git a/mail/sendmail/files/vbsfilter-1.3.c.patch b/mail/sendmail/files/vbsfilter-1.3.c.patch
new file mode 100644
index 000000000000..01f54df27d6e
--- /dev/null
+++ b/mail/sendmail/files/vbsfilter-1.3.c.patch
@@ -0,0 +1,30 @@
+--- vbsfilter-1.3.c.neu.orig Wed Feb 14 10:45:06 2001
++++ vbsfilter-1.3.c Wed Feb 14 12:40:38 2001
+@@ -2,6 +2,10 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <sysexits.h>
++#include <ctype.h>
++#include <stdlib.h>
++#include <netdb.h>
++#include <unistd.h>
+ #include "libmilter/mfapi.h"
+
+ /*
+@@ -172,7 +176,7 @@
+ sfsistat mlfi_body(SMFICTX *ctx, u_char *bodyp, size_t bodylen) {
+ struct mlfiPriv *priv = MLFIPRIV;
+
+- priv->body = (char *) realloc(priv->body, priv->len + bodylen);
++ priv->body = (char *) realloc(priv->body, priv->len + bodylen + 1);
+
+ if (!priv->body) {
+ /* can't accept this message right now */
+@@ -181,6 +185,7 @@
+
+ memcpy((u_char*)(priv->body+priv->len), bodyp, bodylen);
+ priv->len += bodylen;
++ priv->body[priv->len] = 0;
+
+ /* continue processing */
+ return SMFIS_CONTINUE;