aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2005-03-09 13:38:44 +0800
committerdinoex <dinoex@FreeBSD.org>2005-03-09 13:38:44 +0800
commit5eb31c97c65dfa2a1624bb9b4e3bb896c30f2b5a (patch)
tree639dd4e5b843446d1daf21fbf8c782c28f52b23f /mail
parent170df5bc1fef4bda9ec69951e1460975d2139a9e (diff)
downloadfreebsd-ports-gnome-5eb31c97c65dfa2a1624bb9b4e3bb896c30f2b5a.tar.gz
freebsd-ports-gnome-5eb31c97c65dfa2a1624bb9b4e3bb896c30f2b5a.tar.zst
freebsd-ports-gnome-5eb31c97c65dfa2a1624bb9b4e3bb896c30f2b5a.zip
open source implementation of the Sender ID specification as defined
by the Internet Engineering Task Force's (IETF) MARID Working Group (Mail Authorization Records in DNS). sid-milter implements the -core and -protocol specifications. Additionally, sid-milter implements the "SPF Classic" record protocol (v=spf1) as defined by the SPF community. WWW: http://sendmail.net/sid-milter/
Diffstat (limited to 'mail')
-rw-r--r--mail/Makefile1
-rw-r--r--mail/sid-milter/Makefile82
-rw-r--r--mail/sid-milter/distinfo2
-rw-r--r--mail/sid-milter/files/milter-sid.sh48
-rw-r--r--mail/sid-milter/files/patch-sid-filter.c123
-rw-r--r--mail/sid-milter/files/site.config.m46
-rw-r--r--mail/sid-milter/files/site.config.m4.milter2
-rw-r--r--mail/sid-milter/pkg-descr9
-rw-r--r--mail/sid-milter/pkg-plist11
9 files changed, 284 insertions, 0 deletions
diff --git a/mail/Makefile b/mail/Makefile
index 34419b676fc2..7c0a4ce5f83b 100644
--- a/mail/Makefile
+++ b/mail/Makefile
@@ -426,6 +426,7 @@
SUBDIR += sendmail812
SUBDIR += sentinel
SUBDIR += serialmail
+ SUBDIR += sid-milter
SUBDIR += sigit
SUBDIR += sigrot
SUBDIR += silkymail
diff --git a/mail/sid-milter/Makefile b/mail/sid-milter/Makefile
new file mode 100644
index 000000000000..e18e79a6ae5c
--- /dev/null
+++ b/mail/sid-milter/Makefile
@@ -0,0 +1,82 @@
+# New ports collection makefile for: sid-milter
+# Date created: 18. Dec 2004
+# Whom: dirk.meyer@dinoex.sub.org
+#
+# $FreeBSD$
+#
+
+PORTNAME= sid-milter
+PORTVERSION= 0.2.5
+CATEGORIES= mail
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= sid-milter
+
+MAINTAINER= dinoex@FreeBSD.org
+COMMENT= An sid and spf milter for Sendmail
+
+.if !defined(SENDMAIL_MILTER_IN_BASE)
+.if defined(SENDMAIL_WITH_SHARED_MILTER)
+LIB_DEPENDS+= milter.3:${PORTSDIR}/mail/${SENDMAIL_MILTER_PORT}
+.else
+BUILD_DEPENDS+= ${LOCALBASE}/lib/libmilter.a:${PORTSDIR}/mail/${SENDMAIL_MILTER_PORT}
+.endif
+.endif
+
+RESTRICTED= may incorporate intellectual property, possible patent issues
+
+SENDMAIL_MILTER_PORT?= sendmail
+USE_REINPLACE= yes
+MAKE_ENV+= LDFLAGS="${LDFLAGS}"
+WCONF= ${WRKSRC}/devtools/Site
+MAN3= ar.3
+MAN8= sid-filter.8
+INCFILES= libar/ar.h
+DOCSFILES= INSTALL KNOWNBUGS LICENSE README README-SenderID RELEASE_NOTES
+
+SITE+= ${FILESDIR}/site.config.m4
+.if !defined(SENDMAIL_MILTER_IN_BASE)
+SITE+= ${FILESDIR}/site.config.m4.milter
+.endif
+
+.include <bsd.port.pre.mk>
+
+.if defined(SENDMAIL_WITHOUT_MILTER)
+pre-fetch:
+ @${ECHO_MSG}
+ @${ECHO_MSG} You must unset variable SENDMAIL_WITHOUT_MILTER,
+ @${ECHO_MSG} and rebuild sendmail in the ports
+ @${FALSE}
+.endif
+
+pre-configure:
+ @${SED} -e "s=%%PREFIX%%=${PREFIX}=" ${FILESDIR}/milter-sid.sh \
+ > ${WRKSRC}/milter-sid.sh
+ ${REINPLACE_CMD} -e 's|-pthread|${PTHREAD_LIBS}|' \
+ -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
+ ${WRKSRC}/devtools/OS/FreeBSD
+ ${SED} -e "s|%%PREFIX%%|${PREFIX}|g" \
+ -e "s|%%LOCALBASE%%|${LOCALBASE}|g" \
+ ${SITE} > ${WCONF}/site.config.m4
+
+post-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/milter-sid.sh \
+ ${PREFIX}/etc/rc.d/milter-sid.sh.sample
+.for i in ${MAN3}
+ @${RM} -f ${MANPREFIX}/man/cat3/${i} ${MANPREFIX}/man/cat3/${i}.gz
+ ${INSTALL_MAN} ${WRKSRC}/*/${i} ${MANPREFIX}/man/man3/
+.endfor
+.for i in ${MAN8}
+ @${RM} -f ${MANPREFIX}/man/cat8/${i} ${MANPREFIX}/man/cat8/${i}.gz
+ ${INSTALL_MAN} ${WRKSRC}/*/${i} ${MANPREFIX}/man/man8/
+.endfor
+.for i in ${INCFILES}
+ ${INSTALL_DATA} ${WRKSRC}/${i} ${PREFIX}/include/
+.endfor
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+.for i in ${DOCSFILES}
+ ${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}/
+.endfor
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/mail/sid-milter/distinfo b/mail/sid-milter/distinfo
new file mode 100644
index 000000000000..3010502cdc80
--- /dev/null
+++ b/mail/sid-milter/distinfo
@@ -0,0 +1,2 @@
+MD5 (sid-milter-0.2.5.tar.gz) = e258571b141242a77f6d567938e173dc
+SIZE (sid-milter-0.2.5.tar.gz) = 283159
diff --git a/mail/sid-milter/files/milter-sid.sh b/mail/sid-milter/files/milter-sid.sh
new file mode 100644
index 000000000000..a644fca5fee9
--- /dev/null
+++ b/mail/sid-milter/files/milter-sid.sh
@@ -0,0 +1,48 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+if ! test -x %%PREFIX%%/libexec/sid-filter
+then
+ exit 0
+fi
+sid_filter_args="-t -r 0"
+case "$1" in
+start)
+ cd /root
+ sh "${0}" wait
+ rm -f /var/run/sid-filter.pid /var/run/sid-filter
+ %%PREFIX%%/libexec/sid-filter -l -p local:/var/run/sid-filter \
+ -P /var/run/sid-filter.pid ${sid_filter_args}
+ echo -n ' sid-filter'
+ ;;
+stop)
+ if test -r /var/run/sid-filter.pid
+ then
+ kill `head -1 /var/run/sid-filter.pid`
+ else
+ echo " sid-filter: not running" 2>&1
+ fi
+ sh "${0}" wait
+ rm -f /var/run/sid-filter.pid
+ ;;
+wait)
+ while ps -ax -o pid,command | fgrep sid-filter
+ do
+ echo "please wait"
+ sleep 1
+ done
+ ;;
+reload)
+ if test -r /var/run/sid-filter.pid
+ then
+ kill -USR1 `head -1 /var/run/sid-filter.pid`
+ else
+ echo " sid-filter: not running" 2>&1
+ fi
+ ;;
+*)
+ echo "Usage: ${0##*/}: { start | stop | reload }" >&2
+ exit 64
+ ;;
+esac
diff --git a/mail/sid-milter/files/patch-sid-filter.c b/mail/sid-milter/files/patch-sid-filter.c
new file mode 100644
index 000000000000..cde26c1af3ff
--- /dev/null
+++ b/mail/sid-milter/files/patch-sid-filter.c
@@ -0,0 +1,123 @@
+--- sid-filter/sid-filter.c.orig Fri Dec 3 01:06:22 2004
++++ sid-filter/sid-filter.c Sat Dec 18 22:08:31 2004
+@@ -857,7 +857,7 @@
+ if (dolog)
+ {
+ syslog(LOG_ERR,
+- "%s DNS reply garbled (%d %s)",
++ "%s DNS reply garbled expand1 (%d %s)",
+ sic->ctx_jobid, type, dd);
+ }
+
+@@ -876,8 +876,11 @@
+ if (dolog)
+ {
+ syslog(LOG_ERR,
+- "%s DNS reply garbled (%d %s)",
++ "%s DNS reply garbled type1 (%d %s)",
+ sic->ctx_jobid, type, dd);
++ syslog(LOG_ERR,
++ "rtype=%d, type=%d, class=%d, expected=%d",
++ rtype, type, class, (int)C_IN);
+ }
+
+ return -1;
+@@ -905,7 +908,7 @@
+ if (dolog)
+ {
+ syslog(LOG_ERR,
+- "%s DNS reply garbled (%d %s)",
++ "%s DNS reply garbled expand2 (%d %s)",
+ sic->ctx_jobid, type, dd);
+ }
+
+@@ -918,7 +921,7 @@
+ if (dolog)
+ {
+ syslog(LOG_ERR,
+- "%s DNS reply garbled (%d %s)",
++ "%s DNS reply garbled cp1 (%d %s)",
+ sic->ctx_jobid, type, dd);
+ }
+
+@@ -932,7 +935,7 @@
+ if (dolog)
+ {
+ syslog(LOG_ERR,
+- "%s DNS reply garbled (%d %s)",
++ "%s DNS reply garbled type2 (%d %s)",
+ sic->ctx_jobid, type, dd);
+ }
+
+@@ -948,7 +951,7 @@
+ if (dolog)
+ {
+ syslog(LOG_ERR,
+- "%s DNS reply garbled (%d %s)",
++ "%s DNS reply garbled cp2 (%d %s)",
+ sic->ctx_jobid, type, dd);
+ }
+
+@@ -961,7 +964,7 @@
+ if (dolog)
+ {
+ syslog(LOG_ERR,
+- "%s DNS reply garbled (%d %s)",
++ "%s DNS reply garbled cp3 (%d %s)",
+ sic->ctx_jobid, type, dd);
+ }
+
+@@ -999,7 +1002,7 @@
+ if (dolog)
+ {
+ syslog(LOG_ERR,
+- "%s DNS reply garbled (%d %s)",
++ "%s DNS reply garbled mx (%d %s)",
+ sic->ctx_jobid, type,
+ dd);
+ }
+@@ -1018,7 +1021,7 @@
+ if (dolog)
+ {
+ syslog(LOG_ERR,
+- "%s DNS reply garbled (%d %s)",
++ "%s DNS reply garbled mx expand (%d %s)",
+ sic->ctx_jobid, type,
+ dd);
+ }
+@@ -1047,7 +1050,7 @@
+ if (dolog)
+ {
+ syslog(LOG_ERR,
+- "%s DNS reply garbled (%d %s)",
++ "%s DNS reply garbled ptr (%d %s)",
+ sic->ctx_jobid, type,
+ dd);
+ }
+@@ -1073,7 +1076,7 @@
+ /* sort MX list */
+ for (n = 0; n < nmx; n++)
+ {
+- if (prec[n] > prec[n + 1])
++ if ((n + 1 < nmx) && prec[n] > prec[n + 1])
+ {
+ m = prec[n];
+ prec[n] = prec[n + 1];
+@@ -1772,7 +1775,7 @@
+ }
+
+ sid_msgcleanup(ctx);
+- return SMFIS_TEMPFAIL;
++ return (testmode ? SMFIS_ACCEPT : SMFIS_TEMPFAIL);
+ }
+
+ /* construct the status header's content */
+@@ -1801,7 +1804,7 @@
+ }
+
+ sid_msgcleanup(ctx);
+- return SMFIS_TEMPFAIL;
++ return (testmode ? SMFIS_ACCEPT : SMFIS_TEMPFAIL);
+ }
+
+ sm_strlcat(stathdr, "; spf=", sizeof stathdr);
diff --git a/mail/sid-milter/files/site.config.m4 b/mail/sid-milter/files/site.config.m4
new file mode 100644
index 000000000000..27e89c0c22a6
--- /dev/null
+++ b/mail/sid-milter/files/site.config.m4
@@ -0,0 +1,6 @@
+define(`confEBINDIR',`%%PREFIX%%/libexec')
+define(`confMANROOT',`%%PREFIX%%/man/man')
+define(`confMANROOTMAN',`%%PREFIX%%/man/man')
+define(`confUBINDIR',`%%PREFIX%%/libexec')
+define(`confLIBDIR',`%%PREFIX%%/lib')
+define(`confDONT_INSTALL_CATMAN',`True')
diff --git a/mail/sid-milter/files/site.config.m4.milter b/mail/sid-milter/files/site.config.m4.milter
new file mode 100644
index 000000000000..b02c20ecfe0a
--- /dev/null
+++ b/mail/sid-milter/files/site.config.m4.milter
@@ -0,0 +1,2 @@
+APPENDDEF(`confENVDEF',`-I%%LOCALBASE%%/include')
+APPENDDEF(`confLIBDIRS', `-L%%LOCALBASE%%/lib')
diff --git a/mail/sid-milter/pkg-descr b/mail/sid-milter/pkg-descr
new file mode 100644
index 000000000000..546cfc764c18
--- /dev/null
+++ b/mail/sid-milter/pkg-descr
@@ -0,0 +1,9 @@
+open source implementation of the Sender ID specification as defined
+by the Internet Engineering Task Force's (IETF) MARID Working Group
+(Mail Authorization Records in DNS).
+
+sid-milter implements the -core and -protocol specifications.
+Additionally, sid-milter implements the "SPF Classic" record protocol
+(v=spf1) as defined by the SPF community.
+
+WWW: http://sendmail.net/sid-milter/
diff --git a/mail/sid-milter/pkg-plist b/mail/sid-milter/pkg-plist
new file mode 100644
index 000000000000..7ba07ab13438
--- /dev/null
+++ b/mail/sid-milter/pkg-plist
@@ -0,0 +1,11 @@
+etc/rc.d/milter-sid.sh.sample
+include/ar.h
+lib/libar.a
+libexec/sid-filter
+%%PORTDOCS%%%%DOCSDIR%%/INSTALL
+%%PORTDOCS%%%%DOCSDIR%%/KNOWNBUGS
+%%PORTDOCS%%%%DOCSDIR%%/LICENSE
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%%%DOCSDIR%%/README-SenderID
+%%PORTDOCS%%%%DOCSDIR%%/RELEASE_NOTES
+%%PORTDOCS%%@dirrm %%DOCSDIR%%