summaryrefslogtreecommitdiff
path: root/mail/sendmail812/files
diff options
context:
space:
mode:
Diffstat (limited to 'mail/sendmail812/files')
-rw-r--r--mail/sendmail812/files/patch-FreeBSD8
-rw-r--r--mail/sendmail812/files/patch-sendmail-deliver.c64
-rw-r--r--mail/sendmail812/files/patch-sendmail-milter.c39
-rw-r--r--mail/sendmail812/files/pkg-milter1
-rw-r--r--mail/sendmail812/files/sendmail.sh58
-rw-r--r--mail/sendmail812/files/sm-client.sh17
6 files changed, 72 insertions, 115 deletions
diff --git a/mail/sendmail812/files/patch-FreeBSD b/mail/sendmail812/files/patch-FreeBSD
deleted file mode 100644
index a733ccdd1594..000000000000
--- a/mail/sendmail812/files/patch-FreeBSD
+++ /dev/null
@@ -1,8 +0,0 @@
---- devtools/OS/FreeBSD Wed Jan 10 21:44:08 2001
-+++ devtools/OS/FreeBSD Thu Feb 14 08:59:38 2002
-@@ -5,4 +5,5 @@
- define(`confLD', `cc')
- define(`confMTLDOPTS', `-pthread')
-+define(`confMTCCOPTS', `-D_THREAD_SAFE')
- define(`confLDOPTS_SO', `-shared')
- define(`confCCOPTS_SO', `-fPIC')
diff --git a/mail/sendmail812/files/patch-sendmail-deliver.c b/mail/sendmail812/files/patch-sendmail-deliver.c
deleted file mode 100644
index a6c81e12774c..000000000000
--- a/mail/sendmail812/files/patch-sendmail-deliver.c
+++ /dev/null
@@ -1,64 +0,0 @@
-diff -u -r8.928 deliver.c
---- sendmail/deliver.c 2002/01/10 03:23:29 8.928
-+++ sendmail/deliver.c 2002/02/04 23:32:05
-@@ -5141,11 +5141,17 @@
- }
- (void) sm_strlcpy(targetfile, SafeFileEnv, sizeof targetfile);
- realfile = targetfile + len;
-- if (targetfile[len - 1] != '/')
-- (void) sm_strlcat(targetfile, "/", sizeof targetfile);
- if (*filename == '/')
- filename++;
-- (void) sm_strlcat(targetfile, filename, sizeof targetfile);
-+ if (*filename != '\0')
-+ {
-+ /* paranoia: trailing / should be removed in readcf */
-+ if (targetfile[len - 1] != '/')
-+ (void) sm_strlcat(targetfile,
-+ "/", sizeof targetfile);
-+ (void) sm_strlcat(targetfile, filename,
-+ sizeof targetfile);
-+ }
- }
- else if (mailer->m_rootdir != NULL)
- {
-@@ -5388,6 +5394,9 @@
-
- if (realfile != targetfile)
- {
-+ char save;
-+
-+ save = *realfile;
- *realfile = '\0';
- if (tTd(11, 20))
- sm_dprintf("mailfile: chroot %s\n", targetfile);
-@@ -5397,7 +5406,7 @@
- targetfile);
- RETURN(EX_CANTCREAT);
- }
-- *realfile = '/';
-+ *realfile = save;
- }
-
- if (tTd(11, 40))
---- sendmail/readcf.c 2002/01/30 19:56:37 8.595
-+++ sendmail/readcf.c 2002/02/04 23:32:05
-@@ -2950,6 +2950,17 @@
- break;
-
- case O_SAFEFILEENV: /* chroot() environ for writing to files */
-+ if (*val == '\0')
-+ break;
-+
-+ /* strip trailing slashes */
-+ p = val + strlen(val) - 1;
-+ while (p >= val && *p == '/')
-+ *p-- = '\0';
-+
-+ if (*val == '\0')
-+ break;
-+
- SafeFileEnv = newstr(val);
- break;
-
-
diff --git a/mail/sendmail812/files/patch-sendmail-milter.c b/mail/sendmail812/files/patch-sendmail-milter.c
deleted file mode 100644
index 3c56506b00c1..000000000000
--- a/mail/sendmail812/files/patch-sendmail-milter.c
+++ /dev/null
@@ -1,39 +0,0 @@
-Sendmail 8.12.x
-
-The MTA may erroneously detect a communication failure with libmilter
-(EINTR in select(2)). [ http://www.sendmail.org/~ca/email/sm-812.html ]
-
-Index: milter.c
-===================================================================
-RCS file: /cvs/sendmail/milter.c,v
-retrieving revision 8.187
-retrieving revision 8.188
-diff -u -r8.187 -r8.188
---- sendmail/milter.c 2002/01/19 00:48:57 8.187
-+++ sendmail/milter.c 2002/01/21 04:07:02 8.188
-@@ -139,14 +139,17 @@
- return NULL; \
- } \
- \
-- FD_ZERO(&fds); \
-- SM_FD_SET(m->mf_sock, &fds); \
-- tv.tv_sec = (secs); \
-- tv.tv_usec = 0; \
-- ret = select(m->mf_sock + 1, \
-- (write) ? NULL : &fds, \
-- (write) ? &fds : NULL, \
-- NULL, &tv); \
-+ do \
-+ { \
-+ FD_ZERO(&fds); \
-+ SM_FD_SET(m->mf_sock, &fds); \
-+ tv.tv_sec = (secs); \
-+ tv.tv_usec = 0; \
-+ ret = select(m->mf_sock + 1, \
-+ (write) ? NULL : &fds, \
-+ (write) ? &fds : NULL, \
-+ NULL, &tv); \
-+ } while (ret < 0 && errno == EINTR); \
- \
- switch (ret) \
- { \
diff --git a/mail/sendmail812/files/pkg-milter b/mail/sendmail812/files/pkg-milter
index f966f52e34a7..7e4bab67915c 100644
--- a/mail/sendmail812/files/pkg-milter
+++ b/mail/sendmail812/files/pkg-milter
@@ -28,6 +28,7 @@ lib/libsmdb.a
%%PORTDOCS%%share/doc/sendmail/libmilter/smfi_main.html
%%PORTDOCS%%share/doc/sendmail/libmilter/smfi_register.html
%%PORTDOCS%%share/doc/sendmail/libmilter/smfi_replacebody.html
+%%PORTDOCS%%share/doc/sendmail/libmilter/smfi_setbacklog.html
%%PORTDOCS%%share/doc/sendmail/libmilter/smfi_setconn.html
%%PORTDOCS%%share/doc/sendmail/libmilter/smfi_setpriv.html
%%PORTDOCS%%share/doc/sendmail/libmilter/smfi_setreply.html
diff --git a/mail/sendmail812/files/sendmail.sh b/mail/sendmail812/files/sendmail.sh
new file mode 100644
index 000000000000..a3f82d76ded7
--- /dev/null
+++ b/mail/sendmail812/files/sendmail.sh
@@ -0,0 +1,58 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+if ! test -x %%PREFIX%%/sbin/sendmail
+then
+ exit 0
+fi
+#
+case "$1" in
+start)
+ # If there is a global system configuration file, suck it in.
+ #
+ if [ -r /etc/defaults/rc.conf ]; then
+ . /etc/defaults/rc.conf
+ source_rc_confs
+ elif [ -r /etc/rc.conf ]; then
+ . /etc/rc.conf
+ fi
+
+ # Flags to sendmail (as a server)
+ sendmail_flags="${sendmail_flags--L sm-mta -bd -q30m}"
+ # Flags for sendmail_msp_queue daemon.
+ sendmail_msp_queue_flags=\
+ "${sendmail_msp_queue_flags--L sm-msp-queue -Ac -q30m}"
+ #
+ %%PREFIX%%/sbin/sendmail ${sendmail_flags} &&
+ echo -n ' sendmail'
+ %%PREFIX%%/sbin/sendmail ${sendmail_msp_queue_flags} &&
+ echo -n ' sm-msp-queue'
+ ;;
+stop)
+ if test -e /var/run/sendmail.pid
+ then
+ kill `head -1 /var/run/sendmail.pid`
+ rm -f /var/run/sendmail.pid
+ fi
+ if test -e /var/spool/clientmqueue/sm-client.pid
+ then
+ kill `head -1 /var/spool/clientmqueue/sm-client.pid`
+ rm -f /var/spool/clientmqueue/sm-client.pid
+ fi
+ ;;
+restart)
+ if test -e /var/run/sendmail.pid
+ then
+ kill -1 `head -1 /var/run/sendmail.pid`
+ fi
+ if test -e /var/spool/clientmqueue/sm-client.pid
+ then
+ kill -1 `head -1 /var/spool/clientmqueue/sm-client.pid`
+ fi
+ ;;
+*)
+ echo "Usage: ${0##*/}: { start | stop | restart }" 2>&1
+ exit 65
+ ;;
+esac
diff --git a/mail/sendmail812/files/sm-client.sh b/mail/sendmail812/files/sm-client.sh
index 280dc55ff2e5..6e5429c29303 100644
--- a/mail/sendmail812/files/sm-client.sh
+++ b/mail/sendmail812/files/sm-client.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $FreeBSD: /tmp/pcvs/ports/mail/sendmail812/files/Attic/sm-client.sh,v 1.2 2002-03-17 18:00:07 dinoex Exp $
+# $FreeBSD: /tmp/pcvs/ports/mail/sendmail812/files/Attic/sm-client.sh,v 1.3 2002-04-06 08:17:34 dinoex Exp $
#
if ! test -x %%PREFIX%%/sbin/sendmail
then
@@ -12,11 +12,20 @@ start)
echo -n ' sm-msp-queue'
;;
stop)
- kill `head -1 /var/spool/clientmqueue/sm-client.pid`
- rm -f /var/spool/clientmqueue/sm-client.pid
+ if test -e /var/spool/clientmqueue/sm-client.pid
+ then
+ kill `head -1 /var/spool/clientmqueue/sm-client.pid`
+ rm -f /var/spool/clientmqueue/sm-client.pid
+ fi
+ ;;
+restart)
+ if test -e /var/spool/clientmqueue/sm-client.pid
+ then
+ kill -1 `head -1 /var/spool/clientmqueue/sm-client.pid`
+ fi
;;
*)
- echo "Usage: ${0##*/}: { start | stop }" 2>&1
+ echo "Usage: ${0##*/}: { start | stop | restart }" 2>&1
exit 65
;;
esac