aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/opensmtpd/Makefile33
-rw-r--r--mail/opensmtpd/distinfo5
-rw-r--r--mail/opensmtpd/files/patch-usernamelen61
-rw-r--r--mail/opensmtpd/files/pkg-message.in9
-rw-r--r--mail/opensmtpd/files/smtpd.in2
-rw-r--r--mail/opensmtpd/pkg-plist2
6 files changed, 30 insertions, 82 deletions
diff --git a/mail/opensmtpd/Makefile b/mail/opensmtpd/Makefile
index 73d78b9a9a9c..9fdf642c2f6e 100644
--- a/mail/opensmtpd/Makefile
+++ b/mail/opensmtpd/Makefile
@@ -2,13 +2,11 @@
# $FreeBSD$
PORTNAME= opensmtpd
-PORTVERSION= 5.7.3
-PORTREVISION= 2
+PORTVERSION= 5.9.2p1
PORTEPOCH= 1
CATEGORIES= mail
MASTER_SITES= http://www.opensmtpd.org/archives/ \
http://distfiles.pirateparty.in/ashish/
-DISTNAME= ${PORTNAME}-${PORTVERSION}p2
MAINTAINER= ashish@FreeBSD.org
COMMENT= Security- and simplicity-focused SMTP server from OpenBSD
@@ -31,8 +29,6 @@ TABLE_DB_DESC= Build table-db plugin (aliases)
USES= cpe libtool
USE_OPENSSL= yes
GNU_CONFIGURE= yes
-CONFIGURE_ARGS= --with-libevent-dir=${LOCALBASE} --sysconfdir=${PREFIX}/etc/mail/ \
- --with-mailwrapper --with-ssl-dir=${OPENSSLBASE}
CPE_VENDOR= openbsd
@@ -42,7 +38,7 @@ SUB_FILES= pkg-install pkg-deinstall pkg-message
CONFLICTS_INSTALL= postfix-[0-9]* sendmail-[0-9]* opensmtpd-devel-[0-9]*
USERS= _smtpd _smtpq
-GROUPS= _smtpd
+GROUPS= _smtpd _smtpq
OPTIONS_SUB= yes
@@ -53,18 +49,27 @@ LIBASRDEVEL_LIB_DEPENDS_OFF= libasr.so:dns/libasr
LIBASRDEVEL_LIB_DEPENDS= libasr.so:dns/libasr-devel
LIBASRDEVEL_BROKEN= incompatible with libasr-devel
-PAM_CONFIGURE_WITH= pam pam-service=smtpd
-
-TABLE_DB_CONFIGURE_ENABLE= table-db
+PAM_CONFIGURE_WITH= auth-pam=smtpd
+SSL_PORT_VARS= with_openssl_port=yes
+TABLE_DB_CONFIGURE_WITH= table-db
.include <bsd.port.options.mk>
-.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000000 && ! ${PORT_OPTIONS:MSSL_PORT}
+.if ${OPSYS} == FreeBSD && ${OSVERSION} <= 1000015
WITH_OPENSSL_PORT= yes
.endif
-.if ${PORT_OPTIONS:MSSL_PORT}
-WITH_OPENSSL_PORT= yes
-.endif
+.include <bsd.port.pre.mk>
+
+CONFIGURE_ARGS+= --with-libasr=${LOCALBASE} \
+ --with-libevent=${LOCALBASE} \
+ --with-ssl=${OPENSSLBASE} \
+ --sysconfdir=${PREFIX}/etc/mail/
+
+post-patch:
+ ${REINPLACE_CMD} -e '/chmod 2555/d' ${WRKSRC}/mk/smtpctl/Makefile.in
+
+post-install:
+ @${LN} -sf ${PREFIX}/sbin/smtpctl ${STAGEDIR}${PREFIX}/libexec/opensmtpd/makemap
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/mail/opensmtpd/distinfo b/mail/opensmtpd/distinfo
index b52c379cc178..36c0919540dd 100644
--- a/mail/opensmtpd/distinfo
+++ b/mail/opensmtpd/distinfo
@@ -1,2 +1,3 @@
-SHA256 (opensmtpd-5.7.3p2.tar.gz) = 0d2973008d0f66bebb84bed516be6c32617735241cc54dd26643529281a8e52b
-SIZE (opensmtpd-5.7.3p2.tar.gz) = 709074
+TIMESTAMP = 1463428051
+SHA256 (opensmtpd-5.9.2p1.tar.gz) = 3522f273c1630c781facdb2b921228e338ed4e651909316735df775d6a70a71d
+SIZE (opensmtpd-5.9.2p1.tar.gz) = 681855
diff --git a/mail/opensmtpd/files/patch-usernamelen b/mail/opensmtpd/files/patch-usernamelen
deleted file mode 100644
index 18341f1d0919..000000000000
--- a/mail/opensmtpd/files/patch-usernamelen
+++ /dev/null
@@ -1,61 +0,0 @@
-diff --git a/smtpd/smtp_session.c b/smtpd/smtp_session.c
-index 3a0ca2a..404ee50 100644
---- smtpd/smtp_session.c
-+++ smtpd/smtp_session.c
-@@ -84,6 +84,7 @@ enum session_flags {
- SF_BADINPUT = 0x0080,
- SF_FILTERCONN = 0x0100,
- SF_FILTERDATA = 0x0200,
-+ SF_USERTOOLONG = 0x0400,
- };
-
- enum message_flags {
-@@ -133,7 +134,7 @@ struct smtp_session {
-
- char helo[LINE_MAX];
- char cmd[LINE_MAX];
-- char username[LOGIN_NAME_MAX];
-+ char username[LOGIN_NAME_MAX+HOST_NAME_MAX+1];
-
- struct envelope evp;
-
-@@ -990,6 +991,15 @@ smtp_session_imsg(struct mproc *p, struct imsg *imsg)
-
- s = tree_xpop(&wait_parent_auth, reqid);
- strnvis(user, s->username, sizeof user, VIS_WHITE | VIS_SAFE);
-+
-+ if (s->flags & SF_USERTOOLONG) {
-+ log_info("smtp-in: sesson %016"PRIx64
-+ ": auth failed because username too long",
-+ s->id);
-+ s->flags &= (~SF_USERTOOLONG);
-+ success = LKA_PERMFAIL;
-+ }
-+
- if (success == LKA_OK) {
- log_info("smtp-in: session %016"PRIx64
- ": authentication successful for user %s ",
-@@ -1929,7 +1939,7 @@ smtp_rfc4954_auth_plain(struct smtp_session *s, char *arg)
- user++; /* skip NUL */
- if (strlcpy(s->username, user, sizeof(s->username))
- >= sizeof(s->username))
-- goto abort;
-+ s->flags |= SF_USERTOOLONG;
-
- pass = memchr(user, '\0', len - (user - buf));
- if (pass == NULL || pass >= buf + len - 2)
-@@ -1969,9 +1979,12 @@ smtp_rfc4954_auth_login(struct smtp_session *s, char *arg)
-
- case STATE_AUTH_USERNAME:
- memset(s->username, 0, sizeof(s->username));
-- if (base64_decode(arg, (unsigned char *)s->username,
-- sizeof(s->username) - 1) == -1)
-+ if (base64_decode(arg, (unsigned char *)buf,
-+ sizeof(buf) - 1) == -1)
- goto abort;
-+ if (strlcpy(s->username, buf, sizeof(s->username))
-+ >= sizeof(s->username))
-+ s->flags |= SF_USERTOOLONG;
-
- smtp_enter_state(s, STATE_AUTH_PASSWORD);
- smtp_reply(s, "334 UGFzc3dvcmQ6");
diff --git a/mail/opensmtpd/files/pkg-message.in b/mail/opensmtpd/files/pkg-message.in
index 0277388871f1..6a771126fb3a 100644
--- a/mail/opensmtpd/files/pkg-message.in
+++ b/mail/opensmtpd/files/pkg-message.in
@@ -1,18 +1,21 @@
-If you are upgrading from OpenSMTPD version 201303011853 or earlier, please
+If you are upgrading from OpenSMTPD version 5.7.3 or earlier, please
follow the procedure below to update the permissions on the OpenSMTPD
spool directories:
1. Stop 'smtpd' service:
- # %%PREFIX%%/etc/rc.d/smtpd stop
+ # %%PREFIX%%/sbin/smtpctl stop
2. Update permissions:
# chown -R _smtpq:wheel /var/spool/smtpd/corrupt
+ # chown -R root:_smtpq /var/spool/smtpd/offline
# chown -R _smtpq:wheel /var/spool/smtpd/purge
# chown -R _smtpq:wheel /var/spool/smtpd/queue
# chown -R _smtpq:wheel /var/spool/smtpd/temporary
+ # chmod -R 770 /var/spool/smtpd/offline
+ # chmod -R 700 /var/spool/smtpd/purge
3. Start 'smtpd' service:
- # %%PREFIX%%/etc/rc.d/smtpd start
+ # service smtpd start
diff --git a/mail/opensmtpd/files/smtpd.in b/mail/opensmtpd/files/smtpd.in
index e887f7d6c170..6fa92ca45c12 100644
--- a/mail/opensmtpd/files/smtpd.in
+++ b/mail/opensmtpd/files/smtpd.in
@@ -20,7 +20,7 @@
check_process()
{
- /bin/pgrep -j none -f 'smtpd: \[priv\]'
+ /bin/pgrep -j none -f "${smtpd_procname}"
}
name="smtpd"
diff --git a/mail/opensmtpd/pkg-plist b/mail/opensmtpd/pkg-plist
index 47f97e94cb72..3b5675d80858 100644
--- a/mail/opensmtpd/pkg-plist
+++ b/mail/opensmtpd/pkg-plist
@@ -2,7 +2,7 @@ etc/mail/smtpd.conf.sample
libexec/opensmtpd/encrypt
libexec/opensmtpd/mail.local
%%TABLE_DB%%libexec/opensmtpd/makemap
-sbin/smtpctl
+@(,,2555) sbin/smtpctl
sbin/smtpd
%%TABLE_DB%%man/man8/makemap.8.gz
%%TABLE_DB%%man/man8/newaliases.8.gz