Index: head/mail/spamilter/Makefile =================================================================== --- head/mail/spamilter/Makefile (revision 459030) +++ head/mail/spamilter/Makefile (revision 459031) @@ -1,77 +1,77 @@ # $FreeBSD$ PORTNAME= spamilter PORTVERSION= 0.60 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= mail MASTER_SITES= http://www.wanlink.com/spamilter/download/ MAINTAINER= dinoex@FreeBSD.org COMMENT= Sendmail LibMilter filter to block spam LICENSE= BSD4CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE USES= tar:tgz shebangfix fakeroot HAS_CONFIGURE= yes CONFIGURE_ARGS= --have-resn USE_RC_SUBR= spamilter LDFLAGS+= -lpthread MAKE_ENV+= __MAKE_CONF=/dev/null BINFILES= spamilter-system-report spamilter-user-report SHEBANG_FILES= ${BINFILES} DOCSFILES= Changelog INSTALL LICENSE docs/docs.html docs/docs.txt \ conf/db.rcpt conf/db.rdnsbl conf/db.sndr \ conf/policy.html conf/spamilter.rc PLIST_FILES+= bin/dnsblchk bin/dnsblupd bin/ipfwmtad bin/mxlookup \ bin/spamilter \ bin/spamilter-system-report bin/spamilter-user-report PORTDOCS= Changelog INSTALL LICENSE docs.html docs.txt db.rcpt \ db.rdnsbl db.sndr policy.html spamilter.rc OPTIONS_DEFINE= SMTP_AFTER_POP3 PAM LIBSPF DOCS SMTP_AFTER_POP3_DESC= SMTP after POP3 LIBSPF_DESC= build with libspf SMTP_AFTER_POP3_CONFIGURE_ON= --with-popauth PAM_CONFIGURE_ON= --with-pam LIBSPF_BUILD_DEPENDS= ${LOCALBASE}/lib/libspf.a:mail/libspf LIBSPF_CONFIGURE_ON= --with-libspf ${LOCALBASE} LIBSPF_CFLAGS= -I${LOCALBASE}/include LIBSPF_LDFLAGS= -L${LOCALBASE}/lib .include .include "${PORTSDIR}/mail/sendmail/bsd.milter.mk" .if defined(WITH_SENDMAIL_PORT) CONFIGURE_ARGS+= --sendmail-dir "${LOCALBASE}" .else CONFIGURE_ARGS+= --sendmail-dir "/usr" .endif post-extract: ${MV} ${WRKDIR}/${PORTNAME} ${WRKSRC} pre-configure: ${REINPLACE_CMD} \ -e "s=/etc/spamilter.rc=${PREFIX}/etc/spamilter.rc=" \ ${WRKSRC}/spamilter.c \ ${WRKSRC}/docs/docs.html ${WRKSRC}/docs/docs.txt ${REINPLACE_CMD} \ -e "s=/usr/local/=${PREFIX}/=" \ ${WRKSRC}/Makefile.tmpl post-install: .for i in ${BINFILES} ${INSTALL_SCRIPT} ${WRKSRC}/${i} ${STAGEDIR}${PREFIX}/bin/ .endfor post-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${DOCSFILES:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}/ .include Index: head/mail/spamilter/files/patch-dns.c =================================================================== --- head/mail/spamilter/files/patch-dns.c (nonexistent) +++ head/mail/spamilter/files/patch-dns.c (revision 459031) @@ -0,0 +1,60 @@ +--- dns.c.orig 2005-07-17 19:55:13.000000000 -0500 ++++ dns.c 2015-01-21 13:58:59.000000000 -0600 +@@ -58,25 +58,48 @@ + + int dns_query_rr_a(const res_state statp, char *fmt, ...) + { va_list vl; +- int x,rc = 0; +- char *hn = NULL; ++ int x, haveRR = 0; ++ char *hostName = NULL; + + va_start(vl,fmt); + if(fmt != NULL && *fmt) + { +- x = vasprintf(&hn,fmt,vl); +- if(hn != NULL && x > 0) +- { u_char packet[NS_PACKETSZ]; ++ x = vasprintf(&hostName,fmt,vl); ++ if(hostName != NULL && x > 0) ++ { u_char ns_packet[NS_PACKETSZ]; + +- rc = (res_nquery(statp, hn,ns_c_in,ns_t_a,packet,sizeof(packet)) == -1 ? 0 : 1); ++ haveRR = (res_nquery(statp, hostName, ns_c_in, ns_t_a, ns_packet, sizeof(ns_packet)) == -1 ? 0 : 1); + } + +- if(hn != NULL) +- free(hn); ++ if(hostName != NULL) ++ free(hostName); + } + va_end(vl); + +- return(rc); ++ return haveRR; ++} ++ ++int dns_query_rr_aaaa(const res_state statp, char *fmt, ...) ++{ va_list vl; ++ int x, haveRR = 0; ++ char *hostName = NULL; ++ ++ va_start(vl,fmt); ++ if(fmt != NULL && *fmt) ++ { ++ x = vasprintf(&hostName,fmt,vl); ++ if(hostName != NULL && x > 0) ++ { u_char ns_packet[NS_PACKETSZ]; ++ ++ haveRR = (res_nquery(statp, hostName, ns_c_in, ns_t_aaaa, ns_packet, sizeof(ns_packet)) == -1 ? 0 : 1); ++ } ++ ++ if(hostName != NULL) ++ free(hostName); ++ } ++ va_end(vl); ++ ++ return haveRR; + } + + int dns_rdnsbl_has_rr_a(const res_state statp, long ip, char *domain) Property changes on: head/mail/spamilter/files/patch-dns.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/mail/spamilter/files/patch-dns.h =================================================================== --- head/mail/spamilter/files/patch-dns.h (nonexistent) +++ head/mail/spamilter/files/patch-dns.h (revision 459031) @@ -0,0 +1,11 @@ +--- dns.h.orig 2004-11-25 18:13:49.000000000 -0600 ++++ dns.h 2015-01-21 14:06:33.000000000 -0600 +@@ -47,6 +47,8 @@ + + #define mkip(a,b,c,d) ((((a)&0xff)<<24)|(((b)&0xff)<<16)|(((c)&0xff)<<8)|((d)&0xff)) + ++ int dns_query_rr_aaaa(const res_state statp, char *fmt, ...); ++ + int dns_query_rr_a(const res_state statp, char *fmt, ...); + int dns_rdnsbl_has_rr_a(const res_state statp, long ip, char *domain); + Property changes on: head/mail/spamilter/files/patch-dns.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/mail/spamilter/files/patch-hndlrs.c =================================================================== --- head/mail/spamilter/files/patch-hndlrs.c (nonexistent) +++ head/mail/spamilter/files/patch-hndlrs.c (revision 459031) @@ -0,0 +1,15 @@ +--- hndlrs.c.orig 2005-07-17 19:55:13.000000000 -0500 ++++ hndlrs.c 2015-01-21 14:47:27.000000000 -0600 +@@ -466,7 +466,11 @@ + if(gMtaHostIpfw) + mlfi_MtaHostIpfwAction(priv->ipstr,"add"); + } +- else if(gMtaHostChk && !priv->islocalnethost && !dns_query_rr_a(priv->statp,priv->helo)) ++ else if(gMtaHostChk ++ && !priv->islocalnethost ++ && !dns_query_rr_a(priv->statp,priv->helo) ++ && !dns_query_rr_aaaa(priv->statp,priv->helo) ++ ) + { + mlfi_setreply(ctx,550,"5.7.1","Rejecting due to security policy - Invalid hostname '%s', Please see: %s#invalidhostname",priv->helo,gPolicyUrl); + mlfi_debug("envrcpt: Invalid MTA hostname '%s'\n",priv->helo); Property changes on: head/mail/spamilter/files/patch-hndlrs.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property