--- qpopper-4.0.4.orig/common/snprintf.c
+++ qpopper-4.0.4/common/snprintf.c
@@ -366,6 +366,9 @@
     
     if ( nSize ) 
         *s++ = *p;
+
+    *s = '\0';
+
     return ( (n-1) - nSize );
 }
 
--- qpopper-4.0.4.orig/Makefile.in
+++ qpopper-4.0.4/Makefile.in
@@ -57,12 +57,12 @@
 popper_server: 
 	cd ${popper_dir}  && ${MAKE} all
 
-install:
-	${INSTALL} -m 0644 -o root ${top_srcdir}/man/popper.8  ${mandir}/man8/
-	echo "Installed man/popper.8 as ${mandir}/man8/popper.8"
-	${INSTALL} -m 0644 -o root ${top_srcdir}/man/popauth.8 ${mandir}/man8/
-	echo "Installed man/popauth.8 as ${mandir}/man8/popauth.8"
-	cd ${popper_dir}  && ${MAKE} install
+#install:
+#	${INSTALL} -m 0644 -o root ${top_srcdir}/man/popper.8  ${mandir}/man8/
+#	echo "Installed man/popper.8 as ${mandir}/man8/popper.8"
+#	${INSTALL} -m 0644 -o root ${top_srcdir}/man/popauth.8 ${mandir}/man8/
+#	echo "Installed man/popauth.8 as ${mandir}/man8/popauth.8"
+#	cd ${popper_dir}  && ${MAKE} install
 
 clean:
 	cd ${popper_dir}  && ${MAKE} $@
@@ -73,4 +73,15 @@
 	rm -f *~ doc/*~
 	rm -f Makefile
 	rm -f core
+	rm -f doc/changelog
+	rm -rf man/*gz
 	cd ${popper_dir}  && ${MAKE} $@
+install: popper_server
+	install -d -g root -m 755 ${DESTDIR}/var/spool/popbull
+	install -d -g mail -m 2755 ${DESTDIR}/var/spool/pop
+	install -s -g root -m 755 popper/popper ${DESTDIR}/usr/sbin/in.qpopper
+	install -s -o mail -g root -m 4755 popper/popauth ${DESTDIR}/usr/bin
+	install -m 0644 -o root ${top_srcdir}/debian/qpopper.conf  ${DESTDIR}/etc/
+	gzip -c -9 man/in.qpopper.8 > man/in.qpopper.8.gz
+	gzip -c -9 man/popauth.8 > man/popauth.8.gz
+	gzip -c -9 man/popper.8 > man/popper.8.gz
--- qpopper-4.0.4.orig/man/in.qpopper.8
+++ qpopper-4.0.4/man/in.qpopper.8
@@ -0,0 +1 @@
+.so man8/popper.8
--- qpopper-4.0.4.orig/popper/pop_bull.c
+++ qpopper-4.0.4/popper/pop_bull.c
@@ -716,8 +716,13 @@
     msg_num = p->msg_count;
     p->msg_count = ( ( ( p->msg_count - 1 ) / ALLOC_MSGS ) + 1 ) * ALLOC_MSGS;
 
-    sprintf ( bullName, "%s/%s", p->bulldir, name );
-    bull = fopen ( bullName, "r" );
+	if( (strlen(p->bulldir)+strlen(name)+2) <= sizeof(bullName)){
+		sprintf ( bullName, "%s/%s", p->bulldir, name );
+    	bull = fopen ( bullName, "r" );
+	}else{
+		bull = NULL;
+	}
+
     if ( bull == NULL ) {
        pop_log ( p, POP_PRIORITY, HERE,
                  "Unable to open bulletin file %s: %s (%d)", 
--- qpopper-4.0.4.orig/popper/pop_msg.c
+++ qpopper-4.0.4/popper/pop_msg.c
@@ -98,8 +98,8 @@
      */
     if ( format != NULL ) {
         iChunk = Qvsnprintf ( mp, iLeft, format, ap );
-        
-        if ( iChunk == -1 ) {
+
+        if ( iChunk == -1 || iChunk == iLeft - 1 ) {
             /* 
              * We blew out the format buffer.
              */
--- qpopper-4.0.4.orig/popper/pop_tls_openssl.c
+++ qpopper-4.0.4/popper/pop_tls_openssl.c
@@ -341,6 +341,20 @@
     }
 
     /*
+     * This set's the option SSL_OP_ALL to the ssl conection to allow "broken" cliets
+     * to connect to the sserver.
+     */
+	   
+     DEBUG_LOG0 (pPOP, "...set SSL_CTX_set_options to SSL_OP_ALL to allow broken ssl implementations.");
+    
+     SSL_CTX_set_options(pTLS->m_OpenSSLctx, SSL_OP_ALL);
+     if(!(SSL_CTX_get_options(pTLS->m_OpenSSLctx) & SSL_OP_ALL))
+     {
+       log_openssl_err ( pPOP, HERE, "Unable to set SSL_OP_ALL option. Some clients may not be able to connect." );
+     }
+
+
+    /*
      * Establish the certificate for our server cert.
      */
     DEBUG_LOG1 ( pPOP, "...setting certificate file %s",
--- qpopper-4.0.4.orig/configure
+++ qpopper-4.0.4/configure
@@ -3699,6 +3699,49 @@
   echo "$ac_t""no" 1>&6
 fi
 
+echo $ac_n "checking for maillock in -llockfile""... $ac_c" 1>&6
+echo "configure:1684: checking for maillock in -llockfile" >&5
+ac_lib_var=`echo lockfile'_'maillock | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-llockfile  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1692 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char maillock();
+
+int main() {
+maillock()
+; return 0; }
+EOF
+if { (eval echo configure:1703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  NETWORK_LIBS="$NETWORK_LIBS -llockfile"; cat >> confdefs.h <<\EOF
+#define MAILOCK 1
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
 echo $ac_n "checking for krb_recvauth in -lkrb""... $ac_c" 1>&6
 echo "configure:3704: checking for krb_recvauth in -lkrb" >&5
 ac_lib_var=`echo krb'_'krb_recvauth | sed 'y%./+-%__p_%'`
--- qpopper-4.0.4.orig/1
+++ qpopper-4.0.4/1
@@ -0,0 +1,107 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# This is the debhelper compatability version to use.
+export DH_COMPAT=3
+
+build: build-stamp
+build-stamp:
+	dh_testdir
+
+	# Add here commands to compile the package.
+	#$(MAKE)
+
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp
+
+	# Add here commands to clean up after the build process.
+	-$(MAKE) realclean
+
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	# Add here commands to install the package into debian/tmp.
+	./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info  \
+		  --enable-bulletins=/var/spool/popbull \
+		  --enable-debugging \
+		  --enable-apop=/etc/pop.auth \
+		  --enable-log-login \
+		  --enable-popuid=mail \
+		  --with-pam=qpopper  \
+#		  --with-openssl    \ 
+#	      --enable-specialauth 
+        #Fix up some things
+	perl -pi \
+	-e 's!^(#define POP_DROP_DIR).*!$$1 "/var/spool/pop/"!;' \
+	-e 's!^(#define POP_TMPDROP).*!$$1 "/var/spool/pop/tmpXXXXXX"!;' \
+	-e 's!^(#define POP_TMPXMIT).*!$$1 "/var/spool/pop/xmitXXXXXX"!;' \
+		config.h
+	$(MAKE) install DESTDIR=`pwd`/debian/qpopper/
+	-$(MAKE) realclean
+	./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info 
+		  --enable-bulletins=/var/spool/popbull \
+		  --enable-debugging \
+		  --enable-apop=/etc/pop.auth \
+		  --enable-log-login \
+		  --enable-popuid=mail \
+		  --with-pam=qpopper-drac  \
+		  --with-drac \
+#		  --with-openssl \
+#	      --enable-specialauth 
+        #Fix up some things
+	perl -pi \
+	-e 's!^(#define POP_DROP_DIR).*!$$1 "/var/spool/pop/"!;' \
+	-e 's!^(#define POP_TMPDROP).*!$$1 "/var/spool/pop/tmpXXXXXX"!;' \
+	-e 's!^(#define POP_TMPXMIT).*!$$1 "/var/spool/pop/xmitXXXXXX"!;' \
+		config.h
+	$(MAKE) install DESTDIR=`pwd`/debian/qpopper-drac/
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+#	dh_testversion
+	dh_testdir
+	dh_testroot
+#	dh_installdebconf	
+	dh_installdocs
+	dh_installexamples
+	dh_installmenu
+#	dh_installemacsen
+	dh_installpam
+#	dh_installinit
+	dh_installcron
+	dh_installman 
+	dh_installinfo
+#	dh_undocumented
+	dh_installchangelogs doc/Changes
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms -X/usr/bin/popauth
+#	dh_makeshlibs
+	dh_installdeb
+#	dh_perl
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
--- qpopper-4.0.4.orig/debian/control
+++ qpopper-4.0.4/debian/control
@@ -0,0 +1,32 @@
+Source: qpopper
+Build-Depends: debhelper,libgdbmg1-dev,libpam0g-dev, mail-transport-agent, drac-dev, libssl-dev
+Section: mail
+Priority: extra
+Maintainer: Yu Guanghui <ygh@debian.org>
+Standards-Version: 3.5.0
+
+Package: qpopper
+Architecture: any
+Depends: ${shlibs:Depends},exim|mail-transport-agent
+Conflicts: pop3-server
+Provides: pop3-server
+Description: Enhanced Post Office Protocol server (POP3).
+ This is The Qualcomm enhanced version of the Post Office Protocol Daemon
+ (POP3 daemon), based on the latest BSD version. The QualComm popper has
+ some extensions to the normal pop3 daemon, such as UIDL and bulletin support.
+
+Package: qpopper-drac
+Architecture: any
+Depends: ${shlibs:Depends},exim|mail-transport-agent, drac
+Conflicts: pop3-server
+Provides: pop3-server
+Description: Qpopper with DRAC Support
+ Qpopper is The Qualcomm enhanced version of the Post Office Protocol Daemon
+ (POP3 daemon), based on the latest BSD version. The QualComm popper has
+ some extensions to the normal pop3 daemon, such as UIDL and bulletin support.
+ .
+ DRAC means Dynamic Relay Authorization Control. Please read documents of the
+ drac package for detail. This package included a version of qpoper with
+ DRAC support.
+ .
+ Please read the README.Debian of drac package to setup your MTA.
--- qpopper-4.0.4.orig/debian/qpopper-drac.postinst
+++ qpopper-4.0.4/debian/qpopper-drac.postinst
@@ -0,0 +1,43 @@
+#! /bin/sh
+#
+# Remove the original pop3 entry from /etc/inetd.conf, and add ours.
+#
+
+case "$1" in
+	configure)
+		;;
+	abort-upgrade|abort-remove|abort-deconfigure)
+		exit 0
+		;;
+	*)
+		exit 0
+		;;
+esac
+umask 022
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+# Compatibility symlinks into /usr/doc
+if [ -d /usr/doc -a ! -e /usr/doc/qpopper \
+        -a -d /usr/share/doc/qpopper ]
+then
+        ln -sf ../share/doc/qpopper /usr/doc/qpopper
+fi
+
+# Make sure /var/spool/pop is there, and mode drwxrwsr-x  root  mail
+if [ ! -d /var/spool/pop ]
+then
+	mkdir -p /var/spool/pop
+fi
+chgrp mail /var/spool/pop
+chmod 2775 /var/spool/pop
+
+# Check if we have already been installed.
+grep "^pop-3.*/in.qpopper" /etc/inetd.conf > /dev/null 2>&1 && exit 0
+
+# Install the qpopper.
+update-inetd --remove '^pop-3'
+update-inetd --group MAIL --add \
+  'pop-3\t\tstream\ttcp\tnowait\troot\t/usr/sbin/tcpd\t/usr/sbin/in.qpopper -f /etc/qpopper.conf'
+
+#DEBHELPER#
--- qpopper-4.0.4.orig/debian/patch/fix-openssl.patch
+++ qpopper-4.0.4/debian/patch/fix-openssl.patch
@@ -0,0 +1,23 @@
+--- pop_tls_openssl.orig.c	Wed Sep 25 21:45:30 2002
++++ pop_tls_openssl.c	Wed Sep 25 21:47:29 2002
+@@ -341,6 +341,20 @@
+     }
+ 
+     /*
++     * This set's the option SSL_OP_ALL to the ssl conection to allow "broken" cliets
++     * to connect to the sserver.
++     */
++	   
++     DEBUG_LOG0 (pPOP, "...set SSL_CTX_set_options to SSL_OP_ALL to allow broken ssl implementations.");
++    
++     SSL_CTX_set_options(pTLS->m_OpenSSLctx, SSL_OP_ALL);
++     if(!(SSL_CTX_get_options(pTLS->m_OpenSSLctx) & SSL_OP_ALL))
++     {
++       log_openssl_err ( pPOP, HERE, "Unable to set SSL_OP_ALL option. Some clients may not be able to connect." );
++     }
++
++
++    /*
+      * Establish the certificate for our server cert.
+      */
+     DEBUG_LOG1 ( pPOP, "...setting certificate file %s",
--- qpopper-4.0.4.orig/debian/patch/fix-loop.patch
+++ qpopper-4.0.4/debian/patch/fix-loop.patch
@@ -0,0 +1,11 @@
+--- popper.orig.c	Sat Mar 16 19:22:57 2002
++++ popper.c	Sat Mar 16 19:22:33 2002
+@@ -483,7 +483,7 @@
+                 else
+                     len = read ( pPOP->input_fd, junk, sizeof(junk) );
+                 if ( len <= 0 )
+-                    break;
++					  return NULL; //break will only break second while, this will cause a loop
+                 q = strchr ( junk, '\n' );
+                 if ( q == NULL ) {
+                     disc += len;
--- qpopper-4.0.4.orig/debian/qpopper-drac.manpages
+++ qpopper-4.0.4/debian/qpopper-drac.manpages
@@ -0,0 +1,3 @@
+man/in.qpopper.8.gz
+man/popauth.8.gz
+man/popper.8.gz
--- qpopper-4.0.4.orig/debian/prerm
+++ qpopper-4.0.4/debian/prerm
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+case "$1" in
+  upgrade|remove)
+        [ -L /usr/doc/qpopper ] && rm -f /usr/doc/qpopper
+  ;;
+esac
+
+#DEBHELPER#
--- qpopper-4.0.4.orig/debian/rules
+++ qpopper-4.0.4/debian/rules
@@ -0,0 +1,107 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# This is the debhelper compatability version to use.
+export DH_COMPAT=3
+
+build: build-stamp
+build-stamp:
+	dh_testdir
+
+	# Add here commands to compile the package.
+	#$(MAKE)
+
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp
+
+	# Add here commands to clean up after the build process.
+	-$(MAKE) realclean
+
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	# Add here commands to install the package into debian/tmp.
+	./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info  \
+		  --enable-bulletins=/var/spool/popbull \
+		  --enable-debugging \
+		  --enable-apop=/etc/pop.auth \
+		  --enable-log-login \
+		  --enable-popuid=mail \
+		  --with-pam=qpopper  \
+		  --with-openssl \
+		  --enable-specialauth 
+        #Fix up some things
+	perl -pi \
+	-e 's!^(#define POP_DROP_DIR).*!$$1 "/var/spool/pop/"!;' \
+	-e 's!^(#define POP_TMPDROP).*!$$1 "/var/spool/pop/tmpXXXXXX"!;' \
+	-e 's!^(#define POP_TMPXMIT).*!$$1 "/var/spool/pop/xmitXXXXXX"!;' \
+		config.h
+	$(MAKE) install DESTDIR=`pwd`/debian/qpopper/
+	-$(MAKE) realclean
+	./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info \
+		  --enable-bulletins=/var/spool/popbull \
+		  --enable-debugging \
+		  --enable-apop=/etc/pop.auth \
+		  --enable-log-login \
+		  --enable-popuid=mail \
+		  --with-pam=qpopper-drac  \
+		  --with-drac \
+		  --with-openssl \
+			--enable-specialauth 
+        #Fix up some things
+	perl -pi \
+	-e 's!^(#define POP_DROP_DIR).*!$$1 "/var/spool/pop/"!;' \
+	-e 's!^(#define POP_TMPDROP).*!$$1 "/var/spool/pop/tmpXXXXXX"!;' \
+	-e 's!^(#define POP_TMPXMIT).*!$$1 "/var/spool/pop/xmitXXXXXX"!;' \
+		config.h
+	$(MAKE) install DESTDIR=`pwd`/debian/qpopper-drac/
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+#	dh_testversion
+	dh_testdir
+	dh_testroot
+#	dh_installdebconf	
+	dh_installdocs
+	dh_installexamples
+	dh_installmenu
+#	dh_installemacsen
+	dh_installpam
+#	dh_installinit
+	dh_installcron
+	dh_installman 
+	dh_installinfo
+#	dh_undocumented
+	dh_installchangelogs doc/Changes
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms -X/usr/bin/popauth
+#	dh_makeshlibs
+	dh_installdeb
+#	dh_perl
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
--- qpopper-4.0.4.orig/debian/watch
+++ qpopper-4.0.4/debian/watch
@@ -0,0 +1,5 @@
+# Example watch control file for uscan
+# Rename this file to "watch" and then you can run the "uscan" command
+# to check for upstream updates and more.
+# Site         Directory               Pattern         Version  Script
+ftp.qualcomm.com        /eudora/servers/unix/popper   qpopper(.*)\.tar\.gz debian  uupdate
--- qpopper-4.0.4.orig/debian/qpopper-drac.dirs
+++ qpopper-4.0.4/debian/qpopper-drac.dirs
@@ -0,0 +1,3 @@
+usr/bin
+usr/sbin
+etc/pam.d
--- qpopper-4.0.4.orig/debian/qpopper-drac.docs
+++ qpopper-4.0.4/debian/qpopper-drac.docs
@@ -0,0 +1,7 @@
+README
+GUIDE.pdf
+doc/LMOS-FAQ.html
+doc/README.Berkeley
+doc/Release.Notes
+doc/rfc1939.txt
+doc/rfc2449.txt
--- qpopper-4.0.4.orig/debian/qpopper-drac.conffiles
+++ qpopper-4.0.4/debian/qpopper-drac.conffiles
@@ -0,0 +1,2 @@
+/etc/pam.d/qpopper-drac
+/etc/qpopper.conf
--- qpopper-4.0.4.orig/debian/changelog
+++ qpopper-4.0.4/debian/changelog
@@ -0,0 +1,316 @@
+qpopper (4.0.4-2.woody.4) stable-security; urgency=medium
+
+  * Non-maintainer upload by the Security Team
+  * No-changes rebuilt so that the package can migrate into proposed
+    updates, since binary files from the former upload got lost on
+    ftpmaster
+  * Fixes mail user privilege escalation (DSA 259, CVE-2003-0143)
+
+ -- Martin Schulze <joey@infodrom.org>  Sat, 20 Nov 2004 10:03:49 +0100
+
+qpopper (4.0.4-2.woody.3) stable; urgency=high
+
+  * [SECURITY] different fix for the overflow below. Make Qvsnprintf always
+    terminate output string with a null byte.
+
+ -- Michael Stone <mstone@debian.org>  Wed, 12 Mar 2003 09:30:19 -0500
+
+qpopper (4.0.4-2.woody.2) stable; urgency=high
+
+  * [SECURITY] buffer overflow in pop_msg.c
+
+ -- Michael Stone <mstone@debian.org>  Tue, 11 Mar 2003 20:59:01 -0500
+
+qpopper (4.0.4-2.woody.1) stable; urgency=low
+
+  * qpopper couldn't work with Eudora clients and openssl
+    0.9.6c-2.woody.1 that was provided in DSA-136.  This verison 
+    fixed that bug. 
+
+ -- Yu Guanghui <ygh@debian.org>  Wed, 25 Sep 2002 21:31:55 +0800
+
+qpopper (4.0.4-2) unstable; urgency=high
+
+  * Fixed the long user bulldir buffer overflow. (closes:bug#144974)
+  * ok, Moshe Zadka <moshez@debian.org>'s patch is better
+    than the one I did, so apply this. ;-) Thanks.
+
+ -- Yu Guanghui <ygh@debian.org>  Mon, 29 Apr 2002 10:13:41 +0800
+
+qpopper (4.0.4-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Yu Guanghui <ygh@debian.org>  Wed, 24 Apr 2002 09:37:17 +0800
+
+qpopper (4.0.3-11) unstable; urgency=high
+
+  * Fixed hppa building error. (closes:bug#142281)
+  * Forget close 126670 at early version. (closes:bug#126670)
+
+ -- Yu Guanghui <ygh@debian.org>  Thu, 11 Apr 2002 18:10:35 +0800
+
+qpopper (4.0.3-10) unstable; urgency=high
+
+  * Back ported the bug fix (closed at 4.0.3-8) from 4.0.4fc3.
+    The old patch maybe cause some problem at special cases.
+
+ -- Yu Guanghui <ygh@debian.org>  Wed, 10 Apr 2002 23:30:41 +0800
+
+qpopper (4.0.3-9) unstable; urgency=low
+
+  * Closed many old bugs, most of them has been fixed before.
+  * lockfile has been put to /var/spool/pop (closes:bug#49122)
+  * couldn't reproduce, and that more like fetchmail's bug.
+    (closes:bug#57256). ok, this has been fixed in potato and new
+    version hasn't this bug. (closes:bug#85069)
+  * It has been fixed, but didn't close the bug. (closes:bug#65330)
+  * Qpopper has a trace option now. (closes:bug#22008)
+  * You can disable dns reverse lookup now. (closes:bug#22834)
+  * APOP and PASS can work at sametime now. (closes:bug#60016)
+  * It's not qpopper's failure. (closes:bug#65901)
+
+ -- Yu Guanghui <ygh@debian.org>  Mon,  1 Apr 2002 21:19:34 +0800
+
+qpopper (4.0.3-8) unstable; urgency=high
+
+  * popper.c line 486 should return NULL instead of break, or it will 
+  wrongly enter loop state.  I have made another patch.
+  Thanks for Christian Hammers' useful information.(closes:Bug#138535) 
+  * This is a security fix. It only affects version 4.0.x.
+
+ -- Yu Guanghui <ygh@debian.org>  Wed,  16 May 2002 19:15:07 +0800
+
+qpopper (4.0.3-7) unstable; urgency=low
+
+  * Builded new package qpopper-drac. (closes:Bug#120338)
+
+ -- Yu Guanghui <ygh@debian.org>  Wed,  6 Feb 2002 21:50:15 +0800
+
+qpopper (4.0.3-6) unstable; urgency=low
+
+  * popauth should be suid. 
+
+ -- Yu Guanghui <ygh@debian.org>  Mon, 10 Dec 2001 19:10:02 +0800
+
+qpopper (4.0.3-5) unstable; urgency=low
+
+  * Sorry, really change --with-apopuid to -enable-popuid this time.
+
+ -- Yu Guanghui <ygh@debian.org>  Tue, 27 Nov 2001 09:17:39 +0800
+
+qpopper (4.0.3-4) unstable; urgency=low
+
+  * change --enable-apoppuid to --enable-popuid. Type error.:(
+    Thanks to Vadim A Kutchin [amadis@chemi.komisc.ru].
+  * Using configure file now. (closes:Bug#116308)
+
+ -- Yu Guanghui <ygh@debian.org>  Tue, 20 Nov 2001 13:29:28 +0800
+
+qpopper (4.0.3-3) unstable; urgency=low
+
+  * Before call kill, check whether /var/run/inetd.pid exist.
+    (closes:Bug#103871)
+
+ -- Yu Guanghui <ygh@debian.org>  Sun,  8 Jul 2001 18:32:16 +0800
+
+qpopper (4.0.3-2) unstable; urgency=high
+
+  * Upload again with a high urgency. 
+  * This version fixes a buffer overflow present in all version of 4.0.
+    It should be installed to unstable and testing as fast.(closes: Bug#101133)
+
+ -- Yu Guanghui <ygh@debian.org>  Sun, 17 Jun 2001 09:28:06 +0800
+
+qpopper (4.0.3-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Yu Guanghui <ygh@debian.org>  Tue,  5 Jun 2001 20:58:01 +0800
+
+qpopper (4.0.2-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Yu Guanghui <ygh@debian.org>  Fri, 25 May 2001 22:45:09 +0800
+
+qpopper (4.0-2) unstable; urgency=low
+
+  * Fixed the wrong installed manpage poppassd.8 (closes: Bug#94723) 
+  * Removed exim from build-depends. (closes: Bug#95099)
+
+ -- Yu Guanghui <ygh@debian.org>  Wed, 25 Apr 2001 00:14:24 +0800
+
+qpopper (4.0-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Yu Guanghui <ygh@debian.org>  Tue, 17 Apr 2001 22:22:25 +0800
+
+qpopper (3.1-4) unstable; urgency=low
+
+  *Add Build-depends and Depends: exim|mail-transport-agent. (closes: Bug#85032)
+  *Priority moved from optional to extra.
+
+ -- Yu Guanghui <ygh@debian.org>  Sat, 10 Feb 2001 12:26:12 +0800
+
+qpopper (3.1-3) unstable; urgency=low
+
+  * Add Build-depends: libgdbmg1-dev, libpam0g-dev to debian/contrl. (closes: Bug#84893) 
+  * Couldn't reproduce Bug#82198, and didn't recieve any reply from reporter. (closes: Bug#82198)
+
+ -- Yu Guanghui <ygh@debian.org>  Tue,  6 Feb 2001 22:04:15 +0800
+
+qpopper (3.1-2) frozen unstable; urgency=high
+
+  * Compiled with --enable-log-login. (closes: Bug#75784) 
+
+ -- Yu Guanghui <ygh@debian.org>  Sun, 29 Oct 2000 09:09:14 +0800
+
+qpopper (3.1-1) frozen unstable; urgency=high
+
+  * New upstream release.(closes: Bug#75032, Bug#71085)
+  * Compiled with PAM support. (closes: Bug#57305)
+
+ -- Yu Guanghui <ygh@debian.org>  Fri, 27 Oct 2000 22:18:56 +0800
+
+qpopper (2.53-5) frozen unstable; urgency=high
+
+  * Fix YET ANOTHER security hole that makes it possible to get a
+    shell, even with "group mail" priviliges. (closes: #64602, #64649, #64627).
+    See http://www.securityfocus.com/vdb/bottom.html?vid=1242
+    See also http://www.digibel.org/~b0f/advisors/b0f5-Qpopper.txt
+
+ -- Miquel van Smoorenburg <miquels@cistron.nl>  Thu, 25 May 2000 14:53:36 +0200
+
+qpopper (2.53-4) frozen unstable; urgency=high
+
+   * Fix security hole (fixes: #63730). Did not use the patch as supplied
+     on bugtraq, but fixed it myself. See debian/fgets1023.patch
+   * Added applied patches as seperate files in the source package and
+     also documented them in README.Debian.
+   * Fixed the pop-server virtual package stuff (fixes: #42409, #50629, #52273)
+   * Moved /usr/{man,doc} stuff to /usr/share/{man,doc}
+     The last 3 are only cosmetic and not code changes.
+
+ -- Miquel van Smoorenburg <miquels@cistron.nl>  Sun, 14 May 2000 13:11:43 +0200
+
+qpopper (2.53-3) unstable; urgency=low
+
+  * Use fcntl (posix) locking everywhere instead of flock()
+  * Don't lock APOP database twice
+  * Fixes:
+    #29698: qpopper: flock() locks both .pag and .dir file which are the same
+
+ -- Miquel van Smoorenburg <miquels@cistron.nl>  Thu, 29 Jul 1999 12:24:14 +0200
+
+qpopper (2.53-2) unstable; urgency=high
+
+  * Turn on --enable-specialauth otherwise shadow support is not compiled in
+  * Fixes:
+    #40165: qpopper ignores -d
+    #40167: qpopper refuses correct p
+    #39789: qpopper: fails to validate passwords
+    #35374: qpopper: changelog and copyright
+    #27196: qpopper logs to /var/log/messages
+    #23872: qpopper appears to abort
+
+ -- Miquel van Smoorenburg <miquels@cistron.nl>  Sun, 27 Jun 1999 20:42:08 +0200
+
+qpopper (2.53-1) unstable; urgency=low
+
+  * Upgraded to latest released version - the license seems OK now.
+
+ -- Miquel van Smoorenburg <miquels@cistron.nl>  Thu, 10 Jun 1999 16:12:43 +0200
+
+qpopper (2.3-5) unstable; urgency=low
+
+  * Added option -S to turn on "server mode" at runtime.
+
+ -- Miquel van Smoorenburg <miquels@cistron.nl>  Thu, 19 Nov 1998 13:13:04 +0100
+
+qpopper (2.3-4) frozen unstable; urgency=high
+
+  * Fix for remote root exploits
+
+ -- Miquel van Smoorenburg <miquels@cistron.nl>  Sat, 27 Jun 1998 23:38:52 +0200
+
+qpopper (2.3-3) frozen unstable; urgency=low
+
+  * Fixes bugs:
+    #22531: qpopper: POP3 server fails to sanity-check TOP requests
+
+ -- Miquel van Smoorenburg <miquels@cistron.nl>  Tue, 19 May 1998 16:41:21 +0200
+
+qpopper (2.3-2) frozen unstable; urgency=low
+
+  * Move back to DBM instead of DB
+  * Fixes:
+    #19847: qpopper unable to open POP authorization DB
+
+ -- Miquel van Smoorenburg <miquels@cistron.nl>  Tue, 17 Mar 1998 23:07:43 +0100
+
+qpopper (2.3-1) unstable; urgency=low
+
+  * Upgraded to latest free upstream version
+  * Fix lintian stuff
+  * Fixes:
+    #15305: qpopper: qpopper 2.4 is out
+
+ -- Miquel van Smoorenburg <miquels@cistron.nl>  Sat, 14 Mar 1998 14:35:11 +0100
+
+qpopper (2.2-5) unstable; urgency=low
+
+  * libc6 version (2.4 is being worked on, but in the mean time..)
+  * Bugs fixed:
+     #10061: qpopper: program name error in man page:
+             says in.popper instead of in.qpopper
+     #12497: qpopper: doesnt work with md5 passwords
+     #13527: qpopper: libc6 patch
+
+ -- Miquel van Smoorenburg <miquels@cistron.nl>  Wed, 22 Oct 1997 16:00:51 +0200
+
+qpopper (2.2-4) frozen unstable; urgency=high
+
+  * Added /var/spool/pop directory to the package since netstd dropped it
+  * Compiled with support for /etc/popper.{allow,deny} file.
+
+ -- Miquel van Smoorenburg <miquels@cistron.nl>  Mon, 28 Apr 1997 20:16:57 +0200
+
+qpopper (2.2-3) unstable; urgency=low
+
+  * Fixed postinst not to send SIGHUP to inetd (fix for xinetd)
+  * Fix for (possible) problem wrt NFS locking and Linux NFS client code.
+
+ -- Miquel van Smoorenburg <miquels@cistron.nl>  Mon, 20 Jan 1997 10:12:44 +0100
+
+qpopper (2.2-2) unstable; urgency=low
+
+  * Fixed locking to work over NFS.
+  * New source format
+
+ -- Miquel van Smoorenburg <miquels@cistron.nl>  Fri, 13 Dec 1996 15:43:13 +0100
+
+qpopper_2.2-1
+o Fixed Description: line in control file.
+o Upgraded to popper2.2
+
+qpopper-2.1.4-4
+o Fixed Description: line in control file.
+o Fixed rewind() problem in pop_updt.c (caused mailboxes to start with
+  a lot of zeros if new mail came in when using the qpopper)
+o debian.rules uses new style package names (with "_")
+
+qpopper-2.1.4-3
+o Fixed locking problem
+
+qpopper-2.1.4-2
+o Added shadow password support
+o Bulletin support is not defaulted anymore (needs -b flag)
+
+qpopper-2.1.4-1
+o initial release
+
+Local variables:
+mode: debian-changelog
+End:
--- qpopper-4.0.4.orig/debian/postinst
+++ qpopper-4.0.4/debian/postinst
@@ -0,0 +1,43 @@
+#! /bin/sh
+#
+# Remove the original pop3 entry from /etc/inetd.conf, and add ours.
+#
+
+case "$1" in
+	configure)
+		;;
+	abort-upgrade|abort-remove|abort-deconfigure)
+		exit 0
+		;;
+	*)
+		exit 0
+		;;
+esac
+umask 022
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+# Compatibility symlinks into /usr/doc
+if [ -d /usr/doc -a ! -e /usr/doc/qpopper \
+        -a -d /usr/share/doc/qpopper ]
+then
+        ln -sf ../share/doc/qpopper /usr/doc/qpopper
+fi
+
+# Make sure /var/spool/pop is there, and mode drwxrwsr-x  root  mail
+if [ ! -d /var/spool/pop ]
+then
+	mkdir -p /var/spool/pop
+fi
+chgrp mail /var/spool/pop
+chmod 2775 /var/spool/pop
+
+# Check if we have already been installed.
+grep "^pop-3.*/in.qpopper" /etc/inetd.conf > /dev/null 2>&1 && exit 0
+
+# Install the qpopper.
+update-inetd --remove '^pop-3'
+update-inetd --group MAIL --add \
+  'pop-3\t\tstream\ttcp\tnowait\troot\t/usr/sbin/tcpd\t/usr/sbin/in.qpopper -f /etc/qpopper.conf'
+
+#DEBHELPER#
--- qpopper-4.0.4.orig/debian/qpopper.postinst
+++ qpopper-4.0.4/debian/qpopper.postinst
@@ -0,0 +1,43 @@
+#! /bin/sh
+#
+# Remove the original pop3 entry from /etc/inetd.conf, and add ours.
+#
+
+case "$1" in
+	configure)
+		;;
+	abort-upgrade|abort-remove|abort-deconfigure)
+		exit 0
+		;;
+	*)
+		exit 0
+		;;
+esac
+umask 022
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+# Compatibility symlinks into /usr/doc
+if [ -d /usr/doc -a ! -e /usr/doc/qpopper \
+        -a -d /usr/share/doc/qpopper ]
+then
+        ln -sf ../share/doc/qpopper /usr/doc/qpopper
+fi
+
+# Make sure /var/spool/pop is there, and mode drwxrwsr-x  root  mail
+if [ ! -d /var/spool/pop ]
+then
+	mkdir -p /var/spool/pop
+fi
+chgrp mail /var/spool/pop
+chmod 2775 /var/spool/pop
+
+# Check if we have already been installed.
+grep "^pop-3.*/in.qpopper" /etc/inetd.conf > /dev/null 2>&1 && exit 0
+
+# Install the qpopper.
+update-inetd --remove '^pop-3'
+update-inetd --group MAIL --add \
+  'pop-3\t\tstream\ttcp\tnowait\troot\t/usr/sbin/tcpd\t/usr/sbin/in.qpopper -f /etc/qpopper.conf'
+
+#DEBHELPER#
--- qpopper-4.0.4.orig/debian/qpopper.manpages
+++ qpopper-4.0.4/debian/qpopper.manpages
@@ -0,0 +1,3 @@
+man/in.qpopper.8.gz
+man/popauth.8.gz
+man/popper.8.gz
--- qpopper-4.0.4.orig/debian/README.Debian
+++ qpopper-4.0.4/debian/README.Debian
@@ -0,0 +1,5 @@
+There is a new qpopper-drac package.  Please read documents of drac 
+package for drac support. ;-)
+
+									Yu Guanghui <ygh@debian.org>
+									2002-02-06
--- qpopper-4.0.4.orig/debian/postrm
+++ qpopper-4.0.4/debian/postrm
@@ -0,0 +1,35 @@
+#! /bin/sh
+#
+#	Remove the qpopper entry from /etc/inittab and
+#	restore the original one.
+#
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+case "$1" in
+	purge)
+		rm -f /etc/pop.auth.*
+		exit 0
+		;;
+	remove)
+		;;
+	*)
+		# Do nothing...
+		exit 0
+		;;
+esac
+
+update-inetd --remove '^pop-3'
+
+if [ -x /usr/sbin/in.pop3d ]
+then
+	update-inetd --group MAIL --add \
+	'pop-3\t\tstream\ttcp\tnowait\troot\t/usr/sbin/tcpd\t/usr/sbin/in.pop3d'
+fi
+
+if [ -f /var/run/inetd.pid ]
+then
+	kill -1 `cat /var/run/inetd.pid` 2>/dev/null
+fi
+
+#DEBHELPER#
--- qpopper-4.0.4.orig/debian/qpopper-drac.postrm
+++ qpopper-4.0.4/debian/qpopper-drac.postrm
@@ -0,0 +1,35 @@
+#! /bin/sh
+#
+#	Remove the qpopper entry from /etc/inittab and
+#	restore the original one.
+#
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+case "$1" in
+	purge)
+		rm -f /etc/pop.auth.*
+		exit 0
+		;;
+	remove)
+		;;
+	*)
+		# Do nothing...
+		exit 0
+		;;
+esac
+
+update-inetd --remove '^pop-3'
+
+if [ -x /usr/sbin/in.pop3d ]
+then
+	update-inetd --group MAIL --add \
+	'pop-3\t\tstream\ttcp\tnowait\troot\t/usr/sbin/tcpd\t/usr/sbin/in.pop3d'
+fi
+
+if [ -f /var/run/inetd.pid ]
+then
+	kill -1 `cat /var/run/inetd.pid` 2>/dev/null
+fi
+
+#DEBHELPER#
--- qpopper-4.0.4.orig/debian/copyright
+++ qpopper-4.0.4/debian/copyright
@@ -0,0 +1,144 @@
+This package was built by Yu Guanghui <ygh@debian.org>
+from sources obtained from ftp://ftp.qualcomm.com/
+
+Qpopper(tm) is licensed by QUALCOMM Incorporated under the following
+    terms and conditions.  ANY USE OF QPOPPER CONSTITUTES AGREEMENT TO
+    THESE TERMS.
+
+1.  Warranty Disclaimer.  QPOPPER SOFTWARE IS PROVIDED TO THE USER "AS
+    IS." QUALCOMM MAKES NO WARRANTIES, EITHER EXPRESS OR IMPLIED, WITH
+    RESPECT TO THE QPOPPER SOFTWARE AND/OR ASSOCIATED MATERIALS
+    PROVIDED TO THE USER, INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF
+    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR AGAINST
+    INFRINGEMENT.  QUALCOMM does not warrant that the functions
+    contained in the software will meet your requirements, or that the
+    operation of the software will be uninterrupted or error-free, or
+    that defects in the software will be corrected.  Furthermore,
+    QUALCOMM does not warrant or make any representations regarding
+    the use or the results of the use of the software or any
+    documentation provided therewith in terms of their correctness,
+    accuracy, reliability, or otherwise.  No oral or written
+    information or advice given by QUALCOMM or a QUALCOMM
+    representative shall create a warranty or in any way increase the
+    scope of this warranty.
+
+2.  Limitation of Liability.  QUALCOMM AND ITS LICENSORS ARE NOT LIABLE
+    FOR ANY CLAIMS OR DAMAGES WHATSOEVER ARISING IN CONNECTION WITH
+    THE QPOPPER SOFTWARE, INCLUDING WITHOUT LIMITATION PROPERTY
+    DAMAGE, PERSONAL INJURY, INTELLECTUAL PROPERTY INFRINGEMENT, LOSS
+    OF PROFITS, OR INTERRUPTION OF BUSINESS, OR FOR ANY SPECIAL,
+    CONSEQUENTIAL OR INCIDENTAL DAMAGES, HOWEVER CAUSED, WHETHER
+    ARISING OUT OF BREACH OF WARRANTY, CONTRACT, TORT (INCLUDING
+    NEGLIGENCE), STRICT LIABILITY, OR OTHERWISE.
+
+3.  Using and Distributing Qpopper.  If a party agrees to these terms
+    and conditions, such party may copy and use Qpopper for any
+    purpose, and distribute unmodified complete copies of Qpopper to
+    any third party provided that such third party must agree to these
+    terms and conditions prior to any use of Qpopper.  Failure to
+    include these license terms when distributing Qpopper shall be a
+    material breach of this agreement, and the party committing such
+    breach shall defend and indemnify QUALCOMM Incorporated against
+    all claims, losses, liabilities, damages, costs and expenses,
+    including attorney's fees, which QUALCOMM may incur in connection
+    with such breach.
+
+4.  Modifying Qpopper.  Qpopper consists of (i) intellectual property
+    owned by QUALCOMM Incorporated, and (ii) intellectual property
+    owned by the Regents of the University of California.  Any
+    modifications to the U.C.-owned portions of Qpopper are subject to
+    the provisions of Section 7 below.  A party to this agreement may
+    create derivative works of the QUALCOMM-owned portions of the
+    Qpopper software, distribute such derivative works to third
+    parties, and permit such third parties to copy and use such
+    derivative works subject to the following restrictions: 
+    
+    (a)  The protocol greeting banner and the CAPA IMPLEMENTATION
+         response tag must include clear notification that Qpopper has
+         been modified (for example,
+         "FooPopper-by-Foo-Networks-hacked-from-Qpopper-3.0"). 
+    
+    (b)  Detailed notification of all modifications must be clearly and
+         conspicuously included within the modified source files, and 
+         in a separate document.  All of the source files and the 
+         document describing the changes must be distributed with the
+         modified software. 
+    
+    (c)  When distributing the modified software the distributing party
+         must clearly and conspicuously communicate to all recipients
+         that the modified software is produced by the party that
+         modified the software and is not a QUALCOMM product. 
+
+    (d)  The term "Qpopper" shall not be used in connection with the
+         modified software except in a purely factual manner when
+         describing the history or development of the software.
+
+    (e)  The modified software must be licensed to end users using a
+         license agreement which expressly states that portions of the
+         modified software are based on code owned by QUALCOMM 
+         Incorporated, that such QUALCOMM code is only provided on the
+         terms stated in this agreement, and that QUALCOMM bears no 
+         responsibility whatsoever for any modifications to the QUALCOMM
+         code.
+
+    (f)  The modifying party shall defend and indemnify QUALCOMM 
+         Incorporated against all claims, losses, liabilities, damages,
+         costs and expenses, including attorney's fees, which QUALCOMM
+         may incur in connection with any intellectual property 
+         infringement or similar claim related to the modified 
+         software, if such claim is related to that party's 
+         modifications.
+
+5.  Notices.  QUALCOMM is a registered trademark and registered service
+    mark of QUALCOMM Incorporated.  Qpopper is a trademark of QUALCOMM
+    Incorporated.  QUALCOMM does not grant any party the right to use
+    such marks on any modified version of the Qpopper software.  All
+    other trademarks and service marks are the property of their
+    respective owners.  The Qpopper software, excluding the portions
+    owned by the Regents of the University of California, is Copyright
+    1993-2000 QUALCOMM Incorporated.  All rights not expressly granted
+    herein are reserved by QUALCOMM.
+
+6.  General.  This agreement is governed and interpreted in accordance
+    with the laws of the State of California without giving effect to
+    its conflict of laws provisions.  Any claim arising out of or
+    related to this agreement must be brought exclusively in the state
+    or federal courts located in San Diego County, California.  The
+    United Nations Convention on Contracts for the International Sale
+    of Goods is expressly disclaimed.  If any provision of this
+    agreement shall be invalid, the validity of the  remaining
+    provisions of this agreement shall not be affected.  This
+    agreement is the entire and exclusive agreement between QUALCOMM
+    and any user of the Qpopper software with respect to the software
+    and supersedes all prior agreements (whether written or oral) and
+    other communications related to the software.
+
+7.  IMPORTANT.
+
+    This software program contains code, and/or derivatives or
+    modifications of code originating from the software program
+    "Popper." Popper is (c) Copyright 1989-1991 The Regents of the
+    University of California, All Rights Reserved.  Popper was 
+    created by Austin Shelton, Information Systems and Technology,
+    University of California, Berkeley.  Permission from the Regents of
+    the University of California to use, copy, modify, and distribute
+    the "Popper" software contained herein for any purpose, without
+    fee, and without a written agreement is hereby granted, provided
+    that the above copyright notice and this paragraph and the 
+    following two paragraphs appear in all copies.  HOWEVER, ADDITIONAL
+    PERMISSIONS MAY BE NECESSARY FROM OTHER PERSONS OR ENTITIES, TO
+    USE DERIVATIVES OR MODIFICATIONS OF POPPER.
+
+    IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY
+    PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
+    DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THE
+    POPPER SOFTWARE, OR ITS DERIVATIVES OR MODIFICATIONS, AND ITS
+    DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN
+    ADVISED OF THE POSSIBLITY OF SUCH DAMAGE.
+
+    THE UNIVERSITY OF CALIFORNIA, SPECIFICALLY DISCLAIMS ANY 
+    WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+    OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE 
+    POPPER SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE
+    UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE
+    MAINTENANCE, SUPPORT, UPDATES, ENCHANCEMENTS, OR MODIFICATIONS.
--- qpopper-4.0.4.orig/debian/qpopper.pam
+++ qpopper-4.0.4/debian/qpopper.pam
@@ -0,0 +1,3 @@
+#%PAM-1.0
+auth       required	pam_unix_auth.so shadow
+account    required	pam_unix_acct.so
--- qpopper-4.0.4.orig/debian/qpopper-drac.pam
+++ qpopper-4.0.4/debian/qpopper-drac.pam
@@ -0,0 +1,3 @@
+#%PAM-1.0
+auth       required	pam_unix_auth.so shadow
+account    required	pam_unix_acct.so
--- qpopper-4.0.4.orig/debian/qpopper.conf
+++ qpopper-4.0.4/debian/qpopper.conf
@@ -0,0 +1,679 @@
+#---------------------------------------------------------------------
+# Sample Qpopper 4.0 configuration file.
+#
+# This file lists all Qpopper configuration file options.  To use,
+# copy the desired setting to your own configuration file, remove
+# the leading '#' and set the desired value.
+#
+#---------------------------------------------------------------------
+
+
+
+# An integer value for the number of seconds to announce in
+# the CAPA response for the server's minimum login delay.
+#
+# Default: 
+#
+# set announce-login-delay     =
+
+
+# An integer value for the number of days to announce in
+# the CAPA response for the server's maximum message
+# retention period.
+#
+# Default:
+#
+# set announce-expire          =
+
+
+# The full path to the bulletins directory.
+#
+# Default: /var/spool/bulls
+#
+# set bulldir                  = "/var/spool/bulls"
+
+
+# Set TRUE to permit sessions to continue even if the
+# bulletins database can't be accessed.  This permits
+# users to get their mail, but they might not see some
+# bulletins for a while, or at all.
+#
+# Only valid when compiled with '--enable-bulldb'.
+#
+# Default: false.
+#
+# set bulldb-nonfatal          = false
+
+
+# Sets the maximum number of attempts to lock the bulletins
+# database.  You normally do not need to adjust this.  This value
+# should only be changed if you know if your system has usleep(3C)
+# or not.  On systems with usleep(3C), this can be a large value
+# (the default is 75).  On systems without usleep(3C), this should
+# remain small (the default is 10).
+#
+# Only valid when compiled with '--enable-bulldb'.
+#
+# Default: 75 (10 on systems without usleep(3c)).
+#
+# set bulldb-max-tries         = 75
+
+
+# Sets clear text handling options.  Values are:
+#    o 'default'  Clear text passwords are permitted for all users,
+#                 except those in the APOP database
+#    o 'never'    Clear text passwords are never permitted
+#    o 'always'   Clear text passwords are always permitted
+#    o 'local'    Clear text passwords are permitted on the local
+#                 (127.*.*.*) loop back interface only
+#    o 'tls'      Clear text passwords are permitted when TLS/SSL
+#                 has been negotiated for the session
+#    o 'ssl'      Same as tls
+#
+# The 'tls' and 'ssl' values are only valid if '--with-openssl' or
+# '--with-sslplus' was used with ./configure.
+#
+# Default: default
+#
+# set clear-text-password      = default
+
+
+# Reads additional run-time options from the specified file.
+#
+#           Caution. There are no restrictions on which options may
+#           appear in files specified with the '-f' command-line flag
+#           or the 'config-file' configuration file option in files 
+#           chained from -f.  Be certain that the file specified with
+#           '-f' or in any files it chains to are not writable by
+#           users.
+#
+# Default: none
+#
+# set config-file              = /etc/mail/pop/qpopper.config
+
+
+# Enables debug logging.  Output is in syslog.  If this option is used,
+# it should be first, so that debug records are generated for subsequent
+# options.
+#
+# Only valid if ./configure was run with '--enable-debugging'
+#
+# Default: false
+#
+# set debug                    = false
+
+
+# Changes uppercase user names to lowercase.  This permits users to
+# configure their clients with user names in UPPER or MiXeD case.
+# They can then login, assuming their actual user name is all
+# lowercase.
+#
+# Default: false
+#
+# set downcase-user            = false
+
+
+# If '--with-drac' used with ./configure, this option specifies the DRAC 
+# host.
+#
+# Default: localhost
+#
+# set drac-host                = localhost
+
+
+# Enables Kerberos support.
+#
+# Only valid if ./configure run with '--enable-kerberos5'.
+#
+# Default: false
+#
+# set kerberos                 = false
+
+
+# Specifies the Kerberos service to use (same as the compile time
+# KERBEROS_SERVICE define). The default is rcmd, although the use of
+# pop is popular.
+#
+# Only valid if ./configure run with '--enable-kerberos5'.
+#
+# Default: rcmd
+#
+# set kerberos-service         = "rcmd"
+
+
+# Checks if mail lock needs to be refreshed every this many messages.
+#
+# You normally do not need to adjust this.  See "Performance" in the
+# Qpopper Administrator's Guide for more information.
+#
+# Default: 
+#
+# set mail-lock-check          =
+
+
+# Disables the reverse lookups on client IP addresses.
+#
+# Default: true
+#
+# set reverse-lookup           = true
+
+
+# Enables server mode by default.  See the Qpopper Administrator's
+# Guide for more information.
+#
+# Default: false
+#
+# set server-mode              = false
+
+
+# Enables statistics logging.  After each session ends, a statistics
+# record is  written to the log.  This record resembles the following
+# example: 'stats randy 0 0 1 385 randy.example.org 192.168.2.4' and
+# has the following meaning:
+#   Username: 'randy'
+#   Deleted messages: 0
+#   Deleted octets: 0
+#   Messages left on server: 1
+#   Octets left on server: 385
+#   Name of client machine: 'randy.example.org'
+#   IP address of client machine: '192.168.2.4'
+#
+# Default: false
+#
+# set statistics               = false
+
+
+# Sets the timeout for network reads.  Qpopper terminates the
+# connection with the client if no input is received in this
+# many seconds.  RFC 1939 states that this timeout must be
+# 600 seconds (10 minutes).  However, ideal settings in some
+# cases are between 30 and 120 seconds.  In other cases the 600
+# value is best, and sometimes a value in between is better.
+#
+# Default: 120
+#
+# set timeout                  = 120
+
+
+# Enables debug logging if '--enable-debugging' was used with
+# ./configure.  All debug and standard log records are written to
+# the specified file.  If this option is used, it should be first,
+# so that debug records are generated for subsequent options.
+#
+# If used without '--enable-debugging', redirects all log messages
+# to the specified file but does not enable debug logging.
+#
+# Default: none
+#
+# set tracefile                =
+
+
+# Reads additional run-time options from a file named
+# '.qpopper-options' in the user's home directory, if present.
+#
+# This file is normally owned by the user.
+#
+# Default: false
+#
+# set user-options             = false
+
+
+# Reads additional run-time options from a file named
+# 'username.qpopper-options' in the spool directory.
+#
+# This file should not be owned by nor writable by the user.
+#
+# Default: false
+#
+# set spool-options            = false
+
+
+# When updating the spool at the end of a session, this option
+# instructs Qpopper to rename the temporary file to the spool instead
+# of copying it.  This reduces I/O at session end by a third, but is
+# likely to break programs such as biff or the shell's mail check
+# feature.  Use this option only if such programs are not used.  It is
+# safest to only enable this option when users do not have shell
+# access to the mail server.
+#
+# See "Performance" in the Qpopper Administrator's Guide for more
+# information.
+#
+# Default: false
+#
+# set fast-update              = false
+
+
+# When set, domains are trimmed from user names before use.  For
+# example, if a user named 'maida' enters her login name in her POP
+# client as 'maida@example.org', Qpopper treats this as just 'maida'.
+#
+# Default: false
+#
+# set trim-domain              = false
+
+
+# Specifies TLS/SSL support.  The permitted values are:
+#    o 'default'         TLS/SSL is not supported
+#    o 'none'            Same as default
+#    o 'stls'            Enables support for the STLS command. This
+#                        permits TLS/SSL negotiations on the
+#                        standard (or any) port, allowing the same
+#                        port to be used by TLS/SSL and regular
+#                        clients.
+#    o 'alternate-port'  Enables alternate-port TLS/SSL.  Some older
+#                        clients require this. (The usual port for
+#                        alternate-port TLS/SSL with pop is 995.)
+#
+# Only valid when '--with-openssl' or '--with-sslplus' used with
+# ./configure
+#
+# Default: default
+#
+# set tls-support              = default
+
+
+# Specifies the permitted cipher suites.  See the OpenSSL documentation
+# for syntax.  You normally do not need to set this.
+#
+# Only valid when '--with-openssl' used with ./configure
+#
+# Default: 
+#
+# set tls-cipher-list          =
+
+
+# Restricts the version of TLS/SSL recognized in session negotiations.
+# You normally do not need to set this.  Supported values are:
+#    o 'default' (same as SSLv23)
+#    o 'SSLv2'   Forces Qpopper only to understand SSLv2 client hello
+#                messages.
+#    o 'SSLv3'   Forces Qpopper only to understand SSLv3 client hello
+#                messages.  This especially means that it does not
+#                understand SSLv2 client hello messages, which are
+#                widely used for compatibility reasons.
+#    o 'TLSv1'   Forces Qpopper only to understand TLSv1 client hello
+#                messages.  This especially means that it does not
+#                understand SSLv2 client hello messages, which are
+#                widely used for compatibility reasons.  It also does
+#                not understand SSLv3 client hello messages.
+#    o 'SSLv23'  Allows Qpopper to understand SSLv2, SSLv3, and TLSv1
+#                client hello messages.  This is the best choice when
+#                compatibility is a concern.  This is the default
+#                value.
+#    o 'all'     (same as SSLv23)
+#
+# Only valid when '--with-openssl' used with ./configure
+#
+# Default: default
+#
+# set tls-version              = default
+
+
+# Specifies the file containing the server's TLS/SSL certificate and
+# encrypted private key.
+#
+# Only valid if '--with-sslplus' used with ./configure.
+#
+# Default: none
+#
+# set tls-identity-file        =
+
+
+# Specifies the passphrase to decrypt the server's private key (in the
+# identify file).
+#
+# Only valid if '--with-sslplus' used with ./configure.
+#
+# Default: none
+#
+# set tls-passphrase           =
+
+
+# Specifies the file which contains the server's TLS/SSL certificate.
+# This file may also contain the server's unencrypted private key.
+#
+# Only valid if '--with-openssl' used with ./configure
+#
+# Default: none
+#
+#
+# set tls-server-cert-file     = /etc/mail/certs/hostname.cert
+
+
+# Specifies a file which contains the server's TLS/SSL private key.
+# Note: This private key must not be encrypted.
+#
+# If the private key is contained in the same file as the certificate
+# (as specified with tls-server-cert-file), you do not need to set
+# this option.
+#
+# Only valid if '--with-openssl' used with ./configure
+#
+# Default: none
+#
+# set tls-private-key-file     =
+
+
+# When set, Qpopper writes a log record at the end of a session
+# containing the elapsed time for the session authentication,
+# initialization. and cleanup.
+#
+# Default: false
+#
+# set timing                   = false
+
+
+# When set, Qpopper checks for old .user.pop files in old locations
+# when hash-spool or homedirmail is used.  When reset, Qpopper skips
+# this check, which speeds things up.
+#
+# Default: true
+#
+# set check-old-spool-loc      = true
+
+
+# When set, Qpopper checks for and creates if needed the hashed spool
+# directories.  When reset, Qpopper doesn't check for or create the
+# hashed spool directories.  Set to false if you precreate the
+# directories.
+#
+# Default: true
+#
+# set check-hash-dir           = true
+
+
+# When set, Qpopper checks for expired passwords (if the platform
+# permits).  When reset, Qpopper omits this check.
+#
+# Default: true
+#
+# set check-password-expired   = true
+
+
+# Determines whether Qpopper updates the read/unread status of
+# messages (a feature relied on by some mail clients).  Also
+# determines if Qpopper saves the message's unique identifier
+# (UID) in the spool.
+#
+# When reset, it forces the UID for every message to be
+# recalculated, using more CPU but potentially less I/O.
+#
+# See the "Performance" section of the Qpopper Administrator's Guide
+# for more information.
+#
+# Default: true
+#
+# set update-status-headers    = true
+
+
+# Determines whether Qpopper enters update state when a session
+# aborts.  Resetting this option causes Qpopper to ignore any
+# deletions if the session is aborted.
+#
+# Note that RFC 1939, section 6 prohibits the default behavior,
+# but experience showed that otherwise users on noisy lines were
+# often unable to delete their mail.  Reset this option to inhibit
+# the default behavior, and obey RFC 1939, but watch for users who
+# download the same messages over and over, or whose spools fill up.
+#
+# Default: true
+#
+# set update-on-abort          = true
+
+
+# When set, Qpopper automatically and unconditionally deletes messages
+# that have been downloaded using the RETR command (the normal command
+# for accessing messages).
+#
+#       Caution: This option could result in lost mail.  Be sure to
+#       inform your users that the option is in effect before enabling.
+#
+# Default: false
+#
+# set auto-delete              = false
+
+
+# When set, Qpopper shows bulletins to users by groups (the group name
+# is the second dot-separated element in each bulletin's name). See
+# "Using Bulletins" in the Qpopper Administrator's Guide for more
+# information.  Use a group name of 'ALL' for all users.
+#
+# Default: false
+#
+# set group-bulletins          = false
+
+
+# When set to a 1 or 2, the subdirectory for the mail spools is
+# determined from the user name by either (1) hashing the first four
+# characters or (2) by using directories equal to the first letter and
+# the second letter (if any).  For example, if the spool directory is
+# '/var/mail', the spool file for user 'maida' would be:
+#       '/var/mail/maida'                hash-spool = 0
+#       '/var/mail/o/maida'              hash-spool = 1
+#       '/var/mail/m/a/maida'            hash-spool = 2
+#
+# See the "Performance" section of the Qpopper Administrator's Guide
+# for more information.
+#
+# Default: 0
+#
+# set hash-spool               = 0
+
+
+# To have the user's home directory be the spool location, set this
+# option to be the correct file name for the spool.
+#
+# Default: none
+#
+# set home-dir-mail            = ".mail"
+
+
+# When set, instructs Qpopper to generate message unique identifiers
+# (UIDs) using old (pre-3.x) style encoding.  This is useful only if
+# you also set 'update-status-headers' to false, have existing users
+# with old (pre-3.x) spool files, and you want to keep the UIDs the
+# same.
+#
+# Default: false
+#
+# set old-style-uid            = false
+
+
+# When set, Qpopper checks for and hides status messages created by
+# University of Washington software.
+#
+# Default: false
+#
+# set UW-kluge                 = false
+
+
+# When set, Qpopper keeps (does not delete) the '.user.pop' file (the
+# temporary drop file).  Normally this file is deleted when the
+# session ends.  Some sites like to retain it to determine the last
+# time a user has accessed his or her mail.
+#
+# Default: false
+#
+# set keep-temp-drop           = false
+
+
+# When set, causes server mode to be on for users who are members of
+# the specified group.  See the "Enabling Server Mode" and
+# "Performance" sections of the Qpopper Administrator's Guide for more
+# information.
+#
+# Default: none
+#
+# set group-server-mode        =
+
+
+# When set, causes server mode to be off for users who are members of
+# the specified group.  See the "Enabling Server Mode" and
+# "Performance" sections of the Qpopper Administrator's Guide for more
+# information.
+#
+# Default: none
+#
+# set group-no-server-mode     =
+
+
+# Specifies a file that permits only users listed in the file to have
+# Qpopper access.  The format is a list of user names, one per line.
+#
+# Default: none
+#
+# set auth-file                =
+
+
+# Specifies a file that denies access to users listed in the file.
+# The format is a list of user names, one per line.
+#
+# Default: none
+#
+# set nonauth-file             =
+
+
+# Set this option if you don't want Qpopper to display its version in
+# the POP protocol banner or CAPA IMPLEMENTATION response of
+# unauthenticated users.
+# Some sites believe this improves security since it avoids advertising
+# that an old version (perhaps with known vulnerabilities) is being
+# used.  Others feel is makes the site more likely to be attacked,
+# since it also avoids advertising when running a secure version.
+#
+# Default: false
+#
+# set shy                      = false
+
+
+# Set this to the full path to sendmail or other such program used to
+# submit new messages.  Qpopper uses this to implement XTND XMIT.
+#
+# The default is determined at compile time.  
+#
+#
+# set mail-command             = /usr/sbin/sendmail
+
+
+# Set this to the full path to the mail spool directory.
+#
+# The default is determined at compile time.  
+#
+# set spool-dir                = /var/spool/mail
+
+
+# If you do not want '.user.pop' (temporary drop files) to be in the
+# spool directory, set this to the full path to the directory to be
+# used for temp drop files.  Note that use of /tmp is not recommended,
+# because a system reboot will wipe out the files.  This could cause
+# lost mail.
+#
+# Default: spool directory
+#
+# set temp-dir                 =
+
+
+# The name of the temporary drop files.  You should not normally set
+# this option.
+#
+# Default: ".%s.pop"
+#
+# set temp-name                = ".%s.pop"
+
+
+# If you do not want user cache files to be in the same directory as
+# temporary drop files, set this to the full path to the directory for
+# cache files.  Note that use of /tmp is not recommended, because a
+# system reboot wipes out the files.
+#
+# Default: temp-dir
+#
+# set cache-dir                =
+
+
+# The name of the cache files.  You should not normally set this
+# option.
+#
+# Default: ".%s.cache"
+#
+# set cache-name               = ".%s.cache"
+
+
+# Specifies the maximum number of old bulletins seen by new users.
+#
+# Default: 1
+#
+# set max-bulletins            = 1
+
+
+# When set, Qpopper uses a method of opening lock files that may work
+# over NFS.  This has not been thoroughly tested, however.
+#
+# Default: false
+#
+# set no-atomic-open           = false
+
+
+# Qpopper sends network output to client in small chunks (for example,
+# line-by-line when sending a message).  By default, Qpopper
+# aggregates data to be sent to clients in large chunks.  This may be
+# faster or slower, depending on specifics of both the client and
+# server hardware and networking stacks as wel as network elements in
+# between (such as routers).  Also, some networking stacks do their
+# own aggregation.
+#
+# Under congested network conditions, larger packets increase the
+# incidence of lost packets and thus client or server timeouts,
+# leading to "POP timeout" or "EOF" errors.
+#
+# When TLS/SSL is in effect, smaller packets increase the overhead
+# needed to send data, which may result in worse performance.
+#
+# You can adjust the Qpopper behavior by setting this option.  The
+# values are:
+#    o 'default'  Always send large chunks
+#    o 'always'   Same as 'default'
+#    o 'never'    Never aggregate data into large chunks
+#    o 'tls'      Only aggregate data into large chunks when TLS/SSL
+#                 has been negotiated for the session 
+#    o 'ssl'      Same as 'tls'
+#
+# Default: default
+#
+# set chunky-writes            = default
+
+
+# Specifies the log facility that Qpopper uses.
+#
+# Note that this does not apply to popauth, nor to the daemon in
+# standalone mode.  These continue to use the compile-time default.
+#
+# Values are:
+#    o 'mail'    Qpopper logs to LOG_MAIL facility.
+#    o 'local0'  Qpopper logs to LOG_LOCAL0 facility.
+#    o 'local1'  Qpopper logs to LOG_LOCAL1 facility.
+#    o 'local2'  Qpopper logs to LOG_LOCAL2 facility.
+#    o 'local3'  Qpopper logs to LOG_LOCAL3 facility.
+#    o 'local4'  Qpopper logs to LOG_LOCAL4 facility.
+#    o 'local5'  Qpopper logs to LOG_LOCAL5 facility.
+#    o 'local6'  Qpopper logs to LOG_LOCAL6 facility.
+#    o 'local7'  Qpopper logs to LOG_LOCAL7 facility.
+#
+# Default: determined at compile time, usually LOG_LOCAL0 or
+# LOG_MAIL, depending on the operating system.
+#
+# set log-facility             = local1
+
+
+# When set, Qpopper logs successful authentications using the
+# specified string.  Within the string, an occurrence of '%0' is
+# replaced with the Qpopper version, '%1' with the user name, '%2'
+# with the user's host name, and '%3' with the user's IP address.
+#
+# Default: none, unless '--enable-log-login' used with ./configure,
+# in which case "(v%0) POP login by user /"%1/" at (%2) %3" is used.
+#
+# set log-login                = "(v%0) POP login by user /"%1/" at (%2) %3"
+
+
--- qpopper-4.0.4.orig/debian/qpopper.dirs
+++ qpopper-4.0.4/debian/qpopper.dirs
@@ -0,0 +1,3 @@
+usr/bin
+usr/sbin
+etc/pam.d
--- qpopper-4.0.4.orig/debian/qpopper.docs
+++ qpopper-4.0.4/debian/qpopper.docs
@@ -0,0 +1,7 @@
+README
+GUIDE.pdf
+doc/LMOS-FAQ.html
+doc/README.Berkeley
+doc/Release.Notes
+doc/rfc1939.txt
+doc/rfc2449.txt
--- qpopper-4.0.4.orig/debian/qpopper.postrm
+++ qpopper-4.0.4/debian/qpopper.postrm
@@ -0,0 +1,35 @@
+#! /bin/sh
+#
+#	Remove the qpopper entry from /etc/inittab and
+#	restore the original one.
+#
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+case "$1" in
+	purge)
+		rm -f /etc/pop.auth.*
+		exit 0
+		;;
+	remove)
+		;;
+	*)
+		# Do nothing...
+		exit 0
+		;;
+esac
+
+update-inetd --remove '^pop-3'
+
+if [ -x /usr/sbin/in.pop3d ]
+then
+	update-inetd --group MAIL --add \
+	'pop-3\t\tstream\ttcp\tnowait\troot\t/usr/sbin/tcpd\t/usr/sbin/in.pop3d'
+fi
+
+if [ -f /var/run/inetd.pid ]
+then
+	kill -1 `cat /var/run/inetd.pid` 2>/dev/null
+fi
+
+#DEBHELPER#
--- qpopper-4.0.4.orig/debian/qpopper.conffiles
+++ qpopper-4.0.4/debian/qpopper.conffiles
@@ -0,0 +1,2 @@
+/etc/pam.d/qpopper
+/etc/qpopper.conf
