Update proxsmtp to 1.9.

1.9 [2011-01-23]
 - Fix build warnings.
 - Fix problem on linux not detecting netfilter headers.
 - Add true transparent proxying, where both client and server have no
   knowledge of the proxy. Documented at the proxsmtp web page.
 - Use capabilities to have transparent proxying without running as root.
 - Implement a simple reject filter, so no scripts need to be run.
 - Allow skipping of filtering for authenticated connections.
 - Bump up the top number of simultaneous connections.
 - Add client IP addresses to the log line.

1.8 [2008-06-30]
 - Make the XFOWARD HELO available as a environment variable in scripts. [Glenn Matthys]
 - Send an RSET to the server after filter fails an email.
 - Fix an uninitialized pid variable.

1.7 [2007-05-28]
 - Use my real name 'Stef Walter'
   See: http://memberwebs.com/nielsen/

1.6 [2006-11-13]
  - On FreeBSD fix problem where stderr wasn't processed when filter
    didn't read stdin.
  - Add strcasestr which is missing on Solaris.
  - Add back 'Header' option which was accidentally removed in 1.5. Blush!

1.5 [2006-09-05]
  - Added support for setting the REMOTE variable when an XFORWARD
    command is seen.

1.4 [2006-08-10]
  - Fix crasher after connection closes unexpectedly.
  - Fix problem with waiting for processes [Jeff Fisher]
  - Better message for 'busy' [Akihiro Sagawa]

1.3 [2005-10-21]
  - Handle condition of server refusing data transfers more gracefully.
  - Less chatty when setting timeouts fail
  - Drop privileges after binding to port. Allows listening on ports < 1024
  - Ported to Solaris
  - Fix problem with binding to certain 'long' addresses
  - Support embedded NULLs in email data.
  - Fix problems with empty addresses in logs.
  - Don't let exchange send it's strange binary data through the proxy
  - Don't reject emails when server is overloaded or errors.
  - Don't reject emails when starting the filter command fails.

1.2.1 [2005-04-15]
  - Fixed bug (introduced in 1.2) when 'Header' option is not present.

1.2  [2005-03-24]
  - Don't leak file descriptors when clamsmtpd can't connect to outgoing
        SMTP server [Chris Mason]
  - 'Header' configuration option with special format arguments [Olivier Beyssac]
  - Supress weird warnings when looking up names of local unix connections.

1.1  [2005-01-27]
  - Fixed crasher when outgoing connection couldn't be established
  - Removed erroneous chown line from clamsmtpd.sh
This commit is contained in:
taca 2011-09-12 16:30:30 +00:00
parent ae6455c7aa
commit ef92267479
6 changed files with 75 additions and 28 deletions

View file

@ -1,13 +1,13 @@
# $NetBSD: Makefile,v 1.9 2010/11/13 21:08:59 shattered Exp $
# $NetBSD: Makefile,v 1.10 2011/09/12 16:30:30 taca Exp $
DISTNAME= proxsmtp-1.0
PKGREVISION= 1
DISTNAME= proxsmtp-1.9
CATEGORIES= mail
MASTER_SITES= http://memberwebs.com/stef/software/proxsmtp/
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://memberwebs.com/stef/software/proxsmtp/
COMMENT= SMTP proxy content filter
LICENSE= modified-bsd
PKG_DESTDIR_SUPPORT= user-destdir

View file

@ -1,7 +1,8 @@
$NetBSD: distinfo,v 1.3 2005/02/24 09:59:28 agc Exp $
$NetBSD: distinfo,v 1.4 2011/09/12 16:30:30 taca Exp $
SHA1 (proxsmtp-1.0.tar.gz) = eb733956612c1655cfd2f0ac985c0a896e73e505
RMD160 (proxsmtp-1.0.tar.gz) = 8cb6988c8a2cd54447b53e23ca113750423c925d
Size (proxsmtp-1.0.tar.gz) = 154743 bytes
SHA1 (patch-aa) = 09bba87bf89e0f3a54b68fc77922052f88563579
SHA1 (patch-ab) = c7d79e8491d9c7571a18da8a7bcdb3a9b7a93f11
SHA1 (proxsmtp-1.9.tar.gz) = 948d3035e7331d9e5f93ec7c2e8f0e7cb3024bb1
RMD160 (proxsmtp-1.9.tar.gz) = 6d471c524c78b54cf96e81fc8bcd75ca7dc95a6e
Size (proxsmtp-1.9.tar.gz) = 182800 bytes
SHA1 (patch-ab) = dd480c9d8fbe3af2f5afac3afc5dbc9f52d0332c
SHA1 (patch-config.h.in) = 8871254abc27527bb6de5c3349db5963ffb81f3f
SHA1 (patch-configure) = 4b86247cf8b0b81dbf0fcad1b14aaa1705e76661

View file

@ -1,13 +0,0 @@
$NetBSD: patch-aa,v 1.1.1.1 2004/12/02 04:08:18 jlam Exp $
--- common/sock_any.h.orig 2004-09-03 20:34:42.000000000 -0400
+++ common/sock_any.h
@@ -57,7 +57,7 @@ struct sockaddr_any
struct sockaddr_in6 in6;
#endif
} s;
- size_t namelen;
+ socklen_t namelen;
};
#define SANY_ADDR(any) ((any).s.a)

View file

@ -1,13 +1,38 @@
$NetBSD: patch-ab,v 1.2 2004/12/04 20:37:47 jlam Exp $
$NetBSD: patch-ab,v 1.3 2011/09/12 16:30:30 taca Exp $
--- common/smtppass.c.orig 2004-12-01 14:09:52.000000000 -0500
* Take care of none existence case of setresgid(2) or setresuid(2).
--- common/smtppass.c.orig 2011-01-23 22:07:08.000000000 +0000
+++ common/smtppass.c
@@ -591,7 +591,7 @@ static spctx_t* init_thread(int fd)
@@ -447,10 +447,21 @@ static void drop_privileges()
if(pw == NULL)
errx(1, "couldn't look up user: %s", g_state.user);
+#if defined(HAVE_SETRESGID) && defined(HAVE_SETRESUID)
if(setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) == -1 ||
setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid) == -1)
err(1, "unable to switch to user: %s (uid %d, gid %d)",
g_state.user, pw->pw_uid, pw->pw_gid);
+#else
+ if(setgid(pw->pw_gid) == -1 ||
+ setuid(pw->pw_uid) == -1)
+ err(1, "unable to switch to user: %s (uid %d, gid %d)", g_state.user, pw->pw_uid, pw->pw_gid);
+
+ /* A paranoia check */
+ if(setreuid(-1, 0) == 0)
+ err(1, "unable to completely drop privileges");
+
+#endif
#ifdef HAVE_LIBCAP
/*
@@ -669,7 +680,7 @@ static spctx_t* init_thread(int fd)
g_unique_id++;
sp_unlock();
sp_unlock();
- sp_messagex(ctx, LOG_DEBUG, "processing %d on thread %x", fd, (int)pthread_self());
+ sp_messagex(ctx, LOG_DEBUG, "processing %d on thread %p", fd, pthread_self());
/* Connect to the outgoing server ... */
if(make_connections(ctx, fd) == -1)

View file

@ -0,0 +1,19 @@
$NetBSD: patch-config.h.in,v 1.1 2011/09/12 16:30:30 taca Exp $
* Existence of setresgid(2) and setresuid(2).
--- config.h.in.orig 2011-01-23 22:25:58.000000000 +0000
+++ config.h.in
@@ -81,6 +81,12 @@
/* Define to 1 if you have the `setenv' function. */
#undef HAVE_SETENV
+/* Define to 1 if you have the `setresgid' function. */
+#undef HAVE_SETRESGID
+
+/* Define to 1 if you have the `setresuid' function. */
+#undef HAVE_SETRESUID
+
/* Define to 1 if you have the <stdarg.h> header file. */
#undef HAVE_STDARG_H

View file

@ -0,0 +1,15 @@
$NetBSD: patch-configure,v 1.1 2011/09/12 16:30:30 taca Exp $
* Check existence of setresgid(2) and setresuid(2).
--- configure.orig 2011-01-23 22:25:53.000000000 +0000
+++ configure
@@ -5060,7 +5060,7 @@ _ACEOF
fi
done
-for ac_func in getline getdelim
+for ac_func in getline getdelim setresgid setresuid
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"