Remove pop3gwd because it's old and abandoned upstream

nginx or dovecot as a proxy can be used as a replacement

ok kn@
This commit is contained in:
solene 2020-05-21 09:24:01 +00:00
parent 53ba201daf
commit 42de7f8a17
11 changed files with 0 additions and 248 deletions

View File

@ -1,21 +0,0 @@
# $OpenBSD: Makefile,v 1.21 2019/07/12 20:48:44 sthen Exp $
COMMENT= app-level proxy for mail retrieval behind firewalls
DISTNAME= pop3gwd-1.2
REVISION= 2
CATEGORIES= net mail
MAINTAINER= Ian McWilliam <kaosagnt@gmail.com>
MASTER_SITES= http://www.go.dlr.de/linux/src/
PERMIT_PACKAGE= Yes
WANTLIB= c
WRKDIST= ${WRKDIR}/pop3gwd
NO_TEST= Yes
.include <bsd.port.mk>

View File

@ -1,2 +0,0 @@
SHA256 (pop3gwd-1.2.tar.gz) = M/dp5Ms6G6G1aI7QB4Xj+PhHWmASCczvYLdI2LEQFHQ=
SIZE (pop3gwd-1.2.tar.gz) = 16372

View File

@ -1,34 +0,0 @@
# $OpenBSD: patch-connect_loginc,v 1.2 2003/06/18 12:18:12 naddy Exp $
--- connect_login.c.orig Thu Jun 19 11:06:28 1997
+++ connect_login.c Wed Jun 18 14:13:14 2003
@@ -42,10 +42,10 @@ static int contact_host(char hostname[],
if ((remote_fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0)
remote_fd = BAD;
else {
- bzero(&tcp_srv_addr, sizeof(tcp_srv_addr));
+ memset(&tcp_srv_addr, 0, sizeof(tcp_srv_addr));
tcp_srv_addr.sin_family = AF_INET;
tcp_srv_addr.sin_port = htons(port);
- bcopy(host_ptr->h_addr_list[0], &tcp_srv_addr.sin_addr, host_ptr->h_length);
+ memcpy(&tcp_srv_addr.sin_addr, host_ptr->h_addr_list[0], host_ptr->h_length);
if (connect(remote_fd, (struct sockaddr *) &tcp_srv_addr, sizeof(tcp_srv_addr)) <0) {
close(remote_fd);
remote_fd = BAD;
@@ -136,7 +136,7 @@ int connect_login(int first_filedes, int
if (result == TRUE) {
/* server replied, check if reply is empty */
/* must save response in case it is good */
- strncpy(to_client, input, MAX_IO_LEN);
+ (void)strlcpy(to_client, input, MAX_IO_LEN);
if ((next_tok = strtok(input, " ")) == NULL) {
/* empty response, POP3 violation */
close(*remote_filedes);
@@ -159,7 +159,7 @@ int connect_login(int first_filedes, int
syslog(LOG_PRIO, "%s", to_client);
#endif
- strncat(to_client, termin, MAX_IO_LEN);
+ (void)strlcat(to_client, termin, MAX_IO_LEN);
if ((count = writen(first_filedes, to_client, strlen(to_client), maxwait)) == strlen(to_client))
*out += count;
else

View File

@ -1,65 +0,0 @@
# $OpenBSD: patch-get_remote_datac,v 1.2 2003/06/18 12:18:12 naddy Exp $
--- get_remote_data.c.orig Thu Jun 19 11:06:28 1997
+++ get_remote_data.c Wed Jun 18 14:13:14 2003
@@ -39,36 +39,36 @@ static int parse_cmd(char input[], char
/* look for user command, can be USER or QUIT */
if ((next_tok = strtok(input, " ")) != NULL)
- strncpy(cmd, next_tok, maxlen);
+ strlcpy(cmd, next_tok, maxlen);
else {
result = BAD;
- strncpy(error, "no command in input", maxlen);
+ strlcpy(error, "no command in input", maxlen);
cmd[0] = 0; /* we terminate the string anyway, better be safe than sorry */
}
if (result == GOOD && strcasecmp(cmd, user_c) == 0) {
/* look for hostname to connect to (after last delimiter, if present) */
if (delim_pos != NULL) {
- strncpy(hostname, delim_pos+1, MAXHOSTNAMELEN);
+ strlcpy(hostname, delim_pos+1, MAXHOSTNAMELEN);
*delim_pos = 0; /* terminate the string here, so strtok will ignore this part */
if (strlen(hostname) != 0) {
if ((next_tok = strtok(NULL, " ")) != NULL) {
- strncpy(username, next_tok, maxlen);
+ strlcpy(username, next_tok, maxlen);
}
else {
result = BAD;
- strncpy(error, "no username in input", maxlen);
+ strlcpy(error, "no username in input", maxlen);
}
}
else {
result = BAD;
- strncpy(error, "no hostname in input", maxlen);
+ strlcpy(error, "no hostname in input", maxlen);
}
}
else {
result = BAD;
- strncpy(error, "no username/hostname delimiter in input", maxlen);
+ strlcpy(error, "no username/hostname delimiter in input", maxlen);
}
}
@@ -76,7 +76,7 @@ static int parse_cmd(char input[], char
if (result == GOOD) {
if (strcasecmp(cmd, user_c) != 0 && strcasecmp(cmd, quit_c) != 0) {
result = BAD;
- strncpy(error, "command must be either USER or QUIT", maxlen);
+ strlcpy(error, "command must be either USER or QUIT", maxlen);
}
}
@@ -133,7 +133,7 @@ int get_remote_data(int client_filedes,
if (parse_res == GOOD && strcasecmp(cmd, quit_c) == 0) {
/* set server's hostname and setup farewell */
if (gethostname(server_name, MAXHOSTNAMELEN) != 0)
- strncpy(server_name, "localhost", MAXHOSTNAMELEN);
+ strlcpy(server_name, "localhost", MAXHOSTNAMELEN);
snprintf(output, MAX_IO_LEN, "%s %s %s %s%s", pos_re, server_name,
GREETING, "signing off", termin);
if ((count = writen(client_filedes, output, strlen(output), maxwait)) == strlen(output))

View File

@ -1,28 +0,0 @@
# $OpenBSD: patch-mainc,v 1.2 2003/06/18 12:18:12 naddy Exp $
--- main.c.orig Thu Jun 19 11:06:28 1997
+++ main.c Wed Jun 18 14:13:14 2003
@@ -23,7 +23,7 @@
static char rcsid[] = "$Id: patch-mainc,v 1.2 2003/06/18 12:18:12 naddy Exp $";
-void main(int argc, char *argv[]) {
+int main(int argc, char *argv[]) {
/* default proxy identification and setup */
char delimiter = '#'; /* needed to parse username and hostname */
int timeout = 120; /* timeout is 2 minutes */
@@ -60,7 +60,7 @@ void main(int argc, char *argv[]) {
/* set server's hostname and setup greeting */
if (gethostname(server_name, MAXHOSTNAMELEN) != 0)
- strncpy(server_name, "localhost", MAXHOSTNAMELEN);
+ (void)strlcpy(server_name, "localhost", MAXHOSTNAMELEN);
snprintf(output, MAX_IO_LEN, "%s %s %s %s%s", pos_reply, server_name,
GREETING, "ready", terminator);
@@ -88,5 +88,6 @@ void main(int argc, char *argv[]) {
syslog(LOG_PRIO, "signing off (in: %d bytes, out: %d bytes)", in_bytes, out_bytes);
closelog();
+ return(0);
}

View File

@ -1,32 +0,0 @@
# $OpenBSD: patch-makefile,v 1.3 2003/06/18 12:18:12 naddy Exp $
--- Makefile.orig Thu Jun 19 11:06:28 1997
+++ Makefile Wed Jun 18 14:13:30 2003
@@ -2,23 +2,22 @@
# -------------------
-CC=gcc
-CFLAGS= -O2
MODULES=main.o parse_cmd_line.o get_remote_data.o connect_login.o io.o relay_data.o
DOCS=README COPYING HISTORY
-INSTALL_DIR=/usr/sbin
+INSTALL_DIR=${PREFIX}/libexec
VERSION=1.2
-DOC_DIR=/usr/doc/pop3gwd-$(VERSION)
+DOC_DIR=${PREFIX}/share/doc/pop3gwd
in.pop3gwd: pop3-gw.h $(MODULES)
$(CC) $(CFLAGS) -o $@ $(MODULES)
strip $@
chmod 755 $@
+all:
+ make
install:
- make
- cp -f in.pop3gwd $(INSTALL_DIR)/
+ cp -f in.pop3gwd $(INSTALL_DIR)/pop3gwd
[ -d $(DOC_DIR) ] || mkdir $(DOC_DIR)
cp -f $(DOCS) $(DOC_DIR)

View File

@ -1,25 +0,0 @@
# $OpenBSD: patch-parse_cmd_linec,v 1.2 2003/06/18 12:18:12 naddy Exp $
--- parse_cmd_line.c.orig Thu Jun 19 11:06:28 1997
+++ parse_cmd_line.c Wed Jun 18 14:13:14 2003
@@ -21,6 +21,7 @@
/* parse_cmd_line.c: modify setup according to command line parameters */
/* ---------------------------------------------------------------------- */
+#include <ctype.h>
#include "pop3-gw.h"
@@ -34,11 +35,11 @@ void parse_cmd_line(int argc, char *argv
/* there is always at least 1 arg and that's the name of the program */
- strncpy(log_id, argv[0], maxlen);
+ strlcpy(log_id, argv[0], maxlen);
/* arguments must be in the form <id><value>, without blanks in between */
while (count < argc) {
- strncpy(value, argv[count]+1, MAX_IO_LEN);
+ strlcpy(value, argv[count]+1, MAX_IO_LEN);
if (strlen(value) != 0)
switch (*argv[count]) {
case 'd': if (ispunct(value[0]))

View File

@ -1,12 +0,0 @@
# $OpenBSD: patch-pop3-gwh,v 1.2 2003/06/18 12:18:12 naddy Exp $
--- pop3-gw.h.orig Thu Jun 19 11:06:28 1997
+++ pop3-gw.h Wed Jun 18 14:13:14 2003
@@ -96,7 +96,7 @@ void relay_data(int first_filedes, int s
#define BAD -1
#define FALSE 0
#define TRUE 1
-#ifndef __FreeBSD__
+#if !defined( BSD4_4 )
#define MAX(A, B) ((A) > (B) ? (A) : (B))
#endif

View File

@ -1,12 +0,0 @@
# $OpenBSD: patch-relay_datac,v 1.2 2003/06/18 12:18:12 naddy Exp $
--- relay_data.c.orig Thu Jun 19 11:06:28 1997
+++ relay_data.c Wed Jun 18 14:13:14 2003
@@ -39,7 +39,7 @@ void relay_data(int first_filedes, int s
while (logged_in == TRUE) {
- bcopy(&master, &copy, sizeof(fd_set)); /* select() trashes copy */
+ memcpy(&copy, &master, sizeof(fd_set)); /* select() trashes copy */
deadline.tv_sec = maxwait;
deadline.tv_usec = 0;

View File

@ -1,11 +0,0 @@
This program is an application-level gateway, or proxy, designed to allow
mail retrieval from POP3 servers by systems that either:
(a) are behind a firewall or screening router OR
(b) do not have an assigned IP number OR
(c) must share a SLIP/PPP connection on another system
It connects to the POP3 server on behalf of the client, performs the login
and then passes data both ways until either the client or the server shut
down the connection. In the meanwhile, the connection will appear to have
originated on the host running the proxy.

View File

@ -1,6 +0,0 @@
@comment $OpenBSD: PLIST,v 1.4 2004/09/15 18:17:44 espie Exp $
libexec/pop3gwd
share/doc/pop3gwd/
share/doc/pop3gwd/COPYING
share/doc/pop3gwd/HISTORY
share/doc/pop3gwd/README