1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-08 06:48:28 +00:00

- Add DNS_CNAME option to switch from using ANY queries, which was a hack

added many years ago for BIND 4. Using CNAME avoids excessive data in
  DNS query responses and temporary failures.

  This was already applied in spamcontrol.

  See also:
    http://homepage.ntlworld.com./jonathan.deboynepollard/Softwares/qmail/
    https://www.google.com/#q=CNAME_lookup_failed_temporarily

Submitted by:	Matt Simerson <matt@tnpi.net>
This commit is contained in:
Bryan Drewery 2014-06-20 03:17:04 +00:00
parent 2e7fd29285
commit 79a2bb25a8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=358499
2 changed files with 27 additions and 1 deletions

View File

@ -3,7 +3,7 @@
PORTNAME= ${QMAIL_PORTNAME}
PORTVERSION?= ${QMAIL_VERSION}
PORTREVISION?= 0
PORTREVISION?= 1
CATEGORIES= mail
MASTER_SITES+= ${MASTER_SITE_QMAIL}
DISTNAME= ${PORTNAME}-${QMAIL_VERSION}
@ -50,6 +50,7 @@ CLEARTEXTPASSWD_DESC= Use cleartext passwords (Dangerous!)
DASH_EXT_DESC= Dash_ext extended mail addresses add
DATA_COMPRESS_DESC= Smtp on the fly DATA compression
DISCBOUNCES_PATCH_DESC= Discard double-bounces
DNS_CNAME_DESC= Request CNAME (vs ANY for BIND 4 bug)
ENHACELOGS_DESC= Enhace qmail-smtpd logs (spamcontrol-like)
EXTERNAL_TODO_DESC= External high-performance todo processing
EXTTODO_PATCH_DESC= Extern high-perform. todo processing
@ -96,6 +97,7 @@ QMAIL_VERSION= 1.06
BARRIER_SENDMAIL_F_PATCH= yes
BARRIER_QMAILQUEUE_PATCH= yes
.else
# This is only used for slave ports.
PORTNAME= qmail
QMAIL_VERSION= 1.03
.endif
@ -136,6 +138,10 @@ BARRIER_RFC2821_PATCH= yes
BARRIER_TARPIT_PATCH= yes
.endif
.if defined(SLAVE_SPAMCONTROL)
BARRIER_DNS_CNAME= yes
.endif
PATCH_DIST_STRIP+= -p1
.if !defined(BARRIER_DNS_PATCH)
@ -246,6 +252,11 @@ OPTIONS_DEFAULT+= TLSREMOTE PAM111421
OPTIONS_DEFINE+=QEXTRA
.if !defined(BARRIER_DNS_CNAME)
OPTIONS_DEFINE+= DNS_CNAME
OPTIONS_DEFAULT+= DNS_CNAME
.endif
.if !defined(SLAVE_LDAP)
OPTIONS_DEFINE+=RCDLINK
OPTIONS_DEFAULT+= RCDLINK
@ -513,6 +524,10 @@ PATCHFILES+= ext_todo-20030105.patch:exttodo
PLIST_SUB+= EXTTODO="@comment "
.endif
.if ${PORT_OPTIONS:MDNS_CNAME}
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-dns-cname
.endif
.if !defined(BARRIER_DNS_PATCH) \
|| !empty(PORT_OPTIONS:MQMAILQUEUE_PATCH) \
|| !empty(PORT_OPTIONS:MBIG_TODO_PATCH) \

View File

@ -0,0 +1,11 @@
--- dns.c Mon Jun 15 10:53:16 1998
+++ dns.c Wed Mar 5 11:31:13 2003
@@ -196,7 +196,7 @@
if (!sa->len) return loop;
if (sa->s[sa->len - 1] == ']') return loop;
if (sa->s[sa->len - 1] == '.') { --sa->len; continue; }
- switch(resolve(sa,T_ANY))
+ switch(resolve(sa,T_CNAME))
{
case DNS_MEM: return DNS_MEM;
case DNS_SOFT: return DNS_SOFT;