summaryrefslogtreecommitdiff
path: root/mail/gld
diff options
context:
space:
mode:
Diffstat (limited to 'mail/gld')
-rw-r--r--mail/gld/DESCR5
-rw-r--r--mail/gld/MESSAGE.mysql22
-rw-r--r--mail/gld/Makefile42
-rw-r--r--mail/gld/PLIST12
-rw-r--r--mail/gld/distinfo12
-rw-r--r--mail/gld/files/gld.sh34
-rw-r--r--mail/gld/options.mk28
-rw-r--r--mail/gld/patches/patch-aa36
-rw-r--r--mail/gld/patches/patch-ab33
-rw-r--r--mail/gld/patches/patch-ac81
-rw-r--r--mail/gld/patches/patch-ad65
-rw-r--r--mail/gld/patches/patch-ae95
-rw-r--r--mail/gld/patches/patch-af19
-rw-r--r--mail/gld/patches/patch-ag17
14 files changed, 0 insertions, 501 deletions
diff --git a/mail/gld/DESCR b/mail/gld/DESCR
deleted file mode 100644
index 0f3dfa4102e..00000000000
--- a/mail/gld/DESCR
+++ /dev/null
@@ -1,5 +0,0 @@
-Gld is a standalone greylisting daemon for Postfix. It listens on a TCP port
-and uses MySQL or PostgreSQL for storing its data.
-
-The server supports whitelists based on sender, sender_domain and client_ip.
-It also supports light greylisting and DNS whitelists.
diff --git a/mail/gld/MESSAGE.mysql b/mail/gld/MESSAGE.mysql
deleted file mode 100644
index 7692e02d80b..00000000000
--- a/mail/gld/MESSAGE.mysql
+++ /dev/null
@@ -1,22 +0,0 @@
-===========================================================================
-$NetBSD: MESSAGE.mysql,v 1.1 2006/03/02 20:54:08 wiz Exp $
-
-To configure gld, the following steps should be completed:
-
- $ mysql -e "create database gld"
- $ mysql -e "grant all on gld.* to gld@localhost identified by 'PASSWORD'"
- $ mysql gld < ${PREFIX}/share/gld/tables.mysql
-
-Modify "PASSWORD" with your desired password.
-
-Now edit your postfix's main.cf configuration file, and add the following
-line:
-
- smtpd_recipient_restrictions = permit_mynetworks,
- reject_unauth_destination,
- check_policy_service inet:127.0.0.1:2525
-
-Start gld via ${RCD_SCRIPTS_DIR}/gld start
-
-It should be running fine now; good luck!
-===========================================================================
diff --git a/mail/gld/Makefile b/mail/gld/Makefile
deleted file mode 100644
index 836530e4151..00000000000
--- a/mail/gld/Makefile
+++ /dev/null
@@ -1,42 +0,0 @@
-# $NetBSD: Makefile,v 1.21 2007/02/22 19:26:41 wiz Exp $
-#
-
-DISTNAME= gld-1.6
-PKGREVISION= 2
-CATEGORIES= mail
-MASTER_SITES= http://www.gasmi.net/down/
-EXTRACT_SUFX= .tgz
-
-MAINTAINER= pkgsrc-users@NetBSD.org
-HOMEPAGE= http://www.gasmi.net/
-COMMENT= Standalone greylisting server for Postfix
-
-GNU_CONFIGURE= yes
-
-LDFLAGS.SunOS+= -lsocket -lnsl -lresolv
-
-EGDIR= ${PREFIX}/share/examples/${PKGBASE}
-CONF_FILES_PERMS= ${EGDIR}/gld.conf ${PKG_SYSCONFDIR}/gld.conf \
- ${BINOWN} ${GLD_GROUP} 0640
-
-RCD_SCRIPTS= gld
-GLD_USER?= gld
-GLD_GROUP?= gld
-PKG_GROUPS= ${GLD_GROUP}
-PKG_USERS= ${GLD_USER}:${GLD_GROUP}
-PKG_GECOS.${GLD_USER}= Greylisting Daemon user
-BUILD_DEFS+= GLD_USER GLD_GROUP
-
-SUBST_CLASSES+= gld users
-SUBST_STAGE.gld= post-patch
-SUBST_FILES.gld= gld.h
-SUBST_SED.gld= -e "s,/etc,${PKG_SYSCONFDIR},"
-SUBST_MESSAGE.gld= Fixing harcoded paths.
-SUBST_STAGE.users= post-patch
-SUBST_FILES.users= gld.conf
-SUBST_SED.users+= -e "s|^USER=nobody|USER=${GLD_USER}|"
-SUBST_SED.users+= -e "s|^GROUP=nobody|GROUP=${GLD_GROUP}|"
-SUBST_MESSAGE.users= Adjusting user/group in configuration file.
-
-.include "options.mk"
-.include "../../mk/bsd.pkg.mk"
diff --git a/mail/gld/PLIST b/mail/gld/PLIST
deleted file mode 100644
index 5d8a3a42119..00000000000
--- a/mail/gld/PLIST
+++ /dev/null
@@ -1,12 +0,0 @@
-@comment $NetBSD: PLIST,v 1.3 2005/05/02 20:34:00 reed Exp $
-bin/gld
-share/doc/gld/LICENCE
-share/doc/gld/README
-share/examples/gld/gld.conf
-share/examples/rc.d/gld
-share/gld/table-whitelist.sql
-share/gld/tables.mysql
-share/gld/tables.pgsql
-@dirrm share/gld
-@dirrm share/examples/gld
-@dirrm share/doc/gld
diff --git a/mail/gld/distinfo b/mail/gld/distinfo
deleted file mode 100644
index aa9ce7a7d97..00000000000
--- a/mail/gld/distinfo
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: distinfo,v 1.13 2006/07/10 20:32:59 sketch Exp $
-
-SHA1 (gld-1.6.tgz) = 09a87119b376e370c63444e2bcd1111288b78267
-RMD160 (gld-1.6.tgz) = 72ff4363f3813f421e64e7644142cf227a43885d
-Size (gld-1.6.tgz) = 40333 bytes
-SHA1 (patch-aa) = 2dcd261ff37dc6ab8343060ad711d98427d10d7f
-SHA1 (patch-ab) = 9622bd744acd326a679e9c25007bffff9241dd2e
-SHA1 (patch-ac) = 876f896412a48d18c0ca314af59f82b4c9d915e2
-SHA1 (patch-ad) = 7d810a935677022953d01b7a146881d8cf86162b
-SHA1 (patch-ae) = e610e20acee890ae9a53eb84382fb1d741736bb3
-SHA1 (patch-af) = 9d5a06fa399963937fc8a0c94a80ac85528f872d
-SHA1 (patch-ag) = ef1b5acca6ba4cfc75ffd553624693b83b4f73ab
diff --git a/mail/gld/files/gld.sh b/mail/gld/files/gld.sh
deleted file mode 100644
index 852b78002c2..00000000000
--- a/mail/gld/files/gld.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!@RCD_SCRIPTS_SHELL@
-#
-# $NetBSD: gld.sh,v 1.5 2005/01/19 15:48:41 xtraeme Exp $
-#
-
-# PROVIDE: gld
-# BEFORE: mail
-# REQUIRE: DAEMON LOGIN mysqld
-
-. /etc/rc.subr
-
-name="gld"
-rcvar=$name
-command="@PREFIX@/bin/${name}"
-required_files="@PKG_SYSCONFDIR@/$name.conf"
-pidfile="@VARBASE@/run/${name}.pid"
-extra_commands="gld_waitmysql_seconds"
-
-: ${gld_waitmysql_seconds:=5}
-start_precmd="waitmysql $gld_waitmysql_seconds"
-
-if [ "$1" != "stop" -o "$1" != "status" ]; then
- echo $(check_process $command) > $pidfile
-fi
-
-waitmysql()
-{
- _sec=$1
- echo "$name: waiting for MySQL ${_sec} seconds..."
- sleep ${_sec}
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/mail/gld/options.mk b/mail/gld/options.mk
deleted file mode 100644
index 90bbcd07a43..00000000000
--- a/mail/gld/options.mk
+++ /dev/null
@@ -1,28 +0,0 @@
-# $NetBSD: options.mk,v 1.7 2007/01/02 11:47:40 ghen Exp $
-
-PKG_OPTIONS_VAR= PKG_OPTIONS.gld
-PKG_OPTIONS_REQUIRED_GROUPS= database
-PKG_OPTIONS_GROUP.database= mysql pgsql
-PKG_SUGGESTED_OPTIONS= mysql
-
-.include "../../mk/bsd.options.mk"
-
-.if !empty(PKG_OPTIONS:Mmysql)
-. include "../../mk/mysql.buildlink3.mk"
-CONFIGURE_ARGS+= --with-mysql=${BUILDLINK_PREFIX.mysql-client}
-LIBS+= -L${BUILDLINK_PREFIX.mysql-client}/lib \
- ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.mysql-client}/lib -lmysqlclient
-MESSAGE_SRC+= MESSAGE.mysql
-.endif
-
-.if !empty(PKG_OPTIONS:Mpgsql)
-. include "../../mk/pgsql.buildlink3.mk"
-CONFIGURE_ARGS+= --with-pgsql=${BUILDLINK_PREFIX.postgresql-libs}
-LIBS+= -L${BUILDLINK_PREFIX.mysql-client}/lib \
- ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.mysql-client}/lib -lpq
-# Replace rc.d dependency by pgsql
-SUBST_CLASSES+= pgsql
-SUBST_STAGE.pgsql= pre-install
-SUBST_FILES.pgsql= ../gld
-SUBST_SED.pgsql= -e "s,mysqld,pgsql,"
-.endif
diff --git a/mail/gld/patches/patch-aa b/mail/gld/patches/patch-aa
deleted file mode 100644
index 31679078b1f..00000000000
--- a/mail/gld/patches/patch-aa
+++ /dev/null
@@ -1,36 +0,0 @@
-$NetBSD: patch-aa,v 1.7 2006/03/02 21:03:39 wiz Exp $
-
---- Makefile.in.orig 2004-10-12 14:41:49.000000000 +0200
-+++ Makefile.in
-@@ -1,8 +1,8 @@
- all: gld
-
- gld: cnf.o server.o sql.o sockets.o greylist.o gld.h
-- @CC@ -O2 @DEFS@ -Wall server.o sql.o sockets.o cnf.o greylist.o @LIBS@ @SQL_LIBS@ -o gld
-- strip gld
-+ @CC@ -O2 @DEFS@ -Wall server.o sql.o sockets.o cnf.o greylist.o \
-+ $(LDFLAGS) @SQL_LIBS@ -o gld
-
- sockets.o: sockets.c sockets.h
- @CC@ -O2 @DEFS@ -Wall -c sockets.c
-@@ -23,11 +23,15 @@ clean:
- rm -f gld *.o
-
- install: gld gld.conf
-- mkdir -p /usr/local/bin
-- cp gld /usr/local/bin
-- chmod 700 /usr/local/bin/gld
-- cp gld.conf /etc/gld.conf.sample
-- chmod 600 /etc/gld.conf.sample
-+ $(BSD_INSTALL_PROGRAM_DIR) $(PREFIX)/bin
-+ $(BSD_INSTALL_PROGRAM) gld $(PREFIX)/bin
-+ $(BSD_INSTALL_DATA_DIR) $(PREFIX)/share/examples/gld
-+ $(BSD_INSTALL_DATA_DIR) $(PREFIX)/share/gld
-+ $(BSD_INSTALL_DATA_DIR) $(PREFIX)/share/doc/gld
-+ $(BSD_INSTALL_DATA) gld.conf $(PREFIX)/share/examples/gld
-+ $(BSD_INSTALL_DATA) table-whitelist.sql $(PREFIX)/share/gld
-+ $(BSD_INSTALL_DATA) tables.* $(PREFIX)/share/gld
-+ $(BSD_INSTALL_DATA) README LICENCE $(PREFIX)/share/doc/gld
-
- distclean: clean
- rm -f Makefile config.status config.log config.cache
diff --git a/mail/gld/patches/patch-ab b/mail/gld/patches/patch-ab
deleted file mode 100644
index 4a3b1b2b157..00000000000
--- a/mail/gld/patches/patch-ab
+++ /dev/null
@@ -1,33 +0,0 @@
-$NetBSD: patch-ab,v 1.4 2006/03/02 21:03:39 wiz Exp $
-
---- greylist.c.orig 2005-09-16 11:52:41.000000000 +0200
-+++ greylist.c
-@@ -20,8 +20,11 @@ pid=getpid();
-
- ts=time(0);
- strncpy(oip,ip,sizeof(oip)-1);
-+oip[sizeof(oip)-1] = '\0';
- strncpy(osender,sender,sizeof(osender)-1);
-+osender[sizeof(osender)-1] = '\0';
- strncpy(orecipient,recipient,sizeof(orecipient)-1);
-+orecipient[sizeof(orecipient)-1] = '\0';
-
- if(conf->debug==1) printf("%d: Starting the greylist algo\n",pid);
-
-@@ -97,6 +100,7 @@ if(conf->whitelist==1)
- if(domain==NULL) domain=osender;
-
- strncpy(netw,oip,sizeof(netw)-1);
-+ netw[sizeof(netw)-1] = '\0';
- l=strlen(netw);
- for(i=l-1;i>=0;i--)
- {
-@@ -127,7 +131,7 @@ if(conf->dnswl[0]!=0)
- if(x==4)
- {
- snprintf(query,sizeof(query)-1,"%d.%d.%d.%d.%s",d,c,b,a,conf->dnswl);
-- n=DnsIp(query,NULL);
-+ n=DnsIp(query,NULL, 0);
- if(conf->debug==1) printf("%d: DNSQuery=(%s) result=%ld\n",pid,query,n);
- if(n==0)
- {
diff --git a/mail/gld/patches/patch-ac b/mail/gld/patches/patch-ac
deleted file mode 100644
index ceb731e2352..00000000000
--- a/mail/gld/patches/patch-ac
+++ /dev/null
@@ -1,81 +0,0 @@
-$NetBSD: patch-ac,v 1.2 2006/03/02 21:03:39 wiz Exp $
-
---- cnf.c.orig 2005-09-16 12:02:44.000000000 +0200
-+++ cnf.c
-@@ -36,11 +36,16 @@ if(fic==(FILE *)NULL) return(-1);
-
- // We set the default values
-
--strcpy(conf->sqlhost,"localhost");
--strcpy(conf->sqluser,"myuser");
--strcpy(conf->sqldb,"mydb");
--strcpy(conf->sqlpasswd,"mypasswd");
--strcpy(conf->message,"Greylisted");
-+strncpy(conf->sqlhost,"localhost",sizeof(conf->sqlhost)-1);
-+conf->sqlhost[sizeof(conf->sqlhost)-1] = '\0';
-+strncpy(conf->sqluser,"myuser",sizeof(conf->sqluser)-1);
-+conf->sqluser[sizeof(conf->sqluser)-1] = '\0';
-+strncpy(conf->sqldb,"mydb",sizeof(conf->sqldb)-1);
-+conf->sqldb[sizeof(conf->sqldb)-1] = '\0';
-+strncpy(conf->sqlpasswd,"mypasswd",sizeof(conf->sqlpasswd)-1);
-+conf->sqlpasswd[sizeof(conf->sqlpasswd)-1] = '\0';
-+strncpy(conf->message,"Greylisted",sizeof(conf->message)-1);
-+conf->message[sizeof(conf->message)-1] = '\0';
- conf->training=0;
- conf->port=2525;
- conf->maxcon=100;
-@@ -72,14 +77,46 @@ while(fgets(buffer,1024,fic)!=NULL)
- buffer[strlen(buffer)-1]=0;
- *p=0;
- if(strcmp(buffer,"CLIENTS")==0) ReadClients(conf,p+1);
-- if(strcmp(buffer,"USER")==0) strcpy(conf->user,p+1);
-- if(strcmp(buffer,"GROUP")==0) strcpy(conf->grp,p+1);
-- if(strcmp(buffer,"DNSWL")==0) strcpy(conf->dnswl,p+1);
-- if(strcmp(buffer,"SQLHOST")==0) strcpy(conf->sqlhost,p+1);
-- if(strcmp(buffer,"SQLUSER")==0) strcpy(conf->sqluser,p+1);
-- if(strcmp(buffer,"SQLDB")==0) strcpy(conf->sqldb,p+1);
-- if(strcmp(buffer,"SQLPASSWD")==0) strcpy(conf->sqlpasswd,p+1);
-- if(strcmp(buffer,"MESSAGE")==0) strcpy(conf->message,p+1);
-+ if(strcmp(buffer,"USER")==0)
-+ {
-+ strncpy(conf->user,p+1,sizeof(conf->user)-1);
-+ conf->user[sizeof(conf->user)-1] = '\0';
-+ }
-+ if(strcmp(buffer,"GROUP")==0)
-+ {
-+ strncpy(conf->grp,p+1,sizeof(conf->grp)-1);
-+ conf->grp[sizeof(conf->grp)-1] = '\0';
-+ }
-+ if(strcmp(buffer,"DNSWL")==0)
-+ {
-+ strncpy(conf->dnswl,p+1,sizeof(conf->dnswl)-1);
-+ conf->dnswl[sizeof(conf->dnswl)-1] = '\0';
-+ }
-+ if(strcmp(buffer,"SQLHOST")==0)
-+ {
-+ strncpy(conf->sqlhost,p+1,sizeof(conf->sqlhost)-1);
-+ conf->sqlhost[sizeof(conf->sqlhost)-1] = '\0';
-+ }
-+ if(strcmp(buffer,"SQLUSER")==0)
-+ {
-+ strncpy(conf->sqluser,p+1,sizeof(conf->sqluser)-1);
-+ conf->sqluser[sizeof(conf->sqluser)-1] = '\0';
-+ }
-+ if(strcmp(buffer,"SQLDB")==0)
-+ {
-+ strncpy(conf->sqldb,p+1,sizeof(conf->sqldb)-1);
-+ conf->sqldb[sizeof(conf->sqldb)-1] = '\0';
-+ }
-+ if(strcmp(buffer,"SQLPASSWD")==0)
-+ {
-+ strncpy(conf->sqlpasswd,p+1,sizeof(conf->sqlpasswd)-1);
-+ conf->sqlpasswd[sizeof(conf->sqlpasswd)-1] = '\0';
-+ }
-+ if(strcmp(buffer,"MESSAGE")==0)
-+ {
-+ strncpy(conf->message,p+1,sizeof(conf->message)-1);
-+ conf->message[sizeof(conf->message)-1] = '\0';
-+ }
- if(strcmp(buffer,"PORT")==0) conf->port=atoi(p+1);
- if(strcmp(buffer,"MAXCON")==0) conf->maxcon=atoi(p+1);
- if(strcmp(buffer,"TRAINING")==0) conf->training=atoi(p+1);
diff --git a/mail/gld/patches/patch-ad b/mail/gld/patches/patch-ad
deleted file mode 100644
index 5ff878ff85a..00000000000
--- a/mail/gld/patches/patch-ad
+++ /dev/null
@@ -1,65 +0,0 @@
-$NetBSD: patch-ad,v 1.2 2006/03/02 21:03:39 wiz Exp $
-
---- server.c.orig 2005-09-16 12:17:59.000000000 +0200
-+++ server.c
-@@ -208,7 +208,7 @@ long ts;
- int pid;
-
- pid=getpid();
--GetPeerIp(s,ip,buff);
-+GetPeerIp(s,ip,BLEN,buff,BLEN);
-
- //
- // We check if this IP is authorized to connect to us
-@@ -261,21 +261,34 @@ while(1==1)
- // Now, we are sure our buffer string length is no more than BLEN
- // as all parameters are defined also as buffers with a BLEN size
- // no buffer overflow is possible using strcpy .
-+ // But what's the point. Protect it anyway.
- //
-
- if(strcmp(buff,"")==0) break;
-
- if(strncmp(buff,"request=",8)==0)
-- strcpy(request,buff+8);
-+ {
-+ strncpy(request,buff+8, sizeof(request)-1);
-+ request[sizeof(request)-1] = '\0';
-+ }
-
- if(strncmp(buff,"sender=",7)==0)
-- strcpy(sender,buff+7);
-+ {
-+ strncpy(sender,buff+7, sizeof(sender)-1);
-+ sender[sizeof(sender)-1] = '\0';
-+ }
-
- if(strncmp(buff,"recipient=",10)==0)
-- strcpy(recipient,buff+10);
-+ {
-+ strncpy(recipient,buff+10, sizeof(recipient)-1);
-+ recipient[sizeof(recipient)-1] = '\0';
-+ }
-
- if(strncmp(buff,"client_address=",15)==0)
-- strcpy(ip,buff+15);
-+ {
-+ strncpy(ip,buff+15,sizeof(ip)-1);
-+ ip[sizeof(ip)-1] = '\0';
-+ }
-
- }
-
-@@ -300,7 +313,11 @@ Quote(sender);
- // Now, we can safely use, str** functions
- //
-
--if(sender[0]==0) strcpy(sender,"void@void");
-+if(sender[0]==0)
-+ {
-+ strncpy(sender,"void@void",sizeof(sender)-1);
-+ sender[sizeof(sender)-1] = '\0';
-+ }
-
- if(strcmp(request,REQ)!=0 || recipient[0]==0 || ip[0]==0)
- {
diff --git a/mail/gld/patches/patch-ae b/mail/gld/patches/patch-ae
deleted file mode 100644
index 2ccec646d27..00000000000
--- a/mail/gld/patches/patch-ae
+++ /dev/null
@@ -1,95 +0,0 @@
-$NetBSD: patch-ae,v 1.2 2006/03/02 21:03:39 wiz Exp $
-
---- sockets.c.orig 2004-10-12 14:39:34.000000000 +0200
-+++ sockets.c
-@@ -540,7 +540,7 @@ int CloseSocket(int s)
- /* */
- /************************************************/
-
--int DnsIp(char *host,char *ip)
-+int DnsIp(char *host,char *ip, size_t len)
- {
- struct hostent *hostptr;
- struct in_addr *ptr;
-@@ -552,7 +552,11 @@ if(hostptr->h_addrtype != AF_INET) retur
-
- ptr=(struct in_addr *) *hostptr->h_addr_list;
-
--if(ip!=NULL) strcpy(ip,(char *)inet_ntoa(*ptr));
-+if(ip!=NULL)
-+ {
-+ strncpy(ip,(char *)inet_ntoa(*ptr), len - 1);
-+ ip[len-1] = '\0';
-+ }
- return(0);
- }
-
-@@ -572,13 +576,14 @@ return(0);
- /* */
- /************************************************/
-
--int DnsFQDN(char *host,char *fqdn)
-+int DnsFQDN(char *host,char *fqdn, size_t len)
- {
- struct hostent *hostptr;
-
- if((hostptr=(struct hostent *)gethostbyname(host))==NULL) return(S_HOST_ERR);
-
--strcpy(fqdn,hostptr->h_name);
-+strncpy(fqdn,hostptr->h_name, len-1);
-+fqdn[len-1] = '\0';
- return(0);
-
- }
-@@ -599,7 +604,7 @@ return(0);
- /* */
- /************************************************/
-
--int DnsName(char *ip,char *fqdn)
-+int DnsName(char *ip,char *fqdn, size_t len)
- {
-
- struct hostent *hostptr;
-@@ -609,7 +614,8 @@ addr.s_addr=inet_addr(ip);
-
- if((hostptr=(struct hostent *)gethostbyaddr((char *)&addr,sizeof(struct in_addr),AF_INET))==NULL) return(S_HOST_ERR);
-
--strcpy(fqdn,hostptr->h_name);
-+strncpy(fqdn,hostptr->h_name, len-1);
-+fqdn[len-1] = '\0';
-
- return(0);
- }
-@@ -631,20 +637,27 @@ return(0);
- /* */
- /************************************************/
-
--void GetPeerIp(int sock,char *ipfrom,char *hostfrom)
-+void GetPeerIp(int sock,char *ipfrom, size_t lip, char *hostfrom, size_t hip)
- {
- struct sockaddr_in from;
- size_t foo=sizeof(struct sockaddr_in);
- struct hostent *hostptr;
-
--strcpy(ipfrom,"???.???.???.???");
--strcpy(hostfrom,"?????");
-+strncpy(ipfrom,"???.???.???.???", lip-1);
-+ipfrom[lip-1] = '\0';
-+strncpy(hostfrom,"?????", hip-1);
-+hostfrom[hip-1] = '\0';
-
- if (getpeername(sock,(struct sockaddr *)&from, &foo) == 0)
- {
-- strcpy(ipfrom,(char *)inet_ntoa(from.sin_addr));
-+ strncpy(ipfrom,(char *)inet_ntoa(from.sin_addr), lip-1);
-+ ipfrom[lip-1] = '\0';
- hostptr=(struct hostent *)gethostbyaddr((char *)&from.sin_addr,sizeof(struct in_addr),AF_INET);
-- if(hostptr!=NULL) strcpy(hostfrom,hostptr->h_name);
-+ if(hostptr!=NULL)
-+ {
-+ strncpy(hostfrom,hostptr->h_name, hip-1);
-+ hostfrom[hip-1] = '\0';
-+ }
- }
- }
-
diff --git a/mail/gld/patches/patch-af b/mail/gld/patches/patch-af
deleted file mode 100644
index 2adcc7a915f..00000000000
--- a/mail/gld/patches/patch-af
+++ /dev/null
@@ -1,19 +0,0 @@
-$NetBSD: patch-af,v 1.2 2006/03/02 21:03:39 wiz Exp $
-
---- sockets.h.orig 2004-10-12 14:07:27.000000000 +0200
-+++ sockets.h
-@@ -118,10 +118,10 @@ int CloseSocket(int sock);
-
- /* DNS functions */
-
--int DnsIp(char *host,char *ip);
--int DnsFQDN(char *host,char *fqdn);
--int DnsName(char *ip,char *fqdn);
--void GetPeerIp(int sock,char *ip,char *fqdn);
-+int DnsIp(char *host,char *ip,size_t);
-+int DnsFQDN(char *host,char *fqdn,size_t);
-+int DnsName(char *ip,char *fqdn,size_t);
-+void GetPeerIp(int sock,char *ip,size_t,char *fqdn,size_t);
-
- /* Special Functions */
-
diff --git a/mail/gld/patches/patch-ag b/mail/gld/patches/patch-ag
deleted file mode 100644
index 59b419b464f..00000000000
--- a/mail/gld/patches/patch-ag
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-ag,v 1.1 2006/07/10 20:32:59 sketch Exp $
-
---- sql.c.orig Sun Feb 5 20:17:36 2006
-+++ sql.c Sun Feb 5 20:18:50 2006
-@@ -33,10 +33,10 @@
- void SQLClose(void)
- {
- #ifdef _DB_MYSQL_
--return(MySQLClose());
-+MySQLClose();
- #endif
- #ifdef _DB_PGSQL_
--return(PgSQLClose());
-+PgSQLClose();
- #endif
- }
-