Completing repo-copy of mail/libspf2 to mail/libspf2-10.

PR:		85000
Submitted by:	Marcus Grando <marcus@corp.grupos.com.br>
Repocopy by:	marcus
This commit is contained in:
Vsevolod Stakhov 2005-09-11 21:26:39 +00:00
parent 45f028b6b2
commit 6db9e66f7a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=142475
15 changed files with 242 additions and 18 deletions

View file

@ -157,6 +157,7 @@
SUBDIR += libspf
SUBDIR += libspf-alt
SUBDIR += libspf2
SUBDIR += libspf2-10
SUBDIR += libsrs
SUBDIR += libsrs2
SUBDIR += listmanager

View file

@ -14,6 +14,8 @@ MASTER_SITE_SUBDIR= spf
MAINTAINER= mail-libspf2-freebsd-ports@snowchyld.org
COMMENT= Sender Rewriting Scheme 2 C Implementation
CONFLICTS= ${PORTNAME}-1.2.*
INSTALLS_SHLIB= yes
GNU_CONFIGURE= yes
USE_LIBTOOL_VER= 15

View file

@ -1,6 +1,10 @@
libsrs2 is the next generation SRS library from the original designer of SRS.
It implements the Sender Rewriting Scheme, a part of the SPF/SRS protocol pair.
libspf2 implements the Sender Policy Framework, a part of the SPF/SRS
protocol pair. libspf2 is a library which allows email systems such as
Sendmail, Postfix, Exim, Zmailer and MS Exchange to check SPF records
and make sure that the email is authorized by the domain name that it
is coming from. This prevents email forgery, commonly used by spammers,
scammers and email viruses/worms.
WWW: http://www.libsrs2.org/
- snowchyld
<mail-libsrs2-freebsd-ports@snowchyld.org>
WWW: http://www.libspf2.org/
snowchyld <mail-libsrs2-freebsd-ports@snowchyld.org>

View file

@ -6,16 +6,18 @@
#
PORTNAME= libspf2
PORTVERSION= 1.0.4
PORTVERSION= 1.2.5
CATEGORIES= mail
MASTER_SITES= http://www.libspf2.org/%SUBDIR%/
MASTER_SITE_SUBDIR= spf
MAINTAINER= mail-libspf2-freebsd-ports@snowchyld.org
MAINTAINER= marcus@corp.grupos.com.br
COMMENT= Sender Rewriting Scheme 2 C Implementation
CONFLICTS= ${PORTNAME}-1.0.*
INSTALLS_SHLIB= yes
GNU_CONFIGURE= yes
HAS_CONFIGURE= yes
USE_LIBTOOL_VER= 15
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}

View file

@ -1,2 +1,2 @@
MD5 (libspf2-1.0.4.tar.gz) = 5fe69ba13bf35d505b733247032a8a64
SIZE (libspf2-1.0.4.tar.gz) = 427613
MD5 (libspf2-1.2.5.tar.gz) = 06ed6a3b0b54c8590679315ae2d28ad9
SIZE (libspf2-1.2.5.tar.gz) = 517945

View file

@ -0,0 +1,54 @@
--- configure.orig Wed Feb 23 23:14:51 2005
+++ configure Thu Jul 28 20:12:32 2005
@@ -19332,10 +19332,10 @@
# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+LIBTOOL_DEPS="--disable-ltlibs /usr/local/share/libtool15/ltmain.sh"
# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+LIBTOOL='$(SHELL) /usr/local/bin/libtool15'
# Prevent multiple expansion
@@ -22349,13 +22349,13 @@
fi
-echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
-echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking for pthread_create in -pthread" >&5
+echo $ECHO_N "checking for pthread_create in -pthread... $ECHO_C" >&6
if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread $LIBS"
+LIBS="-pthread $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -22418,7 +22418,7 @@
#define HAVE_LIBPTHREAD 1
_ACEOF
- LIBS="-lpthread $LIBS"
+ LIBS="-pthread $LIBS"
fi
@@ -23661,12 +23661,6 @@
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
- #ifdef HAVE_SYS_SOCKET_H
- # include <sys/socket.h> /* inet_ functions / structs */
- #endif
- #ifdef HAVE_NETINET_IN_H
- # include <netinet/in.h> /* inet_ functions / structs */
- #endif
#ifdef HAVE_ARPA_NAMESER_H
# include <arpa/nameser.h> /* DNS HEADER struct */
#endif

View file

@ -0,0 +1,10 @@
--- src/include/spf_server.h.orig Thu Jul 28 18:35:53 2005
+++ src/include/spf_server.h Thu Jul 28 18:35:59 2005
@@ -20,7 +20,6 @@
#include "spf_record.h"
#include "spf_dns.h"
-#include "spf_dns_internal.h"
#ifndef SPF_MAX_DNS_MECH
/* It is a bad idea to change this for two reasons.

View file

@ -0,0 +1,28 @@
--- src/libspf2/spf_dns_resolv.c.orig Wed Mar 2 22:59:01 2005
+++ src/libspf2/spf_dns_resolv.c Wed Mar 2 23:01:06 2005
@@ -77,7 +77,9 @@
static void
SPF_dns_resolv_thread_term(void *arg)
{
+#if HAVE_DECL_RES_NINIT
res_nclose( (struct __res_state *)arg );
+#endif
free(arg);
}
@@ -144,9 +146,15 @@
if (res_spec == NULL) {
res_state = (struct __res_state *)
malloc(sizeof(struct __res_state));
+#if HAVE_DECL_RES_NINIT
if (res_ninit(res_state) != 0) {
SPF_error("Failed to call res_ninit()");
}
+#else
+ if (res_init() != 0) {
+ SPF_error("Failed to call res_init()");
+ }
+#endif
pthread_setspecific(res_state_key, (void *)res_state);
}
else {

View file

@ -0,0 +1,11 @@
--- src/libspf2/spf_dns_rr.c.orig Thu Jul 28 18:40:13 2005
+++ src/libspf2/spf_dns_rr.c Thu Jul 28 18:40:29 2005
@@ -45,7 +45,7 @@
const char *domain)
{
return SPF_dns_rr_new_init(spf_dns_server,
- domain, ns_t_any, 0, NXDOMAIN);
+ domain, ns_t_any, 0, HOST_NOT_FOUND);
}
SPF_dns_rr_t *

View file

@ -0,0 +1,12 @@
--- src/libspf2/spf_request.c.orig Mon Feb 21 23:38:57 2005
+++ src/libspf2/spf_request.c Mon Mar 28 10:37:52 2005
@@ -307,6 +307,9 @@
char *record;
size_t len;
+ if ( (spf_request == NULL) || (rcpt_to == NULL) )
+ return SPF_E_INVALID_OPT;
+
SPF_ASSERT_NOTNULL(spf_request);
spf_server = spf_request->spf_server;
SPF_ASSERT_NOTNULL(spf_server);

View file

@ -0,0 +1,12 @@
--- src/libspf2/spf_response.c.orig Tue Oct 19 11:05:19 2004
+++ src/libspf2/spf_response.c Mon Mar 28 10:58:26 2005
@@ -132,6 +132,9 @@
SPF_result_t
SPF_response_result(SPF_response_t *rp)
{
+ if (rp == NULL)
+ return SPF_RESULT_NONE;
+
return rp->result;
}

View file

@ -0,0 +1,69 @@
--- src/spf_example/spf_example.c.orig Mon Mar 28 14:17:20 2005
+++ src/spf_example/spf_example.c Mon Mar 28 14:22:46 2005
@@ -90,17 +90,17 @@
"\n"
"Valid data options are:\n"
" -i <IP address> The IP address that is sending email\n"
- " -s <email address> The email address used as the\n"
- " envelope-from. If no username (local\n"
- " part) is given, 'postmaster' will be\n"
- " assumed.\n"
- " -r <email address> [optional] The email address used as\n"
- " the envelope-to email address, for\n"
- " secondary-MX checking.\n"
- " -h <domain name> The domain name given on the SMTP HELO\n"
- " command. This is only needed if the\n"
- " -sender option is not given.\n"
- " -d [debug level] debug level.\n"
+ " -s <email address> The email address used as the\n"
+ " envelope-from. If no username (local\n"
+ " part) is given, 'postmaster' will be\n"
+ " assumed.\n"
+ " -r <email address> [optional] The email address used as\n"
+ " the envelope-to email address, for\n"
+ " secondary-MX checking.\n"
+ " -h <domain name> The domain name given on the SMTP HELO\n"
+ " command. This is only needed if the\n"
+ " -sender option is not given.\n"
+ " -d [debug level] debug level.\n"
);
}
@@ -206,7 +206,7 @@
* destroyed when you are finished.
*/
- spf_server = SPF_server_new(SPF_DNS_CACHE, 1);
+ spf_server = SPF_server_new(SPF_DNS_CACHE, opt_debug);
if (spf_server == NULL) {
fprintf( stderr, "SPF_create_config failed.\n" );
@@ -264,10 +264,24 @@
* message.
*/
- if ( SPF_request_set_helo_dom( spf_request, opt_helo ) ) {
- printf( "Invalid HELO domain.\n" );
- res = 255;
- goto error;
+ if (opt_helo == NULL) {
+ if (opt_sender != NULL) {
+ if (strstr(opt_sender, "@") != NULL) {
+ opt_helo = strdup(strstr(opt_sender, "@") + 1);
+
+ if ( SPF_request_set_helo_dom( spf_request, opt_helo ) ) {
+ printf( "Invalid HELO domain.\n" );
+ res = 255;
+ goto error;
+ }
+ }
+ }
+ } else {
+ if ( SPF_request_set_helo_dom( spf_request, opt_helo ) ) {
+ printf( "Invalid HELO domain.\n" );
+ res = 255;
+ goto error;
+ }
}
/*

View file

@ -0,0 +1,11 @@
--- src/spfquery/spfquery.c.orig Thu Jul 28 19:04:46 2005
+++ src/spfquery/spfquery.c Thu Jul 28 19:04:54 2005
@@ -261,7 +261,7 @@
response_print_errors(const char *context,
SPF_response_t *spf_response, SPF_errcode_t err)
{
- SPF_error_t *spf_error;;
+ SPF_error_t *spf_error;
int i;
printf("StartError\n");

View file

@ -1,6 +1,10 @@
libsrs2 is the next generation SRS library from the original designer of SRS.
It implements the Sender Rewriting Scheme, a part of the SPF/SRS protocol pair.
libspf2 implements the Sender Policy Framework, a part of the SPF/SRS
protocol pair. libspf2 is a library which allows email systems such as
Sendmail, Postfix, Exim, Zmailer and MS Exchange to check SPF records
and make sure that the email is authorized by the domain name that it
is coming from. This prevents email forgery, commonly used by spammers,
scammers and email viruses/worms.
WWW: http://www.libsrs2.org/
- snowchyld
<mail-libsrs2-freebsd-ports@snowchyld.org>
WWW: http://www.libspf2.org/
snowchyld <mail-libsrs2-freebsd-ports@snowchyld.org>

View file

@ -1,6 +1,4 @@
bin/spf_example
bin/spf_example_2mx
bin/spf_example_2mx_static
bin/spf_example_static
bin/spfd
bin/spfd_static
@ -13,10 +11,16 @@ include/spf2/spf_dns.h
include/spf2/spf_dns_cache.h
include/spf2/spf_dns_null.h
include/spf2/spf_dns_resolv.h
include/spf2/spf_dns_rr.h
include/spf2/spf_dns_test.h
include/spf2/spf_dns_zone.h
include/spf2/spf_lib_version.h
include/spf2/spf_log.h
include/spf2/spf_record.h
include/spf2/spf_request.h
include/spf2/spf_response.h
include/spf2/spf_server.h
@dirrm include/spf2
lib/libspf2.a
lib/libspf2.so
lib/libspf2.so.1
lib/libspf2.so.2