aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MOVED1
-rw-r--r--mail/Makefile2
-rw-r--r--mail/policyd/Makefile37
-rw-r--r--mail/policyd/distinfo2
-rw-r--r--mail/policyd/files/patch-policyd.c106
-rw-r--r--mail/policyd/pkg-descr7
-rw-r--r--mail/postfix-policyd-spf/Makefile14
-rw-r--r--mail/postfix-policyd-spf/files/patch-Makefile.in13
-rw-r--r--mail/postfix-policyd-spf/files/pkg-message.in19
9 files changed, 46 insertions, 155 deletions
diff --git a/MOVED b/MOVED
index 9d6d0b420ab8..d6fa4bd91bbe 100644
--- a/MOVED
+++ b/MOVED
@@ -1455,3 +1455,4 @@ www/flashplugin-mozilla-devel|www/flashplugin-mozilla|2005-04-20|Merged with fla
www/flashplugin-firefox|www/flashplugin-mozilla|2005-04-20|Merged with flashplugin-mozilla
games/baduki||2005-04-21|Abandoned
www/opera-devel|www/opera|2005-04-21|stable version caught up with -devel
+mail/policyd|mail/postfix-policyd-spf|2005-04-24|port renamed
diff --git a/mail/Makefile b/mail/Makefile
index 46a23a1bfc8a..b12ccadd55da 100644
--- a/mail/Makefile
+++ b/mail/Makefile
@@ -339,7 +339,6 @@
SUBDIR += pine4
SUBDIR += pm-lib
SUBDIR += pmail
- SUBDIR += policyd
SUBDIR += pop-before-smtp
SUBDIR += pop3gwd
SUBDIR += pop3lite
@@ -358,6 +357,7 @@
SUBDIR += postfix
SUBDIR += postfix-current
SUBDIR += postfix-gps
+ SUBDIR += postfix-policyd-spf
SUBDIR += postfix1
SUBDIR += postfix21
SUBDIR += postfixadmin
diff --git a/mail/policyd/Makefile b/mail/policyd/Makefile
deleted file mode 100644
index 60d9fbeead20..000000000000
--- a/mail/policyd/Makefile
+++ /dev/null
@@ -1,37 +0,0 @@
-# New ports collection makefile for: policyd
-# Date created: 19 Dec 2004
-# Whom: Marcus Grando <marcus@corp.grupos.com.br>
-#
-# $FreeBSD$
-#
-
-PORTNAME= policyd
-PORTVERSION= 1.0.1
-PORTREVISION= 1
-CATEGORIES= mail
-MASTER_SITES= http://www.libspf2.org/patch/
-
-MAINTAINER= marcus@corp.grupos.com.br
-COMMENT= Implements SPF for postfix, as a policy daemon
-
-LIB_DEPENDS= spf2.1:${PORTSDIR}/mail/libspf2
-
-CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include"
-CONFIGURE_ENV+= CFLAGS="-I${LOCALBASE}/include"
-CONFIGURE_ENV+= LDFLAGS="-L${LOCALBASE}/lib"
-GNU_CONFIGURE= yes
-USE_GETOPT_LONG= yes
-
-PLIST_FILES= sbin/policyd
-
-.if !defined(NOPORTDOCS)
-PORTDOCS= *
-.endif
-
-post-install:
-.if !defined(NOPORTDOCS)
- @${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
-.endif
-
-.include <bsd.port.mk>
diff --git a/mail/policyd/distinfo b/mail/policyd/distinfo
deleted file mode 100644
index 13d18fbd357f..000000000000
--- a/mail/policyd/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-MD5 (policyd-1.0.1.tar.gz) = f356040a2eca5c56cf346b946be52e70
-SIZE (policyd-1.0.1.tar.gz) = 201134
diff --git a/mail/policyd/files/patch-policyd.c b/mail/policyd/files/patch-policyd.c
deleted file mode 100644
index 8b1068d69948..000000000000
--- a/mail/policyd/files/patch-policyd.c
+++ /dev/null
@@ -1,106 +0,0 @@
---- policyd.c.orig Thu Jul 8 18:42:25 2004
-+++ policyd.c Wed Dec 22 15:55:22 2004
-@@ -76,6 +76,7 @@
- char *localpolicy;
- char *explanation;
- int trustedforwarder;
-+ int softfailreject;
- int debug;
- } config_t;
-
-@@ -106,6 +107,7 @@
- static const struct option longopts[] = {
- { "localpolicy", required_argument, NULL, 'l', },
- { "trustedforwarder", no_argument, NULL, 't', },
-+ { "softfailreject", no_argument, NULL, 's', },
- { "explanation", required_argument, NULL, 'x', },
- { "debug", optional_argument, NULL, 'd', },
- { "help", no_argument, NULL, 'h', },
-@@ -119,7 +121,7 @@
- #else
- #define DOC_LONGOPT(l, v, t, p1) do { } while(0)
- #endif
--static const char *shortopts = "a:h";
-+static const char *shortopts = "l:x:d:tsh";
-
- #define DOC_OPT(s, l, v, t, p0, p1) do { \
- fprintf(stderr, " -%c%c%s%*s" t "\n", \
-@@ -137,10 +139,12 @@
- "Set the SPF local policy.", 21, 10);
- DOC_OPT('t', "trustedforwarder", NULL,
- "Use the trusted-forwarder.com whitelist.", 29, 13);
-+ DOC_OPT('s', "softfailreject", NULL,
-+ "Reject SOFTFAIL.", 29, 15);
- DOC_OPT('x', "explanation", "<explanation>",
- "Set the SPF explanation.", 16, 5);
-- DOC_OPT('d', "debug", "[<level>]",
-- "Set the debug level.", 20, 15);
-+ DOC_OPT('d', "debug", "<level>",
-+ "Set the debug level.", 22, 17);
- DOC_OPT('h', "help", NULL,
- "Display this help.", 29, 25);
- }
-@@ -249,7 +253,7 @@
- }
-
- static void
--process_request(request_t *req)
-+process_request(request_t *req, config_t *conf)
- {
- SPF_output_t output;
-
-@@ -287,6 +291,16 @@
- : ""));
- break;
- case SPF_RESULT_SOFTFAIL:
-+ if (conf->softfailreject == 1) {
-+ snprintf(req->result, RESULTSIZE,
-+ POSTFIX_REJECT " %s",
-+ (output.smtp_comment
-+ ? output.smtp_comment
-+ : (output.header_comment
-+ ? output.header_comment
-+ : "")));
-+ break;
-+ }
- case SPF_RESULT_NEUTRAL:
- case SPF_RESULT_UNKNOWN:
- case SPF_RESULT_NONE:
-@@ -315,6 +329,11 @@
- argv0 = argv[0];
-
-
-+ config.localpolicy = NULL;
-+ config.explanation = NULL;
-+ config.trustedforwarder = 0;
-+ config.softfailreject = 0;
-+ config.debug = 0;
- while ((c =
- #ifdef HAVE_GETOPT_LONG
- getopt_long(argc, argv, shortopts, longopts, &idx)
-@@ -329,12 +348,15 @@
- case 't':
- config.trustedforwarder = 1;
- break;
-+ case 's':
-+ config.softfailreject = 1;
-+ break;
- case 'x':
- config.explanation = optarg;
- break;
- case 'd':
- if (optarg)
-- config.debug = atol(optarg);
-+ config.debug = atoi(optarg);
- else
- config.debug = 1;
- break;
-@@ -366,7 +388,7 @@
- CHECK(req.client_ip, "client_address")
- else CHECK(req.sender_address, "sender")
- else CHECK(req.helo_address, "helo_name")
-- else process_request(&req);
-+ else process_request(&req, &config);
-
- req.result[RESULTSIZE - 1] = '\0';
- printf("action=%s\n\n", req.result);
diff --git a/mail/policyd/pkg-descr b/mail/policyd/pkg-descr
deleted file mode 100644
index 53010fa631e1..000000000000
--- a/mail/policyd/pkg-descr
+++ /dev/null
@@ -1,7 +0,0 @@
-This is a C port of Meng Wong's policyd for Postfix. The original
-code is available from http://spf.pobox.com/postfix-policyd.txt.
-It implements SPF for postfix, as a policy daemon.
-
-WWW: http://www.libspf2.org/
-
-Marcus Grando <marcus@corp.grupos.com.br>
diff --git a/mail/postfix-policyd-spf/Makefile b/mail/postfix-policyd-spf/Makefile
index 60d9fbeead20..8195f44ce5e1 100644
--- a/mail/postfix-policyd-spf/Makefile
+++ b/mail/postfix-policyd-spf/Makefile
@@ -10,19 +10,28 @@ PORTVERSION= 1.0.1
PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= http://www.libspf2.org/patch/
+PKGNAMEPREFIX= postfix-
+PKGNAMESUFFIX= -spf
MAINTAINER= marcus@corp.grupos.com.br
COMMENT= Implements SPF for postfix, as a policy daemon
LIB_DEPENDS= spf2.1:${PORTSDIR}/mail/libspf2
+CONFLICTS= policyd-1.*
+
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include"
CONFIGURE_ENV+= CFLAGS="-I${LOCALBASE}/include"
CONFIGURE_ENV+= LDFLAGS="-L${LOCALBASE}/lib"
GNU_CONFIGURE= yes
USE_GETOPT_LONG= yes
-PLIST_FILES= sbin/policyd
+PKGMESSAGE= ${WRKDIR}/pkg-message
+SUB_FILES= pkg-message
+
+PLIST_FILES= sbin/postfix-policyd-spf
+
+DOCSDIR= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}
.if !defined(NOPORTDOCS)
PORTDOCS= *
@@ -30,8 +39,9 @@ PORTDOCS= *
post-install:
.if !defined(NOPORTDOCS)
- @${MKDIR} ${DOCSDIR}
+ ${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
.endif
+ @${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>
diff --git a/mail/postfix-policyd-spf/files/patch-Makefile.in b/mail/postfix-policyd-spf/files/patch-Makefile.in
new file mode 100644
index 000000000000..7b187e2fcebe
--- /dev/null
+++ b/mail/postfix-policyd-spf/files/patch-Makefile.in
@@ -0,0 +1,13 @@
+--- Makefile.in.orig Mon Jun 28 13:59:26 2004
++++ Makefile.in Mon Apr 18 11:24:56 2005
+@@ -192,8 +192,8 @@
+ || test -f $$p1 \
+ ; then \
+ f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \
+- echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/$$f"; \
+- $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/$$f; \
++ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/postfix-policyd-spf"; \
++ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/postfix-policyd-spf; \
+ else :; fi; \
+ done
+
diff --git a/mail/postfix-policyd-spf/files/pkg-message.in b/mail/postfix-policyd-spf/files/pkg-message.in
new file mode 100644
index 000000000000..ba88a494399f
--- /dev/null
+++ b/mail/postfix-policyd-spf/files/pkg-message.in
@@ -0,0 +1,19 @@
+***
+*** NOTE: Now %%PREFIX%%/sbin/policyd has renamed to %%PREFIX%%/sbin/postfix-policyd-spf
+***
+
+To run this from %%PREFIX%%/etc/postfix/master.cf:
+
+policy unix - n n - - spawn
+ user=nobody argv=%%PREFIX%%/sbin/postfix-policyd-spf
+
+To use this from Postfix SMTPD, use in %%PREFIX%%/etc/postfix/main.cf:
+
+smtpd_recipient_restrictions = ...
+ reject_unknown_sender_domain
+ reject_unauth_destination
+ check_policy_service unix:private/policy
+ ...
+
+NOTE: specify check_policy_service AFTER reject_unauth_destination
+or else your system can become an open relay.