changeset 192:89f951be358f

REMOVED POP3 SUPPORT masqmail will not include a POP3 client anymore from 0.3.0 on maybe the POP3 code will be reworked into a standalone program some day if you rely on the POP3 client, use fetchmail or something similar instead
author meillo@marmaro.de
date Thu, 15 Jul 2010 14:24:40 +0200
parents f186650135c3
children bd9704417d49
files INSTALL Makefile.am Makefile.in TODO acconfig.h config.h.in configure configure.ac examples/example.get man/Makefile.am man/Makefile.in man/masqmail.8 man/masqmail.conf.5 man/masqmail.get.5 man/masqmail.route.5 src/Makefile.am src/Makefile.in src/accept.c src/conf.c src/get.c src/masqmail.c src/masqmail.h src/pop3_in.c src/pop3_in.h
diffstat 24 files changed, 25 insertions(+), 1801 deletions(-) [+]
line wrap: on
line diff
--- a/INSTALL	Thu Jul 15 11:48:33 2010 +0200
+++ b/INSTALL	Thu Jul 15 14:24:40 2010 +0200
@@ -78,9 +78,6 @@
 installed, this will be linked, otherwise it will be statically linked
 using the sources included in the package.
 
---enable-pop3
-enables POP3 support (disabled by default)
-
 --disable-resolver
 disables resolver support. Without the resolver functions, masqmail
 uses only gethostbyname() to resolve DNS names, and you cannot send
@@ -96,9 +93,9 @@
 
 --with-libcryto
 instead of using the md5 and hmac functions within the package, link
-dynamically with libcrypto. This applies only if you have POP3 or SMTP
-AUTH enabled. Only makes sense if your resources are limited and you
-have libcrypto installed. Untested.
+dynamically with libcrypto. This applies only if you have SMTP AUTH
+enabled. Only makes sense if your resources are limited and you have
+libcrypto installed. Untested.
 
 --with-glib-static
 links with glib statically. This makes the binary larger by around 30K
@@ -131,7 +128,6 @@
 	drwxr-xr-x 5 mail trusted   4096 May 10 12:34 /var/spool/masqmail
 	drwxr-xr-x 2 mail trusted   4096 May 10 12:34 /var/spool/masqmail/input
 	drwxr-xr-x 2 mail trusted   4096 May 10 12:34 /var/spool/masqmail/lock
-	drwxr-xr-x 2 mail trusted   4096 May 10 12:34 /var/spool/masqmail/popuidl
 
 Important are the set-user-id bit for /usr/local/sbin/masqmail and
 the permissions of all files.
--- a/Makefile.am	Thu Jul 15 11:48:33 2010 +0200
+++ b/Makefile.am	Thu Jul 15 14:24:40 2010 +0200
@@ -55,14 +55,12 @@
 	install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@
 	install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/lock
 	install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/input
-	install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/popuidl
 
 rm-spool_dir:
 	: # removal fails if the dirs are non-empty
 	: # this prevents losing spooled files
 	rmdir $(DESTDIR)@with_spooldir@/lock
 	rmdir $(DESTDIR)@with_spooldir@/input
-	rmdir $(DESTDIR)@with_spooldir@/popuidl
 	rmdir $(DESTDIR)@with_spooldir@
 
 rmail:
--- a/Makefile.in	Thu Jul 15 11:48:33 2010 +0200
+++ b/Makefile.in	Thu Jul 15 14:24:40 2010 +0200
@@ -738,14 +738,12 @@
 	install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@
 	install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/lock
 	install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/input
-	install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/popuidl
 
 rm-spool_dir:
 	: # removal fails if the dirs are non-empty
 	: # this prevents losing spooled files
 	rmdir $(DESTDIR)@with_spooldir@/lock
 	rmdir $(DESTDIR)@with_spooldir@/input
-	rmdir $(DESTDIR)@with_spooldir@/popuidl
 	rmdir $(DESTDIR)@with_spooldir@
 
 rmail:
--- a/TODO	Thu Jul 15 11:48:33 2010 +0200
+++ b/TODO	Thu Jul 15 14:24:40 2010 +0200
@@ -10,9 +10,6 @@
 - more configuration options
 - make conf more fool proof
 
-pop:
-- multidrop support
-
 lookup:
 - optimize MX lookup
 
--- a/acconfig.h	Thu Jul 15 11:48:33 2010 +0200
+++ b/acconfig.h	Thu Jul 15 14:24:40 2010 +0200
@@ -10,8 +10,6 @@
 
 #undef ENABLE_SMTP_SERVER
 
-#undef ENABLE_POP3
-
 #undef ENABLE_AUTH
 
 #undef ENABLE_MAILDIR
--- a/config.h.in	Thu Jul 15 11:48:33 2010 +0200
+++ b/config.h.in	Thu Jul 15 14:24:40 2010 +0200
@@ -11,8 +11,6 @@
 
 #undef ENABLE_SMTP_SERVER
 
-#undef ENABLE_POP3
-
 #undef ENABLE_AUTH
 
 #undef ENABLE_MAILDIR
@@ -51,9 +49,6 @@
 /* If Maildirs are enabled */
 #undef ENABLE_MAILDIR
 
-/* If the POP3 support is enabled */
-#undef ENABLE_POP3
-
 /* If the resolver is to be used */
 #undef ENABLE_RESOLVER
 
--- a/configure	Thu Jul 15 11:48:33 2010 +0200
+++ b/configure	Thu Jul 15 14:24:40 2010 +0200
@@ -706,7 +706,6 @@
 enable_debug
 with_glib_static
 enable_smtp_server
-enable_pop3
 enable_auth
 enable_maildir
 with_libcrypto
@@ -1350,7 +1349,6 @@
   --disable-resolver       disable resolver support
   --disable-debug          disable debugging
   --disable-smtp-server    disable smtp server support
-  --disable-pop3           disable pop3 support
   --enable-auth            enable AUTH (RFC 2554) client support
   --enable-maildir            enable qmail style maildir support
   --enable-ident           enable ident (RFC 1413) support
@@ -5182,21 +5180,6 @@
 
 fi
 
-# Check whether --enable-pop3 was given.
-if test "${enable_pop3+set}" = set; then :
-  enableval=$enable_pop3; if test "x$enable_pop3" != 'xno'; then
-		pop3_enabled='yes'
-	fi
-fi
-
-if test "x$pop3_enabled" = xyes; then
-
-$as_echo "#define ENABLE_POP3 1" >>confdefs.h
-
-#	MD5_LIBS='md5/libmd5c.a'
-	need_md5='yes'
-fi
-
 # Check whether --enable-auth was given.
 if test "${enable_auth+set}" = set; then :
   enableval=$enable_auth; if test "x$enable_auth" != 'xno'; then
--- a/configure.ac	Thu Jul 15 11:48:33 2010 +0200
+++ b/configure.ac	Thu Jul 15 14:24:40 2010 +0200
@@ -143,19 +143,6 @@
 	AC_DEFINE(ENABLE_SMTP_SERVER, 1, [If the SMTP server is enabled])
 fi
 
-dnl pop support (default is use it)
-AC_ARG_ENABLE(pop3,
-	[  --disable-pop3           disable pop3 support],
-	if test "x$enable_pop3" != 'xno'; then
-		pop3_enabled='yes'
-	fi,
-	)
-if test "x$pop3_enabled" = xyes; then
-	AC_DEFINE(ENABLE_POP3, 1, [If the POP3 support is enabled])
-#	MD5_LIBS='md5/libmd5c.a'
-	need_md5='yes'
-fi
-
 dnl auth support (default is to not use it)
 AC_ARG_ENABLE(auth,
 	[  --enable-auth            enable AUTH (RFC 2554) client support],
--- a/examples/example.get	Thu Jul 15 11:48:33 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-# example 'mail get' configuration
-#
-# the protocol, only 'pop3' or 'apop' are supported. apop is
-# recommended if the server supports it (password encryption).
-# Unfortunately most do not.
-protocol=apop
-
-# the server:
-server = pop.example.org
-
-# the account name:
-user=okurth
-
-# and the password:
-pass="keepInMind"
-
-# the (local) address, where the retrieved mail should be sent to:
-address=okurth@localhost
-
-# should we keep the mail on server?
-do_keep=false
-
-# if we do keep the mail, you should really set this to true,
-# otherwise you will get it again next time you fetch mail.
-# masqmail completely ignores any headers (which may mark a mail as read).
-do_uidl=false
-
-# optionally, you can set the maximum size of a mail. Setting it to 0
-# means get all, disregarding size.
-max_size=50000
--- a/man/Makefile.am	Thu Jul 15 11:48:33 2010 +0200
+++ b/man/Makefile.am	Thu Jul 15 14:24:40 2010 +0200
@@ -1,1 +1,1 @@
-man_MANS=masqmail.8 mservdetect.1 masqmail.conf.5 masqmail.route.5 masqmail.get.5 masqmail.aliases.5 rmail.8
+man_MANS=masqmail.8 mservdetect.1 masqmail.conf.5 masqmail.route.5 masqmail.aliases.5 rmail.8
--- a/man/Makefile.in	Thu Jul 15 11:48:33 2010 +0200
+++ b/man/Makefile.in	Thu Jul 15 14:24:40 2010 +0200
@@ -176,7 +176,7 @@
 with_logdir = @with_logdir@
 with_spooldir = @with_spooldir@
 with_user = @with_user@
-man_MANS = masqmail.8 mservdetect.1 masqmail.conf.5 masqmail.route.5 masqmail.get.5 masqmail.aliases.5 rmail.8
+man_MANS = masqmail.8 mservdetect.1 masqmail.conf.5 masqmail.route.5 masqmail.aliases.5 rmail.8
 all: all-am
 
 .SUFFIXES:
--- a/man/masqmail.8	Thu Jul 15 11:48:33 2010 +0200
+++ b/man/masqmail.8	Thu Jul 15 14:24:40 2010 +0200
@@ -14,10 +14,6 @@
 
 \fB/usr/sbin/masqmail \fR[\fB\-qo \fR[\fIname\fR]]
 
-\fB/usr/sbin/masqmail \fR[\fB\-odq\fR] [\fB\-g \fR[\fIname\fR]]
-
-\fB/usr/sbin/masqmail \fR[\fB\-odq\fR] [\fB\-go \fR[\fIname\fR]]
-
 \fB/usr/sbin/masqmail \fR[\fB\-t\fR] [\fB\-oi\fR] [\fB\-f \fIaddress\fR] [\fB\-\-\fR] \fIaddress...
 
 \fB/usr/sbin/mailq\fR
@@ -29,8 +25,6 @@
 e.g. a home network or a single host at home.
 It has special support for connections to different ISPs.
 It replaces sendmail or other MTAs such as qmail or exim.
-It can also act as a POP3 client (if this functionality has not been disabled at
-build configuration time).
 
 
 .SH OPTIONS
@@ -117,32 +111,6 @@
 Set the full sender name (in the From: header) to \fIstring\fR.
 
 .TP
-\fB\-g [\fIname\fB]\fR
-
-Get mail (using pop3 or apop),
-using the configurations given with get.\fIname\fR in the main configuration.
-Without \fIname\fR, all get configurations will be used.
-See also \fBmasqmail.get(5)\fR
-
-.TP
-\fB\-go [\fIinterval\fB] [\fIname\fB]\fR
-
-Can be followed by a connection name.
-Use this option in your script which starts as soon as a link to the internet
-has been set up (usually ip-up).
-When masqmail is called with this option, the specified get configuration(s)
-is(are) read and mail will be retrieved from servers on the internet.
-The \fIname\fR is defined in the configuration (see \fBonline_gets.\fIname\fR).
-
-If called with an interval option (recognized by a digit as the first characater),
-masqmail starts as a daemon and tries to get mail in these intervals.
-It checks for the online status first.
-Example: `masqmail \-go 5m' will retrieve mail every five minutes.
-
-If called without \fIname\fR, the online status is determined with the configured method
-(see \fBonline_detect\fR in \fBmasqmail.conf(5)\fR).
-
-.TP
 \fB\-i\fR
 
 Same as \fB\-oi\fR, see below.
@@ -263,7 +231,7 @@
 files in \fI/etc/masqmail/\fR.
 
 \fI/var/spool/masqmail/\fR is the spool directory where masqmail stores
-its spooled messages and the uniq pop ids.
+its spooled messages.
 
 \fI/var/spool/mail/\fR is the directory where locally delivered mail will be put,
 if not configured differently in \fImasqmail.conf\fR.
@@ -276,8 +244,6 @@
 
 RFC 821, 822, 1869, 1870, 2197, 2554 (SMTP)
 
-RFC 1725, 1939 (POP3)
-
 RFC 1321 (MD5)
 
 RFC 2195 (CRAM-MD5)
@@ -299,4 +265,4 @@
 
 .SH SEE ALSO
 
-\fBmasqmail.conf(5)\fR, \fBmasqmail.route(5)\fR, \fBmasqmail.get(5)\fR, \fBmasqmail.aliases(5)\fR
+\fBmasqmail.conf(5)\fR, \fBmasqmail.route(5)\fR, \fBmasqmail.aliases(5)\fR
--- a/man/masqmail.conf.5	Thu Jul 15 11:48:33 2010 +0200
+++ b/man/masqmail.conf.5	Thu Jul 15 14:24:40 2010 +0200
@@ -26,7 +26,7 @@
 The spaces in front of and after the equal sign `=' are optional.
 
 Most lists (exceptions: \fBlocal_hosts\fR, \fBlocal_nets\fR, \fBlisten_addresses\fR,
- \fBonline_routes\fR, and \fBonline_gets\fR) accept files.
+and \fBonline_routes\fR) accept files.
 These will be recognized by a leading slash `/'.
 The contents of these files will be included at the position of the file name,
 there can be items or other files before and after the file entry.
@@ -184,7 +184,7 @@
 If this is set to true, a possibly existing Envelope-to: header in an incoming mail
 which is received via either pop3 or smtp will be saved as an X-Orig-Envelope-to: header.
 
-This is useful if you retrieve mail from a pop3 server with either masqmail or fetchmail,
+This is useful if you retrieve mail from a pop3 server with fetchmail,
 and the server supports Envelope-to: headers,
 and you want to make use of those with a mail filtering tool, e.g. procmail.
 It cannot be preserved because masqmail sets such a header by itself.
@@ -411,20 +411,6 @@
 
 
 .TP
-\fBget.\fIname\fR = \fIfile\fR
-
-Replace \fIname\fR with a name to identify a get configuration.
-Set this to a filename for the get configuration.
-These files will be used to retrieve mail when called with the \-g option.
-
-.TP
-\fBonline_gets.\fIname\fR = \fIlist\fR
-
-Replace \fIname\fR with a name to identify an online configuration.
-Set this to a filename (or a list of filenames) for the get configuration.
-These files will be used to retrieve mail when called with the \-go option.
-
-.TP
 \fBident_trusted_nets = \fIlist\fR
 
 \fIlist\fR is a list of networks of the form a.b.c.d/e (e.g. 192.168.1.0/24),
@@ -526,4 +512,4 @@
 
 .SH SEE ALSO
 
-\fBmasqmail(8)\fR, \fBmasqmail.route(5)\fR, \fBmasqmail.get(5)\fR
+\fBmasqmail(8)\fR, \fBmasqmail.route(5)\fR
--- a/man/masqmail.get.5	Thu Jul 15 11:48:33 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,151 +0,0 @@
-.TH masqmail.get 5 2010-07-06 masqmail-0.2.25 "File Formats"
-
-.SH NAME
-masqmail.get \- masqmail get configuration file
-
-
-.SH DESCRIPTION
- 
-This man page describes the options available for the masqmail get configuration.
-
-
-.SH OPTIONS
-
-.TP
-\fBprotocol\fR = \fIstring\fR
-
-The protocol with which you retrieve your mail.
-Currently only `pop3' and `apop' are supported.
-There is no default.
-
-.TP
-\fBserver\fR = \fIstring\fR
-
-The server you get your mail from.
-
-.TP
-\fBport\fR = \fInumber\fR
-
-The port number of \fBserver\fP to connect to.
-
-Default: 110.
-
-.TP
-\fBresolve_list\fR = \fIlist\fR
-
-Specify the method how the domain of the server is resolved.
-Possible values are dns_mx, dns_a, byname.
-For `dns_mx', the domain is assumed to be an MX pointer to a list of host names,
-these will be tried each in order
-(lowest preference value first, equal preference values in random order).
-For `dns_a', the domain is assumed to be an A pointer.
-For `byname', the library function \fBgethostbyname(3)\fR will be used.
-
-The default is "dns_a;byname".
-It does not make much sense here to use `dns_mx'.
-
-.TP
-\fBuser\fR = \fIstring\fR
-
-Your login name.
-
-.TP
-\fBpass\fR = \fIstring\fR
-
-Your password.
-
-.TP
-\fBaddress\fR = \fIaddress\fR
-
-The address where the retrieved mail should be sent to.
-It can be any address, but you probably want to set this to a local address on your LAN.
-
-.TP
-\fBreturn_path\fR = \fIaddress\fR
-
-If set, masqmail sets the return path to this address.
-Bounces generated during further delivery will be sent to this address.
-If unset, masqmail looks for the Return-Path: header in the mail,
-if this does not exist it uses the From: address and if this fails, postmaster will be used.
-
-It is in most cases not useful to set this to the same address as the `address'
-option as this may generate multiple bounces.
-postmaster is recommended.
-
-.TP
-\fBdo_keep\fR = \fIboolean\fR
-
-If you want to keep your mail on the server after you retrieved it, set this to true.
-It is recommended that you also set do_uidl,
-otherwise you will get the mail again each time you connect to the server.
-Masqmail does not check any headers before it retrieves mail, which may mark it as already fetched.
-Note that this behaviour is different to that of fetchmail.
-The default is false.
-
-.TP
-\fBdo_uidl\fR = \fIboolean\fR
-
-If set, masqmail keeps a list of unique IDs of mails already fetched,
-so that they will not be retrieved again.
-Default is false.
-
-.TP
-\fBdo_uidl_dele\fR = \fIboolean\fR
-
-If set, and \fBdo_uidl\fR is also set, MasqMail sends a delete (DELE) command
-to the server for each message uid in the uid listing at the beginning of the session.
-This prevents mail to be left on the server if masqmail gets interrupted during
-a session before it can send the QUIT command to the server.
-Default is false.
-
-.TP
-\fBmax_size\fR = \fInumeric\fR
-
-If set to a value > 0, only messages smaller than this in bytes will be retrieved.
-The default is 0.
-
-.TP
-\fBmax_count\fR = \fInumeric\fR
-
-If set to a value > 0, only \fBmax_count\fR messages will be retrieved.
-The default is 0.
-
-.TP
-\fBmax_size_delete\fR = \fIboolean\fR
-
-If \fBmax_size\fP > 0 and \fBdo_uidl_dele\fP is set,
-delete messages that are larger than \fImax_size\fP on the server
-WITHOUT retrieving them.
-Be careful with this option.
-
-Default: false
-
-.TP
-\fBwrapper\fR = \fIcommand\fR
-
-If set, instead of opening a connection to a remote server,
-\fIcommand\fR will be called and all traffic will be piped to its stdin and from its stdout.
-Purpose is to tunnel ip traffic, e.g. for ssl.
-
-Example for ssl tunneling:
-
-wrapper="/usr/bin/openssl s_client \-quiet \-connect pop.gmx.net:995 2>/dev/null"
-
-
-.SH AUTHOR
-
-Masqmail was written by Oliver Kurth.
-It is now maintained by Markus Schnalke <meillo@marmaro.de>.
-
-You will find the newest version of masqmail at \fBhttp://marmaro.de/prog/masqmail/\fR.
-There is also a mailing list, you will find information about it at masqmail's main site.
-
-
-.SH BUGS
-
-Please report bugs to the mailing list.
-
-
-.SH SEE ALSO
-
-\fBmasqmail(8)\fR, \fBmasqmail.route(5)\fR, \fBmasqmail.conf(5)\fR
--- a/man/masqmail.route.5	Thu Jul 15 11:48:33 2010 +0200
+++ b/man/masqmail.route.5	Thu Jul 15 14:24:40 2010 +0200
@@ -317,4 +317,4 @@
 
 .SH SEE ALSO
 
-\fBmasqmail(8)\fR, \fBmasqmail.conf(5)\fR, \fBmasqmail.get(5)\fR
+\fBmasqmail(8)\fR, \fBmasqmail.conf(5)\fR
--- a/src/Makefile.am	Thu Jul 15 11:48:33 2010 +0200
+++ b/src/Makefile.am	Thu Jul 15 14:24:40 2010 +0200
@@ -22,7 +22,6 @@
 	dotlock.c\
 	expand.c\
 	fail_msg.c\
-	get.c\
 	header.c\
 	interface.c\
 	local.c\
@@ -36,8 +35,6 @@
 	peopen.c\
 	peopen.h\
 	permissions.c\
-	pop3_in.c\
-	pop3_in.h\
 	readsock.c\
 	rewrite.c\
 	route.c\
--- a/src/Makefile.in	Thu Jul 15 11:48:33 2010 +0200
+++ b/src/Makefile.in	Thu Jul 15 14:24:40 2010 +0200
@@ -50,15 +50,14 @@
 am_masqmail_OBJECTS = accept.$(OBJEXT) address.$(OBJEXT) \
 	alias.$(OBJEXT) child.$(OBJEXT) connect.$(OBJEXT) \
 	conf.$(OBJEXT) deliver.$(OBJEXT) dotlock.$(OBJEXT) \
-	expand.$(OBJEXT) fail_msg.$(OBJEXT) get.$(OBJEXT) \
-	header.$(OBJEXT) interface.$(OBJEXT) local.$(OBJEXT) \
-	log.$(OBJEXT) listen.$(OBJEXT) lookup.$(OBJEXT) \
-	masqmail.$(OBJEXT) message.$(OBJEXT) online.$(OBJEXT) \
-	parse.$(OBJEXT) peopen.$(OBJEXT) permissions.$(OBJEXT) \
-	pop3_in.$(OBJEXT) readsock.$(OBJEXT) rewrite.$(OBJEXT) \
-	route.$(OBJEXT) queue.$(OBJEXT) smtp_in.$(OBJEXT) \
-	smtp_out.$(OBJEXT) spool.$(OBJEXT) tables.$(OBJEXT) \
-	timeival.$(OBJEXT)
+	expand.$(OBJEXT) fail_msg.$(OBJEXT) header.$(OBJEXT) \
+	interface.$(OBJEXT) local.$(OBJEXT) log.$(OBJEXT) \
+	listen.$(OBJEXT) lookup.$(OBJEXT) masqmail.$(OBJEXT) \
+	message.$(OBJEXT) online.$(OBJEXT) parse.$(OBJEXT) \
+	peopen.$(OBJEXT) permissions.$(OBJEXT) readsock.$(OBJEXT) \
+	rewrite.$(OBJEXT) route.$(OBJEXT) queue.$(OBJEXT) \
+	smtp_in.$(OBJEXT) smtp_out.$(OBJEXT) spool.$(OBJEXT) \
+	tables.$(OBJEXT) timeival.$(OBJEXT)
 masqmail_OBJECTS = $(am_masqmail_OBJECTS)
 masqmail_DEPENDENCIES =
 am_mservdetect_OBJECTS = mservdetect.$(OBJEXT) readsock.$(OBJEXT) \
@@ -250,7 +249,6 @@
 	dotlock.c\
 	expand.c\
 	fail_msg.c\
-	get.c\
 	header.c\
 	interface.c\
 	local.c\
@@ -264,8 +262,6 @@
 	peopen.c\
 	peopen.h\
 	permissions.c\
-	pop3_in.c\
-	pop3_in.h\
 	readsock.c\
 	rewrite.c\
 	route.c\
@@ -451,7 +447,6 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dotlock.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/expand.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fail_msg.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/header.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interface.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listen.Po@am__quote@
@@ -465,7 +460,6 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/peopen.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/permissions.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop3_in.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/queue.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readsock.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readtest.Po@am__quote@
--- a/src/accept.c	Thu Jul 15 11:48:33 2010 +0200
+++ b/src/accept.c	Thu Jul 15 14:24:40 2010 +0200
@@ -24,8 +24,6 @@
 	"bsmtp",
 	"smtp",
 	"esmtp",
-	"pop3",
-	"apop",
 	"(unknown)"  /* should not happen, but better than crashing. */
 };
 
--- a/src/conf.c	Thu Jul 15 11:48:33 2010 +0200
+++ b/src/conf.c	Thu Jul 15 14:24:40 2010 +0200
@@ -548,22 +548,7 @@
 			conf.online_pipe = g_strdup(rval);
 		else if (strcmp(lval, "do_queue") == 0)
 			conf.do_queue = parse_boolean(rval);
-		else if (strncmp(lval, "get.", 4) == 0) {
-#ifdef ENABLE_POP3
-			table_pair *pair = create_pair_string(&(lval[4]), rval);
-			conf.get_names = g_list_append(conf.get_names, pair);
-#else
-			logwrite(LOG_WARNING, "get.<name> ignored: not compiled with pop support\n");
-#endif
-		} else if (strncmp(lval, "online_gets.", 12) == 0) {
-#ifdef ENABLE_POP3
-			GList *file_list = parse_list(rval, FALSE);
-			table_pair *pair = create_pair(&(lval[12]), file_list);
-			conf.online_gets = g_list_append(conf.online_gets, pair);
-#else
-			logwrite(LOG_WARNING, "online_gets.<name> ignored: not compiled with pop support\n");
-#endif
-		} else if (strcmp(lval, "errmsg_file") == 0)
+		else if (strcmp(lval, "errmsg_file") == 0)
 			conf.errmsg_file = g_strdup(rval);
 		else if (strcmp(lval, "warnmsg_file") == 0)
 			conf.warnmsg_file = g_strdup(rval);
@@ -896,100 +881,6 @@
 	g_list_free(list);
 }
 
-#ifdef ENABLE_POP3
-
-get_conf*
-read_get_conf(gchar * filename)
-{
-	FILE *in;
-
-	get_conf *gc = g_malloc(sizeof(get_conf));
-	memset(gc, 0, sizeof(get_conf));
-
-	gc->server_port = 110;
-
-	if ((in = fopen(filename, "r")) == NULL) {
-		logwrite(LOG_ALERT, "could not open get file %s: %s\n", filename, strerror(errno));
-		g_free(gc);
-		return NULL;
-	}
-
-	gchar lval[256], rval[2048];
-	while (read_statement(in, lval, 256, rval, 2048)) {
-		if (strcmp(lval, "protocol") == 0)
-			gc->protocol = g_strdup(rval);
-		else if (strcmp(lval, "server") == 0)
-			gc->server_name = g_strdup(rval);
-		else if (strcmp(lval, "port") == 0)
-			gc->server_port = atoi(rval);
-		else if (strcmp(lval, "wrapper") == 0)
-			gc->wrapper = g_strdup(rval);
-		else if (strcmp(lval, "user") == 0)
-			gc->login_user = g_strdup(rval);
-		else if (strcmp(lval, "pass") == 0)
-			gc->login_pass = g_strdup(rval);
-		else if (strcmp(lval, "address") == 0)
-			gc->address = create_address_qualified(rval, TRUE, conf.host_name);
-		else if (strcmp(lval, "return_path") == 0)
-			gc->return_path = create_address_qualified(rval, TRUE, conf.host_name);
-		else if (strcmp(lval, "do_ssl") == 0)
-			/* we ignore this. This option is used by sqilconf */
-			;
-		else if (strcmp(lval, "do_keep") == 0)
-			gc->do_keep = parse_boolean(rval);
-		else if (strcmp(lval, "do_uidl") == 0)
-			gc->do_uidl = parse_boolean(rval);
-		else if (strcmp(lval, "do_uidl_dele") == 0)
-			gc->do_uidl_dele = parse_boolean(rval);
-		else if (strcmp(lval, "max_size") == 0)
-			gc->max_size = atoi(rval);
-		else if (strcmp(lval, "max_size_delete") == 0)
-			gc->max_size_delete = parse_boolean(rval);
-		else if (strcmp(lval, "max_count") == 0)
-			gc->max_count = atoi(rval);
-		else if (strcmp(lval, "resolve_list") == 0)
-			gc->resolve_list = parse_resolve_list(rval);
-		else
-			logwrite(LOG_WARNING, "var '%s' not (yet) known, ignored\n", lval);
-	}
-	fclose(in);
-
-	if (gc->resolve_list == NULL) {
-#ifdef ENABLE_RESOLVER
-		gc->resolve_list = g_list_append(NULL, resolve_dns_a);
-#endif
-		gc->resolve_list = g_list_append(NULL, resolve_byname);
-	}
-
-	if (gc->protocol == NULL)
-		gc->protocol = g_strdup("pop3");
-	return gc;
-}
-
-void
-destroy_get_conf(get_conf * gc)
-{
-	if (gc->protocol)
-		g_free(gc->protocol);
-	if (gc->server_name)
-		g_free(gc->server_name);
-	if (gc->login_user)
-		g_free(gc->login_user);
-	if (gc->login_pass)
-		g_free(gc->login_pass);
-	if (gc->wrapper)
-		g_free(gc->wrapper);
-	if (gc->address)
-		destroy_address(gc->address);
-	if (gc->return_path)
-		destroy_address(gc->return_path);
-	if (gc->resolve_list)
-		g_list_free(gc->resolve_list);
-	g_free(gc);
-}
-
-#endif
-
 connect_route*
 create_local_route()
 {
--- a/src/get.c	Thu Jul 15 11:48:33 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,372 +0,0 @@
-/*  MasqMail
-    Copyright (C) 2000-2002 Oliver Kurth
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include <sys/wait.h>
-#include <sys/file.h>
-#include <sys/types.h>
-
-#include "masqmail.h"
-#include "pop3_in.h"
-
-#ifdef ENABLE_POP3
-
-static int volatile sighup_seen = 0;
-
-static void
-sighup_handler(int sig)
-{
-	sighup_seen = 1;
-	signal(SIGHUP, sighup_handler);
-}
-
-static void
-sigchld_handler(int sig)
-{
-	pid_t pid;
-	int status;
-
-	pid = waitpid(0, &status, 0);
-	if (pid > 0) {
-		if (WEXITSTATUS(status) != EXIT_SUCCESS)
-			logwrite(LOG_WARNING, "process %d exited with %d\n", pid, WEXITSTATUS(status));
-		if (WIFSIGNALED(status))
-			logwrite(LOG_WARNING, "process with pid %d got signal: %d\n", pid, WTERMSIG(status));
-	}
-	signal(SIGCHLD, sigchld_handler);
-}
-
-static int
-get_lock(get_conf * gc)
-{
-#ifdef USE_DOTLOCK
-	gboolean ok = FALSE;
-	gchar *hitch_name;
-	gchar *lock_name;
-
-	/* the name of the lock is constructed from the user
-	   and the server name, to prevent more than one connection at the same time
-	   to the same server and the same user. This way concurrent connections
-	   are possible to different servers or different users */
-	hitch_name = g_strdup_printf("%s/masqmail-get-%s@%s-%d.lock",
-	                             conf.lock_dir, gc->login_user, gc->server_name, getpid());
-	lock_name = g_strdup_printf("%s/masqmail-get-%s@%s.lock",
-	                            conf.lock_dir, gc->login_user, gc->server_name);
-
-	ok = dot_lock(lock_name, hitch_name);
-	if (!ok)
-		logwrite(LOG_WARNING, "getting mail for %s@%s is locked\n", gc->login_user, gc->server_name);
-
-	g_free(lock_name);
-	g_free(hitch_name);
-
-	return ok;
-#else
-	gchar *lock_name;
-	int fd;
-
-	lock_name = g_strdup_printf("%s/masqmail-get-%s@%s.lock", conf.lock_dir, gc->login_user, gc->server_name);
-
-	if ((fd = open(lock_name, O_WRONLY | O_NDELAY | O_APPEND | O_CREAT, 0600)) >= 0) {
-		if (flock(fd, LOCK_EX | LOCK_NB) != 0) {
-			close(fd);
-			logwrite(LOG_WARNING, "getting mail for %s@%s is locked\n", gc->login_user, gc->server_name);
-			fd = -1;
-		}
-	} else
-		logwrite(LOG_WARNING, "could not open lock %s: %s\n", lock_name, strerror(errno));
-
-	g_free(lock_name);
-
-	return fd;
-#endif
-}
-
-#ifdef USE_DOTLOCK
-static gboolean
-get_unlock(get_conf * gc)
-{
-	gchar *lock_name lock_name = g_strdup_printf("%s/masqmail-get-%s@%s.lock",
-	                                             conf.lock_dir, gc->login_user, gc->server_name);
-
-	dot_unlock(lock_name);
-	g_free(lock_name);
-
-	return TRUE;
-}
-#else
-static void
-get_unlock(get_conf * gc, int fd)
-{
-	gchar *lock_name = g_strdup_printf("%s/masqmail-get-%s@%s.lock",
-	                                   conf.lock_dir, gc->login_user, gc->server_name);
-
-	flock(fd, LOCK_UN);
-	close(fd);
-
-	unlink(lock_name);
-	g_free(lock_name);
-}
-#endif
-
-gboolean
-get_from_file(gchar * fname)
-{
-	guint flags = 0;
-	get_conf *gc = read_get_conf(fname);
-	gboolean ok = TRUE;
-	int lock;
-
-	if (gc) {
-		if (!gc->do_keep)
-			flags |= POP3_FLAG_DELETE;
-		if (gc->do_uidl)
-			flags |= POP3_FLAG_UIDL;
-		if (gc->do_uidl_dele)
-			flags |= POP3_FLAG_UIDL_DELE;
-
-		if (!(gc->server_name)) {
-			logwrite(LOG_ALERT, "no server name given in %s\n", fname);
-			return FALSE;
-		}
-		if (!(gc->address)) {
-			logwrite(LOG_ALERT, "no address given in %s\n", fname);
-			return FALSE;
-		}
-		if (!(gc->login_user)) {
-			logwrite(LOG_ALERT, "no user name given in %s\n", fname);
-			return FALSE;
-		}
-		if (!(gc->login_pass)) {
-			logwrite(LOG_ALERT, "no password given in %s\n", fname);
-			return FALSE;
-		}
-
-		DEBUG(3) debugf("flags = %d\n", flags);
-
-		if ((strcmp(gc->protocol, "pop3") == 0) || (strcmp(gc->protocol, "apop") == 0)) {
-			pop3_base *popb = NULL;
-
-			if (strcmp(gc->protocol, "apop") == 0) {
-				flags |= POP3_FLAG_APOP;
-				DEBUG(3) debugf("attempting to get mail for user %s at host %s for %s@%s with apop\n",
-				                gc->login_user, gc->server_name, gc->address->local_part, gc->address->domain);
-			} else {
-				DEBUG(3) debugf("attempting to get mail for user %s at host %s for %s@%s with pop3\n",
-				                gc->login_user, gc->server_name, gc->address->local_part, gc->address->domain);
-			}
-#ifdef USE_DOTLOCK
-			if ((lock = get_lock(gc))) {
-#else
-			if ((lock = get_lock(gc)) >= 0) {
-#endif
-				if (gc->wrapper) {
-					popb = pop3_in_open_child(gc->wrapper, flags);
-					/* quick hack */
-					popb->remote_host = gc->server_name;
-				} else {
-					popb = pop3_in_open(gc->server_name, gc->server_port, gc->resolve_list, flags);
-				}
-				if (popb) {
-					ok = pop3_get(popb, gc->login_user, gc->login_pass, gc->address, gc->return_path,
-					              gc->max_count, gc->max_size, gc->max_size_delete);
-					pop3_in_close(popb);
-				} else {
-					ok = FALSE;
-					logwrite(LOG_ALERT, "failed to connect to host %s\n", gc->server_name);
-				}
-#ifdef USE_DOTLOCK
-				get_unlock(gc);
-#else
-				get_unlock(gc, lock);
-#endif
-			}
-		} else {
-			logwrite(LOG_ALERT, "get protocol %s unknown\n", gc->protocol);
-			ok = FALSE;
-		}
-
-		destroy_get_conf(gc);
-	}
-	return ok;
-}
-
-gboolean
-get_from_name(gchar * name)
-{
-	gchar *fname = (gchar *) table_find(conf.get_names, name);
-	if (fname)
-		return get_from_file(fname);
-	return FALSE;
-}
-
-gboolean
-get_all()
-{
-	GList *get_table = conf.get_names;
-	GList *get_node;
-	void (*old_signal) (int);
-
-	old_signal = signal(SIGCHLD, SIG_DFL);
-
-	foreach(get_table, get_node) {
-		table_pair *pair = (table_pair *) (get_node->data);
-		gchar *fname = (gchar *) pair->value;
-		pid_t pid;
-
-		pid = fork();
-		if (pid == 0) {
-			signal(SIGCHLD, old_signal);
-			exit(get_from_file(fname) ? EXIT_SUCCESS : EXIT_FAILURE);
-		} else if (pid > 0) {
-			int status;
-			waitpid(pid, &status, 0);
-			if (WEXITSTATUS(status) != EXIT_SUCCESS)
-				logwrite(LOG_WARNING, "child returned %d\n", WEXITSTATUS(status));
-			if (WIFSIGNALED(status))
-				logwrite(LOG_WARNING, "child got signal: %d\n", WTERMSIG(status));
-		} else
-			logwrite(LOG_WARNING, "forking child failed: %s\n", strerror(errno));
-	}
-
-	signal(SIGCHLD, old_signal);
-
-	return TRUE;
-}
-
-void
-get_online()
-{
-	GList *gf_list = NULL;
-	gchar *connect_name = detect_online();
-
-	if (connect_name != NULL) {
-		void (*old_signal) (int);
-
-		old_signal = signal(SIGCHLD, SIG_DFL);
-
-		logwrite(LOG_NOTICE, "detected online configuration %s\n", connect_name);
-		/* we are online! */
-		gf_list = (GList *) table_find(conf.online_gets, connect_name);
-		if (gf_list != NULL) {
-			GList *node;
-			foreach(gf_list, node) {
-				gchar *fname = (gchar *) (node->data);
-				pid_t pid;
-
-				if (fname[0] != '/')
-					fname = (gchar *) table_find(conf.get_names, fname);
-
-				if (fname != NULL) {
-					pid = fork();
-					if (pid == 0) {
-						signal(SIGCHLD, old_signal);
-						exit(get_from_file(fname) ? EXIT_SUCCESS : EXIT_FAILURE);
-					} else if (pid > 0) {
-						int status;
-						waitpid(pid, &status, 0);
-						if (WEXITSTATUS(status) != EXIT_SUCCESS)
-							logwrite(LOG_WARNING, "child returned %d\n", WEXITSTATUS(status));
-						if (WIFSIGNALED(status))
-							logwrite(LOG_WARNING, "child got signal: %d\n", WTERMSIG(status));
-					} else
-						logwrite(LOG_WARNING, "forking child failed: %s\n", strerror(errno));
-				}
-			}
-		}
-		signal(SIGCHLD, old_signal);
-	}
-}
-
-void
-get_daemon(gint gival, char *argv[])
-{
-	struct timeval tm;
-	time_t time_before, time_now;
-	int sel_ret;
-
-	/* setup handler for HUP signal: */
-	signal(SIGHUP, sighup_handler);
-
-	/* we can give up root privileges */
-	if (!conf.run_as_user) {
-		if (setegid(conf.mail_gid) != 0) {
-			logwrite(LOG_ALERT, "could not change gid to %d: %s\n", conf.mail_gid, strerror(errno));
-			exit(EXIT_FAILURE);
-		}
-		if (seteuid(conf.mail_uid) != 0) {
-			logwrite(LOG_ALERT, "could not change uid to %d: %s\n", conf.mail_uid, strerror(errno));
-			exit(EXIT_FAILURE);
-		}
-	}
-
-	/*  sel_ret = 0; */
-	time(&time_before);
-	time_before -= gival;
-	sel_ret = -1;
-
-	while (1) {
-		/* see listen_port() in listen.c */
-		if (gival > 0) {
-			time(&time_now);
-			if (sel_ret == 0) {	/* we are either just starting or did a queue run */
-				tm.tv_sec = gival;
-				tm.tv_usec = 0;
-				time_before = time_now;
-			} else {
-				tm.tv_sec = gival - (time_now - time_before);
-				tm.tv_usec = 0;
-
-				/* race condition, very unlikely (but possible): */
-				if (tm.tv_sec < 0)
-					tm.tv_sec = 0;
-			}
-		}
-
-		if ((sel_ret = select(0, NULL, NULL, NULL, &tm)) < 0) {
-			if (errno != EINTR) {
-				logwrite(LOG_ALERT, "select: (terminating): %s\n", strerror(errno));
-				exit(EXIT_FAILURE);
-			} else {
-				if (sighup_seen) {
-					logwrite(LOG_NOTICE, "HUP signal received. Restarting daemon\n");
-
-					if (argv == NULL)
-						exit(EXIT_SUCCESS);
-
-					execv(argv[0], &(argv[0]));
-					logwrite(LOG_ALERT, "restarting failed: %s\n", strerror(errno));
-					exit(EXIT_FAILURE);
-
-				}
-			}
-		} else {
-			/* If select returns 0, the interval time has elapsed. We start a new get process */
-			int pid;
-			signal(SIGCHLD, sigchld_handler);
-			if ((pid = fork()) == 0) {
-				get_online();
-
-				_exit(EXIT_SUCCESS);
-			} else if (pid < 0) {
-				logwrite(LOG_ALERT, "could not fork for get run");
-			}
-		}
-	}
-}
-
-#endif
--- a/src/masqmail.c	Thu Jul 15 11:48:33 2010 +0200
+++ b/src/masqmail.c	Thu Jul 15 14:24:40 2010 +0200
@@ -34,15 +34,13 @@
 
 #include "masqmail.h"
 
-/* mutually exclusive modes. Note that there is neither a 'get' mode
-   nor a 'queue daemon' mode. These, as well as the distinction beween
-   the two (non exclusive) daemon (queue and listen) modes are handled
-   by flags.*/
+/* mutually exclusive modes. Note that there is no 'queue daemon' mode.
+   It, as well as the distinction beween the two (non exclusive) daemon
+   (queue and listen) modes, is handled by flags.*/
 typedef enum _mta_mode {
 	MODE_ACCEPT = 0,  /* accept message on stdin */
 	MODE_DAEMON,  /* run as daemon */
 	MODE_RUNQUEUE,  /* single queue run, online or offline */
-	MODE_GET_DAEMON,  /* run as get (retrieve) daemon */
 	MODE_SMTP,  /* accept SMTP on stdin */
 	MODE_LIST,  /* list queue */
 	MODE_MCMD,  /* do queue manipulation */
@@ -179,49 +177,6 @@
 	listen_port(do_listen ? conf.listen_addresses : NULL, queue_interval, argv);
 }
 
-#ifdef ENABLE_POP3
-static void
-mode_get_daemon(gint get_interval, char *argv[])
-{
-	guint pid;
-
-	/* daemon */
-	if (!conf.run_as_user) {
-		if ((conf.orig_uid != 0) && (conf.orig_uid != conf.mail_uid)) {
-			fprintf(stderr, "must be root or %s for daemon.\n", DEF_MAIL_USER);
-			exit(EXIT_FAILURE);
-		}
-	}
-
-	/* reparent to init only if init is not already the parent */
-	if (getppid() != 1) {
-		if ((pid = fork()) > 0) {
-			exit(EXIT_SUCCESS);
-		} else if (pid < 0) {
-			logwrite(LOG_ALERT, "could not fork!");
-			exit(EXIT_FAILURE);
-		}
-	}
-
-	signal(SIGTERM, sigterm_handler);
-	write_pidfile(PIDFILEDIR "/masqmail-get.pid");
-
-	conf.do_verbose = FALSE;
-
-	/* closing and reopening the log ensures that it is open afterwards
-	   because it is possible that the log is assigned to fd 1 and gets
-	   thus closes by fclose(stdout). Similar for the debugfile.
-	*/
-	logclose();
-	fclose(stdin);
-	fclose(stdout);
-	fclose(stderr);
-	logopen();
-
-	get_daemon(get_interval, argv);
-}
-#endif
-
 #ifdef ENABLE_SMTP_SERVER
 static void
 mode_smtp()
@@ -336,8 +291,6 @@
 	/* cmd line flags */
 	gchar *conf_file = CONF_FILE;
 	gint arg = 1;
-	gboolean do_get = FALSE;
-	gboolean do_get_online = FALSE;
 
 	gboolean do_listen = FALSE;
 	gboolean do_runq = FALSE;
@@ -351,7 +304,6 @@
 	mta_mode mta_mode = MODE_ACCEPT;
 
 	gint queue_interval = 0;
-	gint get_interval = 0;
 	gboolean opt_t = FALSE;
 	gboolean opt_i = FALSE;
 	gboolean opt_odb = FALSE;
@@ -362,7 +314,6 @@
 
 	gint exit_code = EXIT_SUCCESS;
 	gchar *route_name = NULL;
-	gchar *get_name = NULL;
 	gchar *progname;
 	gchar *f_address = NULL;
 	gchar *full_sender_name = NULL;
@@ -464,30 +415,6 @@
 					}
 				}
 				break;
-			case 'g':
-				do_get = TRUE;
-				if (!mta_mode)
-					mta_mode = MODE_NONE;  /* to prevent default MODE_ACCEPT */
-				if (argv[arg][pos] == 'o') {
-					pos++;
-					do_get_online = TRUE;
-					/* can be NULL, then we use online detection method */
-					route_name = get_optarg(argv, argc, &arg, &pos);
-
-					if (route_name != NULL) {
-						if (isdigit(route_name[0])) {
-							get_interval = time_interval(route_name, &pos);
-							route_name = get_optarg(argv, argc, &arg, &pos);
-							mta_mode = MODE_GET_DAEMON;
-							do_get = FALSE;
-						}
-					}
-				} else {
-					if ((optarg = get_optarg(argv, argc, &arg, &pos))) {
-						get_name = get_optarg(argv, argc, &arg, &pos);
-					}
-				}
-				break;
 			case 'i':
 				if (argv[arg][pos] == 0) {
 					opt_i = TRUE;
@@ -574,7 +501,6 @@
 	if (mta_mode == MODE_VERSION) {
 		gchar *with_resolver = "";
 		gchar *with_smtp_server = "";
-		gchar *with_pop3 = "";
 		gchar *with_auth = "";
 		gchar *with_maildir = "";
 		gchar *with_ident = "";
@@ -585,9 +511,6 @@
 #ifdef ENABLE_SMTP_SERVER
 		with_smtp_server = " +smtp-server";
 #endif
-#ifdef ENABLE_POP3
-		with_pop3 = " +pop3";
-#endif
 #ifdef ENABLE_AUTH
 		with_auth = " +auth";
 #endif
@@ -598,8 +521,8 @@
 		with_ident = " +ident";
 #endif
 
-		printf("%s %s%s%s%s%s%s%s\n", PACKAGE, VERSION, with_resolver, with_smtp_server,
-		       with_pop3, with_auth, with_maildir, with_ident);
+		printf("%s %s%s%s%s%s%s\n", PACKAGE, VERSION, with_resolver, with_smtp_server,
+		       with_auth, with_maildir, with_ident);
 
 		exit(EXIT_SUCCESS);
 	}
@@ -699,30 +622,6 @@
 		}
 	}
 
-	if (do_get) {
-#ifdef ENABLE_POP3
-		if ((mta_mode == MODE_NONE) || (mta_mode == MODE_RUNQUEUE)) {
-			set_identity(conf.orig_uid, "getting mail");
-			if (do_get_online) {
-				if (route_name != NULL) {
-					conf.online_detect = g_strdup("argument");
-					set_online_name(route_name);
-				}
-				get_online();
-			} else {
-				if (get_name)
-					get_from_name(get_name);
-				else
-					get_all();
-			}
-		} else {
-			logwrite(LOG_ALERT, "get (-g) only allowed alone or together with queue run (-q)\n");
-		}
-#else
-		fprintf(stderr, "get (pop) support not compiled in\n");
-#endif
-	}
-
 	switch (mta_mode) {
 	case MODE_DAEMON:
 		mode_daemon(do_listen, queue_interval, argv);
@@ -745,15 +644,6 @@
 			}
 		}
 		break;
-	case MODE_GET_DAEMON:
-#ifdef ENABLE_POP3
-		if (route_name != NULL) {
-			conf.online_detect = g_strdup("argument");
-			set_online_name(route_name);
-		}
-		mode_get_daemon(get_interval, argv);
-#endif
-		break;
 
 	case MODE_SMTP:
 #ifdef ENABLE_SMTP_SERVER
--- a/src/masqmail.h	Thu Jul 15 11:48:33 2010 +0200
+++ b/src/masqmail.h	Thu Jul 15 14:24:40 2010 +0200
@@ -125,26 +125,6 @@
 	gboolean pipe_fromhack;
 } connect_route;
 
-typedef struct _get_conf {
-	gchar *protocol;
-	gchar *server_name;
-	guint server_port;
-	gchar *wrapper;
-	gchar *login_user;
-	gchar *login_pass;
-	address *address;
-	address *return_path;
-	gboolean do_keep;
-	gboolean do_uidl;
-	gboolean do_uidl_dele;
-	gint max_size;
-	gboolean max_size_delete;
-	gint max_count;
-
-	GList *resolve_list;
-
-} get_conf;
-
 typedef struct _masqmail_conf {
 	gint mail_uid;
 	gint mail_gid;
@@ -207,9 +187,6 @@
 	gchar *online_file;
 	gchar *online_pipe;
 
-	GList *get_names;
-	GList *online_gets;  /* list of pairs which point to lists */
-
 	gchar *errmsg_file;
 	gchar *warnmsg_file;
 	GList *warn_intervals;
@@ -231,8 +208,6 @@
 	PROT_BSMTP,
 	PROT_SMTP,
 	PROT_ESMTP,
-	PROT_POP3,
-	PROT_APOP,
 	PROT_NUM
 } prot_id;
 
@@ -386,8 +361,6 @@
 GList *read_route_list(GList * rf_list, gboolean is_local_net);
 void destroy_route(connect_route * r);
 void destroy_route_list(GList * list);
-get_conf *read_get_conf(gchar * filename);
-void destroy_get_conf(get_conf * gc);
 connect_route *create_local_route();
 
 /* expand.c */
@@ -473,13 +446,6 @@
 gboolean fail_msg(message * msg, gchar * template, GList * failed_rcpts, gchar * err_fmt, va_list args);
 gboolean warn_msg(message * msg, gchar * template, GList * failed_rcpts, gchar * err_fmt, va_list args);
 
-/* get.c */
-gboolean get_from_file(gchar * fname);
-gboolean get_from_name(gchar * name);
-gboolean get_all(void);
-void get_online(void);
-void get_daemon(gint gival, char *argv[]);
-
 /* interface.c */
 gboolean init_sockaddr(struct sockaddr_in *name, interface * iface);
 int make_server_socket(interface * iface);
--- a/src/pop3_in.c	Thu Jul 15 11:48:33 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,783 +0,0 @@
-/* pop3_in.c, Copyright (C) 2000 by Oliver Kurth,
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-/* see RFC 1725 */
-
-#include <sys/wait.h>
-#include <sys/stat.h>
-
-#include "masqmail.h"
-#include "pop3_in.h"
-#include "readsock.h"
-
-#ifdef USE_LIB_CRYPTO
-#include <openssl/md5.h>
-#else
-#include "md5/global.h"
-#include "md5/md5.h"
-#endif
-
-#ifdef ENABLE_POP3
-
-/* experimental feature */
-#define DO_WRITE_UIDL_EARLY 1
-
-static gchar*
-MD5String(char *string)
-{
-	MD5_CTX context;
-	unsigned char digest[16];
-	char str_digest[33];
-	int i;
-
-#ifdef USE_LIB_CRYPTO
-	MD5(string, strlen(string), digest);
-#else
-	MD5Init(&context);
-	MD5Update(&context, string, strlen(string));
-	MD5Final(digest, &context);
-#endif
-	for (i = 0; i < 16; i++)
-		sprintf(str_digest + 2 * i, "%02x", digest[i]);
-
-	return g_strdup(str_digest);
-}
-
-static pop3_base*
-create_pop3base(gint sock, guint flags)
-{
-	gint dup_sock;
-
-	pop3_base *popb = (pop3_base *) g_malloc(sizeof(pop3_base));
-	if (popb) {
-		memset(popb, 0, sizeof(pop3_base));
-
-		popb->error = pop3_ok;
-
-		popb->buffer = (gchar *) g_malloc(POP3_BUF_LEN);
-
-		dup_sock = dup(sock);
-		popb->out = fdopen(sock, "w");
-		popb->in = fdopen(dup_sock, "r");
-
-		popb->flags = flags;
-	}
-	return popb;
-}
-
-static void
-pop3_printf(FILE * out, gchar * fmt, ...)
-{
-	va_list args;
-	va_start(args, fmt);
-
-	DEBUG(4) {
-		gchar buf[256];
-		va_list args_copy;
-
-		va_copy(args_copy, args);
-		vsnprintf(buf, 255, fmt, args_copy);
-		va_end(args_copy);
-
-		debugf(">>>%s", buf);
-	}
-
-	vfprintf(out, fmt, args);
-	fflush(out);
-
-	va_end(args);
-}
-
-static gboolean
-find_uid(pop3_base * popb, gchar * str)
-{
-	GList *node, *node_next;
-
-	for (node = popb->list_uid_old; node; node = node_next) {
-		gchar *uid = (gchar *) (node->data);
-		node_next = node->next;
-		if (strcmp(uid, str) == 0) {
-#if 1
-			popb->list_uid_old = g_list_remove_link(popb->list_uid_old, node);
-			g_list_free_1(node);
-			g_free(uid);
-#endif
-			return TRUE;
-		}
-	}
-	return FALSE;
-}
-
-static gboolean
-write_uidl(pop3_base * popb, gchar * user)
-{
-	gboolean ok = FALSE;
-	GList *node;
-	gchar *filename = g_strdup_printf("%s/popuidl/%s@%s", conf.spool_dir, user, popb->remote_host);
-	gchar *tmpname = g_strdup_printf("%s.tmp", filename);
-	FILE *fptr = fopen(tmpname, "wt");
-
-	if (fptr) {
-		foreach(popb->drop_list, node) {
-			msg_info *info = (msg_info *) (node->data);
-			if (info->is_fetched || info->is_in_uidl)
-				fprintf(fptr, "%s\n", info->uid);
-		}
-		fclose(fptr);
-		ok = (rename(tmpname, filename) != -1);
-	}
-
-	g_free(tmpname);
-	g_free(filename);
-	return ok;
-}
-
-static gboolean
-read_uidl_fname(pop3_base * popb, gchar * filename)
-{
-	gboolean ok = FALSE;
-	FILE *fptr = fopen(filename, "rt");
-	gchar buf[256];
-
-	if (fptr) {
-		popb->list_uid_old = NULL;
-		while (fgets(buf, 255, fptr)) {
-			if (buf[strlen(buf) - 1] == '\n') {
-				g_strchomp(buf);
-				popb->list_uid_old = g_list_append(popb->list_uid_old, g_strdup(buf));
-			} else {
-				logwrite(LOG_ALERT, "broken uid: %s\n", buf);
-				break;
-			}
-		}
-		fclose(fptr);
-		ok = TRUE;
-	} else
-		logwrite(LOG_ALERT, "opening of %s failed: %s", filename, strerror(errno));
-	return ok;
-}
-
-static gboolean
-read_uidl(pop3_base * popb, gchar * user)
-{
-	gboolean ok = FALSE;
-	struct stat statbuf;
-	gchar *filename = g_strdup_printf("%s/popuidl/%s@%s", conf.spool_dir, user, popb->remote_host);
-
-	if (stat(filename, &statbuf) == 0) {
-		ok = read_uidl_fname(popb, filename);
-		if (ok) {
-			GList *drop_node;
-			foreach(popb->drop_list, drop_node) {
-				msg_info *info = (msg_info *) (drop_node->data);
-				if (find_uid(popb, info->uid)) {
-					DEBUG(5) debugf("msg with uid '%s' already known\n", info->uid);
-					info->is_in_uidl = TRUE;
-					popb->uidl_known_cnt++;
-				} else
-					DEBUG(5) debugf("msg with uid '%s' not known\n", info->uid);
-			}
-		}
-	} else {
-		logwrite(LOG_DEBUG, "no uidl file '%s' found\n", filename);
-		ok = TRUE;
-	}
-
-	g_free(filename);
-	return ok;  /* return code is irrelevant, do not check... */
-}
-
-static gboolean
-read_response(pop3_base * popb, int timeout)
-{
-	gint len;
-
-	len = read_sockline(popb->in, popb->buffer, POP3_BUF_LEN, timeout, READSOCKL_CHUG);
-
-	if (len == -3) {
-		popb->error = pop3_timeout;
-		return FALSE;
-	} else if (len == -2) {
-		popb->error = pop3_syntax;
-		return FALSE;
-	} else if (len == -1) {
-		popb->error = pop3_eof;
-		return FALSE;
-	}
-
-	return TRUE;
-}
-
-static gboolean
-check_response(pop3_base * popb)
-{
-	char c = popb->buffer[0];
-
-	if (c == '+') {
-		popb->error = pop3_ok;
-		return TRUE;
-	} else if (c == '-')
-		popb->error = pop3_fail;
-	else
-		popb->error = pop3_syntax;
-	return FALSE;
-}
-
-static gboolean
-strtoi(gchar * p, gchar ** pend, gint * val)
-{
-	gchar buf[12];
-	gint i = 0;
-
-	while (*p && isspace(*p))
-		p++;
-	if (*p) {
-		while ((i < 11) && isdigit(*p))
-			buf[i++] = *(p++);
-		buf[i] = 0;
-		*val = atoi(buf);
-		*pend = p;
-		return TRUE;
-	}
-	return FALSE;
-}
-
-static gboolean
-check_response_int_int(pop3_base * popb, gint * arg0, gint * arg1)
-{
-	if (check_response(popb)) {
-		gchar *p = &(popb->buffer[3]);
-		gchar *pe;
-
-		if (strtoi(p, &pe, arg0)) {
-			DEBUG(5) debugf("arg0 = %d\n", *arg0);
-			p = pe;
-			if (strtoi(p, &pe, arg1))
-				DEBUG(5) debugf("arg1 = %d\n", *arg1);
-			return TRUE;
-			/* FIXME: Paolo's code has the return stmt
-			   inside the if block right above it. What
-			   is correct? */
-		}
-		popb->error = pop3_syntax;
-	}
-	return FALSE;
-}
-
-static gboolean
-get_drop_listing(pop3_base * popb)
-{
-	gchar buf[64];
-
-	DEBUG(5) debugf("get_drop_listing() entered\n");
-
-	while (1) {
-		gint len = read_sockline(popb->in, buf, 64, POP3_CMD_TIMEOUT, READSOCKL_CHUG);
-		if (len > 0) {
-			if (buf[0] == '.')
-				return TRUE;
-			else {
-				gint number, msg_size;
-				gchar *p = buf, *pe;
-				if (strtoi(p, &pe, &number)) {
-					p = pe;
-					if (strtoi(p, &pe, &msg_size)) {
-						msg_info *info = g_malloc(sizeof(msg_info));
-						info->number = number;
-						info->size = msg_size;
-
-						DEBUG(5) debugf ("get_drop_listing(), number = %d, msg_size = %d\n", number, msg_size);
-
-						info->uid = NULL;
-						info->is_fetched = FALSE;
-						info->is_in_uidl = FALSE;
-						popb->drop_list = g_list_append(popb->drop_list, info);
-					} else {
-						popb->error = pop3_syntax;
-						break;
-					}
-				} else {
-					popb->error = pop3_syntax;
-					break;
-				}
-			}
-		} else {
-			popb->error = (len == -1) ? pop3_eof : pop3_timeout;
-			return FALSE;
-		}
-	}
-	return FALSE;
-}
-
-static gboolean
-get_uid_listing(pop3_base * popb)
-{
-	gchar buf[64];
-
-	while (1) {
-		gint len = read_sockline(popb->in, buf, 64, POP3_CMD_TIMEOUT, READSOCKL_CHUG);
-		if (len > 0) {
-			if (buf[0] == '.')
-				return TRUE;
-			else {
-				gint number;
-				gchar *p = buf, *pe;
-				if (strtoi(p, &pe, &number)) {
-					msg_info *info = NULL;
-					GList *drop_node;
-
-					p = pe;
-					while (*p && isspace(*p))
-						p++;
-
-					foreach(popb->drop_list, drop_node) {
-						msg_info *curr_info = (msg_info *) (drop_node->data);
-						if (curr_info->number == number) {
-							info = curr_info;
-							break;
-						}
-					}
-					if (info) {
-						info->uid = g_strdup(p);
-						g_strchomp(info->uid);
-					}
-
-				} else {
-					popb->error = pop3_syntax;
-					break;
-				}
-			}
-		}
-	}
-	return FALSE;
-}
-
-static gboolean
-check_init_response(pop3_base * popb)
-{
-	if (check_response(popb)) {
-		gchar buf[256];
-		gchar *p = popb->buffer;
-		gint i = 0;
-		if (*p) {
-			while (*p && (*p != '<'))
-				p++;
-			while (*p && (*p != '>') && (i < 254))
-				buf[i++] = *(p++);
-			buf[i++] = '>';
-			buf[i] = '\0';
-
-			popb->timestamp = g_strdup(buf);
-
-			return TRUE;
-		}
-	}
-	return FALSE;
-}
-
-void
-pop3_in_close(pop3_base * popb)
-{
-	GList *node;
-
-	fclose(popb->in);
-	fclose(popb->out);
-
-	close(popb->sock);
-
-	foreach(popb->list_uid_old, node) {
-		gchar *uid = (gchar *) (node->data);
-		g_free(uid);
-	}
-	g_list_free(popb->list_uid_old);
-
-	foreach(popb->drop_list, node) {
-		msg_info *info = (msg_info *) (node->data);
-		if (info->uid)
-			g_free(info->uid);
-		g_free(info);
-	}
-	g_list_free(popb->drop_list);
-
-	if (popb->buffer)
-		g_free(popb->buffer);
-	if (popb->timestamp)
-		g_free(popb->timestamp);
-}
-
-pop3_base*
-pop3_in_open(gchar * host, gint port, GList * resolve_list, guint flags)
-{
-	pop3_base *popb;
-	gint sock;
-	mxip_addr *addr;
-
-	DEBUG(5) debugf("pop3_in_open entered, host = %s\n", host);
-
-	if ((addr = connect_resolvelist(&sock, host, port, resolve_list))) {
-		/* create structure to hold status data: */
-		popb = create_pop3base(sock, flags);
-		popb->remote_host = addr->name;
-
-		DEBUG(5) {
-			struct sockaddr_in name;
-			int len;
-			getsockname(sock, (struct sockaddr *) (&name), &len);
-			debugf("socket: name.sin_addr = %s\n", inet_ntoa(name.sin_addr));
-		}
-		return popb;
-	}
-	return NULL;
-}
-
-pop3_base*
-pop3_in_open_child(gchar * cmd, guint flags)
-{
-	pop3_base *popb;
-	gint sock;
-
-	DEBUG(5) debugf("pop3_in_open_child entered, cmd = %s\n", cmd);
-	sock = child(cmd);
-	if (sock > 0) {
-		popb = create_pop3base(sock, flags);
-		popb->remote_host = NULL;
-		return popb;
-	}
-	logwrite(LOG_ALERT, "child failed (sock = %d): %s\n", sock, strerror(errno));
-
-	return NULL;
-}
-
-gboolean
-pop3_in_init(pop3_base * popb)
-{
-	gboolean ok;
-
-	if ((ok = read_response(popb, POP3_INITIAL_TIMEOUT))) {
-		ok = check_init_response(popb);
-	}
-	if (!ok)
-		/* pop3_in_log_failure(popb, NULL); */
-		logwrite(LOG_ALERT, "pop3 failed\n");
-	return ok;
-}
-
-gboolean
-pop3_in_login(pop3_base * popb, gchar * user, gchar * pass)
-{
-	if (popb->flags & POP3_FLAG_APOP) {
-
-		gchar *string = g_strdup_printf("%s%s", popb->timestamp, pass);
-		gchar *digest = MD5String(string);
-		pop3_printf(popb->out, "APOP %s %s\r\n", user, digest);
-		g_free(string);
-		g_free(digest);
-		if (read_response(popb, POP3_CMD_TIMEOUT)) {
-			if (check_response(popb))
-				return TRUE;
-			else
-				popb->error = pop3_login_failure;
-		}
-
-	} else {
-
-		pop3_printf(popb->out, "USER %s\r\n", user);
-		if (read_response(popb, POP3_CMD_TIMEOUT)) {
-			if (check_response(popb)) {
-				pop3_printf(popb->out, "PASS %s\r\n", pass);
-				if (read_response(popb, POP3_CMD_TIMEOUT)) {
-					if (check_response(popb))
-						return TRUE;
-					else
-						popb->error = pop3_login_failure;
-				}
-			} else {
-				popb->error = pop3_login_failure;
-			}
-		}
-	}
-	return FALSE;
-}
-
-gboolean
-pop3_in_stat(pop3_base * popb)
-{
-	pop3_printf(popb->out, "STAT\r\n");
-	if (read_response(popb, POP3_CMD_TIMEOUT)) {
-		gint msg_cnt, mbox_size;
-		if (check_response_int_int(popb, &msg_cnt, &mbox_size)) {
-			popb->msg_cnt = msg_cnt;
-			popb->mbox_size = mbox_size;
-
-			return TRUE;
-		}
-	}
-	return FALSE;
-}
-
-gboolean
-pop3_in_list(pop3_base * popb)
-{
-	pop3_printf(popb->out, "LIST\r\n");
-	if (read_response(popb, POP3_CMD_TIMEOUT)) {
-		if (get_drop_listing(popb)) {
-			return TRUE;
-		}
-	}
-	return FALSE;
-}
-
-gboolean
-pop3_in_dele(pop3_base * popb, gint number)
-{
-	pop3_printf(popb->out, "DELE %d\r\n", number);
-	if (read_response(popb, POP3_CMD_TIMEOUT)) {
-		return TRUE;
-	}
-	return FALSE;
-}
-
-message*
-pop3_in_retr(pop3_base * popb, gint number, address * rcpt)
-{
-	accept_error err;
-
-	pop3_printf(popb->out, "RETR %d\r\n", number);
-	if (read_response(popb, POP3_CMD_TIMEOUT)) {
-		message *msg = create_message();
-		msg->received_host = popb->remote_host;
-		msg->received_prot = (popb->flags & POP3_FLAG_APOP) ? PROT_APOP : PROT_POP3;
-		msg->transfer_id = (popb->next_id)++;
-		msg->rcpt_list = g_list_append(NULL, copy_address(rcpt));
-
-		if ((err = accept_message(popb->in, msg, ACC_MAIL_FROM_HEAD
-		                          | (conf.do_save_envelope_to ? ACC_SAVE_ENVELOPE_TO : 0)))
-		    == AERR_OK)
-			return msg;
-
-		destroy_message(msg);
-	}
-	return NULL;
-}
-
-gboolean
-pop3_in_uidl(pop3_base * popb)
-{
-	pop3_printf(popb->out, "UIDL\r\n");
-	if (read_response(popb, POP3_CMD_TIMEOUT)) {
-		if (get_uid_listing(popb)) {
-			return TRUE;
-		}
-	}
-	return FALSE;
-}
-
-gboolean
-pop3_in_quit(pop3_base * popb)
-{
-	pop3_printf(popb->out, "QUIT\r\n");
-	DEBUG(4) debugf("QUIT\n");
-	signal(SIGALRM, SIG_DFL);
-	return TRUE;
-}
-
-/* Send a DELE command for each message in (the old) uid listing.
-   This is to prevent mail from to be kept on server, if a previous
-   transaction was interupted. */
-gboolean
-pop3_in_uidl_dele(pop3_base * popb)
-{
-	GList *drop_node;
-
-	foreach(popb->drop_list, drop_node) {
-		msg_info *info = (msg_info *) (drop_node->data);
-		/* if(find_uid(popb, info->uid)){ */
-		if (info->is_in_uidl) {
-			if (!pop3_in_dele(popb, info->number))
-				return FALSE;
-			/* TODO: it probably makes sense to also delete this uid from the listing */
-		}
-	}
-	return TRUE;
-}
-
-gboolean
-pop3_get(pop3_base * popb, gchar * user, gchar * pass, address * rcpt, address * return_path,
-         gint max_count, gint max_size, gboolean max_size_delete)
-{
-	gboolean ok = FALSE;
-	gint num_children = 0;
-
-	DEBUG(5) debugf("rcpt = %s@%s\n", rcpt->local_part, rcpt->domain);
-
-	signal(SIGCHLD, SIG_DFL);
-
-	if (pop3_in_init(popb)) {
-		if (pop3_in_login(popb, user, pass)) {
-			if (pop3_in_stat(popb)) {
-				if (popb->msg_cnt > 0) {
-
-					logwrite(LOG_NOTICE | LOG_VERBOSE, "%d message(s) for user %s at %s\n",
-					         popb->msg_cnt, user, popb->remote_host);
-
-					if (pop3_in_list(popb)) {
-						gboolean do_get = !(popb->flags & POP3_FLAG_UIDL);
-						if (!do_get)
-							do_get = pop3_in_uidl(popb);
-						if (do_get) {
-							gint count = 0;
-							GList *drop_node;
-
-							if (popb->flags & POP3_FLAG_UIDL) {
-								read_uidl(popb, user);
-								logwrite(LOG_VERBOSE | LOG_NOTICE, "%d message(s) already in uidl.\n", popb->uidl_known_cnt);
-							}
-							if ((popb->flags & POP3_FLAG_UIDL) && (popb->flags & POP3_FLAG_UIDL_DELE))
-								pop3_in_uidl_dele(popb);
-
-							foreach(popb->drop_list, drop_node) {
-
-								msg_info *info = (msg_info *) (drop_node->data);
-								gboolean do_get_this = !(popb->flags & POP3_FLAG_UIDL);
-								/* if(!do_get_this) do_get_this = !find_uid(popb, info->uid); */
-								if (!do_get_this)
-									do_get_this = !(info->is_in_uidl);
-								if (do_get_this) {
-
-									if ((info->size < max_size) || (max_size == 0)) {
-										message *msg;
-
-										logwrite(LOG_VERBOSE | LOG_NOTICE, "receiving message %d\n", info->number);
-										msg = pop3_in_retr(popb, info->number, rcpt);
-
-										if (msg) {
-											if (return_path)
-												msg->return_path = copy_address(return_path);
-											if (spool_write(msg, TRUE)) {
-												pid_t pid;
-												logwrite(LOG_NOTICE, "%s <= %s host=%s with %s\n", msg->uid,
-												         addr_string(msg->return_path), popb->remote_host,
-												         (popb->flags & POP3_FLAG_APOP) ? prot_names [PROT_APOP] : prot_names [PROT_POP3]);
-												info->is_fetched = TRUE;
-												count++;
-#if DO_WRITE_UIDL_EARLY
-												if (popb->flags & POP3_FLAG_UIDL)
-													write_uidl(popb, user);
-#endif
-												if (!conf.do_queue) {
-
-													/* wait for child processes. If there are too many, we wait blocking, before we fork another one */
-													while (num_children > 0) {
-														int status, options = WNOHANG;
-														pid_t pid;
-
-														if (num_children >= POP3_MAX_CHILDREN) {
-															logwrite(LOG_NOTICE, "too many children - waiting\n");
-															options = 0;
-														}
-														if ((pid = waitpid(0, &status, options)) > 0) {
-															num_children--;
-															if (WEXITSTATUS(status) != EXIT_SUCCESS)
-																logwrite(LOG_WARNING, "delivery process with pid %d returned %d\n", pid, WEXITSTATUS (status));
-															if (WIFSIGNALED(status))
-																logwrite(LOG_WARNING, "delivery process with pid %d got signal: %d\n", pid, WTERMSIG (status));
-														} else if (pid < 0) {
-															logwrite(LOG_WARNING, "wait got error: %s\n", strerror(errno));
-														}
-													}
-
-													if ((pid = fork()) == 0) {
-														deliver(msg);
-														_exit(EXIT_SUCCESS);
-													} else if (pid < 0) {
-														logwrite(LOG_ALERT | LOG_VERBOSE, "could not fork for delivery, id = %s: %s\n", msg->uid, strerror(errno));
-													} else
-														num_children++;
-												} else {
-													DEBUG(1) debugf("queuing forced by configuration or option.\n");
-												}
-												if (popb->flags & POP3_FLAG_DELETE)
-													pop3_in_dele(popb, info->number);
-
-												destroy_message(msg);
-											}	/* if(spool_write(msg, TRUE)) */
-										} else {
-											logwrite(LOG_ALERT, "retrieving of message %d failed: %d\n", info->number, popb->error);
-										}
-									} else {
-										/* info->size > max_size */
-										logwrite(LOG_NOTICE | LOG_VERBOSE, "size of message #%d (%d) > max_size (%d)\n", info->number, info->size, max_size);
-										if (max_size_delete)
-											if (popb->flags & POP3_FLAG_DELETE)
-												pop3_in_dele(popb, info->number);
-									}
-								} /* if(do_get_this) ... */
-								else {
-									if (popb->flags & POP3_FLAG_UIDL) {
-										info->is_fetched = TRUE;  /* obsolete? */
-										logwrite(LOG_VERBOSE, "message %d already known\n", info->number);
-										DEBUG(1) debugf("message %d (uid = %s) not fetched\n", info->number, info->uid);
-#if 0
-#if DO_WRITE_UIDL_EARLY
-										write_uidl(popb, user);  /* obsolete? */
-#endif
-#endif
-									}
-								}
-								if ((max_count != 0) && (count >= max_count))
-									break;
-							}	/* foreach() */
-#if DO_WRITE_UIDL_EARLY
-#else
-							if (popb->flags & POP3_FLAG_UIDL)
-								write_uidl(popb, user);
-#endif
-						}  /* if(pop3_in_uidl(popb) ... */
-					}  /* if(pop3_in_list(popb)) */
-				}  /* if(popb->msg_cnt > 0) */
-				else {
-					logwrite(LOG_NOTICE | LOG_VERBOSE, "no messages for user %s at %s\n", user, popb->remote_host);
-				}
-				ok = TRUE;
-			}
-			pop3_in_quit(popb);
-		} else {
-			logwrite(LOG_ALERT | LOG_VERBOSE, "pop3 login failed for user %s, host = %s\n", user, popb->remote_host);
-		}
-	}
-	if (!ok) {
-		logwrite(LOG_ALERT | LOG_VERBOSE, "pop3 failed, error = %d\n", popb->error);
-	}
-
-	while (num_children > 0) {
-		int status;
-		pid_t pid;
-		if ((pid = wait(&status)) > 0) {
-			num_children--;
-			if (WEXITSTATUS(status) != EXIT_SUCCESS)
-				logwrite(LOG_WARNING, "delivery process with pid %d returned %d\n", pid, WEXITSTATUS(status));
-			if (WIFSIGNALED(status))
-				logwrite(LOG_WARNING, "delivery process with pid %d got signal: %d\n", pid, WTERMSIG(status));
-		} else {
-			logwrite(LOG_WARNING, "wait got error: %s\n", strerror(errno));
-		}
-	}
-
-	return ok;
-}
-
-#endif
--- a/src/pop3_in.h	Thu Jul 15 11:48:33 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/* pop3_in.h, Copyright 2000 (C) Oliver Kurth,
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifdef ENABLE_POP3
-
-#define POP3_BUF_LEN 1024
-
-#define POP3_INITIAL_TIMEOUT 5*60
-#define POP3_CMD_TIMEOUT 5*60
-#define POP3_DATA_TIMEOUT 5*60
-#define POP3_FINAL_TIMEOUT 10*60
-
-#define POP3_FLAG_DELETE 0x01
-#define POP3_FLAG_UIDL 0x02
-#define POP3_FLAG_UIDL_DELE 0x04
-#define POP3_FLAG_APOP 0x08
-
-#define POP3_MAX_CHILDREN 2
-
-typedef enum _pop3_error {
-	pop3_ok = 0,
-	pop3_fail,
-	pop3_eof,
-	pop3_timeout,
-	pop3_login_failure,
-	pop3_syntax
-} pop3_error;
-
-typedef struct pop3_base {
-	FILE *in;
-	FILE *out;
-	gint sock;
-	gint dup_sock;
-
-	gchar *remote_host;
-	gchar *buffer;
-
-	gint next_id;
-	gint msg_cnt;
-	gint uidl_known_cnt;
-	gint mbox_size;
-
-	GList *list_uid_old;
-	GList *drop_list;
-
-	gchar *timestamp;
-
-	guint flags;
-
-	pop3_error error;
-} pop3_base;
-
-typedef struct _msg_info {
-	gint number;
-	gint size;
-	gchar *uid;
-	gboolean is_fetched;
-	gboolean is_in_uidl;
-} msg_info;
-
-pop3_base *pop3_in_open(gchar * host, gint port, GList * resolve_list, guint flags);
-pop3_base *pop3_in_open_child(gchar * cmd, guint flags);
-void pop3_in_close(pop3_base * popb);
-gboolean pop3_get(pop3_base * popb, gchar * user, gchar * pass, address * rcpt, address * return_path, gint max_count, gint max_size, gboolean max_size_delete);
-
-#endif