Commit 23104835 authored by Ryan Kavanagh's avatar Ryan Kavanagh

Imported Upstream version 5.3.3p1

parent fd451ae7
......@@ -16,7 +16,7 @@
dnl AC_INIT([OpenSMTPD-portable],[4.9.0],[Charles Longeau <chl@openbsd.org>])
dnl AC_INIT([OpenSMTPD-portable], m4_esyscmd(date +%Y%m%d%H%M%S | sed -e 's/^\(.*\)$/5.2-\1/' | tr -d '\n'),[Charles Longeau <chl@openbsd.org>])
AC_INIT([OpenSMTPD], [5.3.1p-current], [bugs@opensmtpd.org])
AC_INIT([OpenSMTPD], [5.3.3p1], [bugs@opensmtpd.org])
AC_LANG([C])
AC_CONFIG_MACRO_DIR([m4])
......@@ -425,7 +425,7 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
*-*-openbsd*)
AC_DEFINE([HAVE_ATTRIBUTE__SENTINEL__], [1], [OpenBSD's gcc has sentinel])
AC_DEFINE([HAVE_ATTRIBUTE__BOUNDED__], [1], [OpenBSD's gcc has bounded])
echo "Please use -current or http://www.opensmtpd.org/archives/opensmtpd-5.3.1.tar.gz"
echo "Please use -current or http://www.opensmtpd.org/archives/opensmtpd-5.3.3.tar.gz"
;;
*-*-solaris*)
if test "x$withval" != "xno" ; then
......
......@@ -22,7 +22,7 @@ esac
#
build_tarball()
{
V=5.3.2
V=5.3.3
P=p1
ASRSRC=/usr/src/lib/libc/asr
ASRFILES="asr.c asr_debug.c asr_utils.c gethostnamadr_async.c
......@@ -47,7 +47,8 @@ build_tarball()
TARGET=opensmtpd-${V}${P}
git archive --format=tar --prefix=${TARGET}/ ${1} | \
(cd ${T} && tar xf -)
rm -f ${T}/${TARGET}/Makefile ${T}/${TARGET}/smtpd/Makefile
find ${T}/${TARGET} -name Makefile -exec rm \{\} \;
find ${T}/${TARGET} -depth -type d -empty -exec rmdir \{\} \;
fi
(cd ${T} && tar cfz ${FILES}/${TARGET}.tar.gz ${TARGET})
rm -rf ${T}
......
FILES = test0.conf
FILES+= test1.conf
FILES+= test2.conf
FILES+= test3.conf
FILES+= test4.conf
FILES+= test5.conf
FILES+= test6.conf
FILES+= test7.conf
FILES+= test8.conf
FILES+= test9.conf
FILES+= test10.conf
FILES+= test11.conf
test:
.for FILE in $(FILES)
smtpd -n -f $(FILE)
.endfor
PROG= expand
NOMAN= 1
LDFLAGS+= -lutil
.include <bsd.prog.mk>
CFLAGS = -I../../smtpd/
LDFLAGS = -L../../smtpd/libsmtpdfilter -lsmtpdfilter -levent -lutil
SRCS = filter.c
INSTALLPATH= /usr/libexec/smtpd
all:
$(CC) -o $(INSTALLPATH)/filter $(CFLAGS) $(SRCS) $(LDFLAGS)
/* $Id: aldap.c,v 1.4 2013/01/31 18:34:43 eric Exp $ */
/* $OpenBSD: aldap.c,v 1.4 2013/01/31 18:34:43 eric Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2008 Alexander Schrijver <aschrijver@openbsd.org>
......
/* $Id: aldap.h,v 1.3 2013/01/26 09:37:23 gilles Exp $ */
/* $OpenBSD: aldap.h,v 1.3 2013/01/26 09:37:23 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2008 Alexander Schrijver <aschrijver@openbsd.org>
......
.\" $OpenBSD: aliases.5,v 1.5 2013/01/26 09:37:23 gilles Exp $
.\" $OpenBSD$
.\"
.\" Copyright (c) 2012 Gilles Chehade <gilles@poolp.org>
.\"
......
/* $OpenBSD: aliases.c,v 1.61 2013/02/14 12:30:49 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
......
/* $OpenBSD: ber.c,v 1.3 2013/01/26 09:37:23 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2007 Reyk Floeter <reyk@vantronix.net>
......
/* $OpenBSD: ber.h,v 1.3 2013/01/26 09:37:23 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2007 Reyk Floeter <reyk@vantronix.net>
......
/* $OpenBSD: bounce.c,v 1.54 2013/01/26 09:37:23 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2009 Gilles Chehade <gilles@poolp.org>
......
/* $OpenBSD: ca.c,v 1.1 2013/01/26 09:37:23 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2012 Gilles Chehade <gilles@poolp.org>
......
/* $OpenBSD: compress_backend.c,v 1.7 2013/01/26 09:37:23 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2012 Charles Longeau <chl@openbsd.org>
......
/* $OpenBSD: compress_gzip.c,v 1.6 2013/01/26 09:37:23 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2012 Gilles Chehade <gilles@poolp.org>
......
/* $OpenBSD: config.c,v 1.19 2013/01/26 09:37:23 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
......
/* $OpenBSD: control.c,v 1.83 2013/03/11 17:40:11 deraadt Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2012 Gilles Chehade <gilles@poolp.org>
......
/* $OpenBSD: delivery.c,v 1.3 2013/01/26 09:37:23 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2011 Gilles Chehade <gilles@poolp.org>
......
/* $OpenBSD: delivery_filename.c,v 1.8 2013/01/26 09:37:23 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2011 Gilles Chehade <gilles@poolp.org>
......
/* $OpenBSD: delivery_maildir.c,v 1.11 2013/01/26 09:37:23 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2011 Gilles Chehade <gilles@poolp.org>
......
/* $OpenBSD: delivery_mbox.c,v 1.8 2013/01/26 09:37:23 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2011 Gilles Chehade <gilles@poolp.org>
......
/* $OpenBSD: delivery_mda.c,v 1.7 2013/01/26 09:37:23 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2011 Gilles Chehade <gilles@poolp.org>
......
/* $OpenBSD: dict.c,v 1.1 2013/01/26 09:37:23 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2012 Gilles Chehade <gilles@poolp.org>
......
/* $OpenBSD: dns.c,v 1.64 2013/01/26 09:37:23 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
......
/* $OpenBSD: enqueue.c,v 1.67 2013/01/31 18:34:43 eric Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2005 Henning Brauer <henning@bulabula.org>
......
/* $OpenBSD: envelope.c,v 1.19 2013/01/31 18:34:43 eric Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2011 Gilles Chehade <gilles@poolp.org>
......
/* $OpenBSD: expand.c,v 1.21 2013/02/14 12:30:49 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2009 Gilles Chehade <gilles@poolp.org>
......
/* $OpenBSD: filter_api.c,v 1.6 2013/01/26 09:37:23 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2011 Gilles Chehade <gilles@poolp.org>
......
# $OpenBSD: Makefile,v 1.3 2012/08/02 13:38:39 okan Exp $
# $OpenBSD$
CFLAGS += -DNO_IO -DBUILD_FILTER
CPPFLAGS+= -I../../
......
/* $OpenBSD: asr.h,v 1.5 2011/07/13 14:52:21 eric Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
*
......
/* $OpenBSD: asr.h,v 1.5 2011/07/13 14:52:21 eric Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
*
......
/* $OpenBSD: table_sqlite.c,v 1.2 2013/01/31 18:34:43 eric Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2013 Eric Faurot <eric@openbsd.org>
......
/* $OpenBSD: table_sqlite.c,v 1.2 2013/01/31 18:34:43 eric Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2013 Eric Faurot <eric@openbsd.org>
......
/* $OpenBSD: table_sqlite.c,v 1.2 2013/01/31 18:34:43 eric Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2013 Eric Faurot <eric@openbsd.org>
......
/* $OpenBSD: table_sqlite.c,v 1.2 2013/01/31 18:34:43 eric Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2013 Eric Faurot <eric@openbsd.org>
......
.\" $OpenBSD: forward.5,v 1.7 2013/01/26 09:37:23 gilles Exp $
.\" $OpenBSD$
.\"
.\" Copyright (c) 2012 Gilles Chehade <gilles@poolp.org>
.\"
......
/* $OpenBSD: forward.c,v 1.34 2013/01/31 18:34:43 eric Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
......
/* $OpenBSD: iobuf.c,v 1.4 2013/01/26 09:37:23 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
*
......
/* $OpenBSD: iobuf.h,v 1.3 2013/01/26 09:37:23 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
*
......
/* $OpenBSD: ioev.c,v 1.11 2013/02/05 11:45:18 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
*
......@@ -791,6 +791,7 @@ io_dispatch_read_ssl(int fd, short event, void *humppa)
goto leave;
}
again:
switch ((n = iobuf_read_ssl(io->iobuf, (SSL*)io->ssl))) {
case IOBUF_WANT_READ:
io_reset(io, EV_READ, io_dispatch_read_ssl);
......@@ -815,6 +816,8 @@ io_dispatch_read_ssl(int fd, short event, void *humppa)
default:
io_debug("io_dispatch_read_ssl(...) -> r=%i\n", n);
io_callback(io, IO_DATAIN);
if (current == io && IO_READING(io) && SSL_pending(io->ssl))
goto again;
}
leave:
......
/* $OpenBSD: ioev.h,v 1.3 2013/01/26 09:37:23 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
*
......
/* $OpenBSD: lka.c,v 1.150 2013/02/14 12:30:49 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
......
/* $OpenBSD: lka_session.c,v 1.55 2013/02/14 12:30:49 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2011 Gilles Chehade <gilles@poolp.org>
......
/* $OpenBSD: log.c,v 1.14 2013/01/26 09:37:23 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
......
/* $OpenBSD: log.h,v 1.4 2013/01/26 09:37:23 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2010 Gilles Chehade <gilles@poolp.org>
......
.\" $OpenBSD: makemap.8,v 1.21 2013/01/26 14:13:25 jmc Exp $
.\" $OpenBSD$
.\"
.\" Copyright (c) 2009 Jacek Masiulaniec <jacekm@openbsd.org>
.\" Copyright (c) 2008-2009 Gilles Chechade <gilles@poolp.org>
......
/* $OpenBSD: makemap.c,v 1.43 2013/01/31 18:34:43 eric Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
......
/* $OpenBSD: mda.c,v 1.89 2013/02/05 11:45:18 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
......
/* $OpenBSD: mfa.c,v 1.75 2013/01/26 09:37:23 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
......
/* $OpenBSD: mfa_session.c,v 1.15 2013/03/26 13:30:29 millert Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2011 Gilles Chehade <gilles@poolp.org>
......
/* $OpenBSD: mproc.c,v 1.2 2013/01/31 18:34:43 eric Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2012 Eric Faurot <eric@faurot.net>
......
/* $OpenBSD: mta.c,v 1.155 2013/02/18 13:37:14 eric Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
......@@ -1264,16 +1264,18 @@ mta_relay_unref(struct mta_relay *relay)
log_debug("debug: mta: freeing %s", mta_relay_to_text(relay));
SPLAY_REMOVE(mta_relay_tree, &relays, relay);
if (relay->cert)
free(relay->cert);
if (relay->authtable)
free(relay->authtable);
if (relay->authlabel)
free(relay->authlabel);
while ((tree_poproot(&relay->connectors, NULL, (void**)&c)))
mta_connector_free(c);
free(relay->authlabel);
free(relay->authtable);
free(relay->backupname);
free(relay->cert);
free(relay->helotable);
free(relay->secret);
free(relay->sourcetable);
if (evtimer_pending(&relay->ev, NULL))
evtimer_del(&relay->ev);
......@@ -1429,6 +1431,7 @@ mta_host_unref(struct mta_host *h)
SPLAY_REMOVE(mta_host_tree, &hosts, h);
free(h->sa);
free(h->ptrname);
free(h);
stat_decrement("mta.host", 1);
}
......@@ -1504,6 +1507,7 @@ mta_domain_unref(struct mta_domain *d)
SPLAY_REMOVE(mta_domain_tree, &domains, d);
free(d->name);
free(d);
stat_decrement("mta.domain", 1);
}
......@@ -1558,6 +1562,7 @@ mta_source_unref(struct mta_source *s)
SPLAY_REMOVE(mta_source_tree, &sources, s);
free(s->sa);
free(s);
stat_decrement("mta.source", 1);
}
......@@ -1617,6 +1622,7 @@ mta_connector_free(struct mta_connector *c)
c->relay->nconnector--;
TAILQ_REMOVE(c->queue, c, lst_entry);
mta_source_unref(c->source);
free(c);
stat_decrement("mta.connector", 1);
}
......@@ -1671,6 +1677,7 @@ mta_route_unref(struct mta_route *r)
SPLAY_REMOVE(mta_route_tree, &routes, r);
mta_source_unref(r->src); /* from constructor */
mta_host_unref(r->dst); /* from constructor */
free(r);
stat_decrement("mta.route", 1);
}
......
/* $OpenBSD: mta_session.c,v 1.34 2013/02/21 16:25:21 eric Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
......@@ -321,6 +321,8 @@ mta_session_imsg(struct mproc *p, struct imsg *imsg)
bzero(resp_ca_cert->cert, resp_ca_cert->cert_len);
bzero(resp_ca_cert->key, resp_ca_cert->key_len);
free(resp_ca_cert->cert);
free(resp_ca_cert->key);
free(resp_ca_cert);
return;
......
.\" $OpenBSD: newaliases.8,v 1.9 2013/01/26 09:37:23 gilles Exp $
.\" $OpenBSD$
.\"
.\" Copyright (c) 2009 Jacek Masiulaniec <jacekm@openbsd.org>
.\" Copyright (c) 2008-2009 Gilles Chechade <gilles@poolp.org>
......
/* $OpenBSD: parse.y,v 1.116 2013/03/06 21:42:40 sthen Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
......@@ -484,7 +484,6 @@ table : TABLE STRING STRING {
;
if (*p == ':') {
*p = '\0';
backend = $3;
config = p+1;
}
}
......
/* $OpenBSD: parser.c,v 1.33 2013/02/14 12:30:49 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org>
......
/* $OpenBSD: parser.h,v 1.26 2013/02/14 12:30:49 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org>
......
/* $OpenBSD: queue.c,v 1.146 2013/01/31 18:24:47 eric Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
......
/* $OpenBSD: queue_backend.c,v 1.42 2013/01/26 09:37:23 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2011 Gilles Chehade <gilles@poolp.org>
......
/* $OpenBSD: queue_fsqueue.c,v 1.58 2013/01/31 18:34:43 eric Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2011 Gilles Chehade <gilles@poolp.org>
......
/* $OpenBSD: queue_null.c,v 1.1 2013/01/26 09:37:23 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
......
/* $OpenBSD: queue_ram.c,v 1.2 2013/01/31 18:34:43 eric Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
......
/* $OpenBSD: ruleset.c,v 1.27 2013/01/26 09:37:23 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2009 Gilles Chehade <gilles@poolp.org>
......
/* $OpenBSD: scheduler.c,v 1.27 2013/02/10 15:01:16 eric Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
......
/* $OpenBSD: scheduler_backend.c,v 1.8 2013/01/26 09:37:23 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2012 Gilles Chehade <gilles@poolp.org>
......
/* $OpenBSD: scheduler_null.c,v 1.1 2013/01/26 09:37:23 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
......
/* $OpenBSD: scheduler_ramqueue.c,v 1.27 2013/02/10 15:01:16 eric Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2012 Gilles Chehade <gilles@poolp.org>
......
/* $OpenBSD: smtp.c,v 1.124 2013/03/11 17:40:11 deraadt Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
......
/* $OpenBSD: smtp_session.c,v 1.181 2013/02/21 14:22:52 eric Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
......
.\" $OpenBSD: smtpctl.8,v 1.40 2013/02/14 13:21:16 gilles Exp $
.\" $OpenBSD$
.\"
.\" Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org>
.\" Copyright (c) 2012 Gilles Chehade <gilles@poolp.org>
......@@ -15,7 +15,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: February 14 2013 $
.Dd $Mdocdate: May 24 2013 $
.Dt SMTPCTL 8
.Os
.Sh NAME
......
/* $OpenBSD: smtpctl.c,v 1.101 2013/02/14 12:30:49 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2006 Gilles Chehade <gilles@poolp.org>
......
/* $OpenBSD: smtpd-api.h,v 1.2 2013/02/14 14:34:07 eric Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2011 Gilles Chehade <gilles@poolp.org>
......
.\" $OpenBSD: smtpd.8,v 1.19 2013/01/31 13:22:55 jmc Exp $
.\" $OpenBSD$
.\"
.\" Copyright (c) 2012, Eric Faurot <eric@openbsd.org>
.\" Copyright (c) 2008, Gilles Chehade <gilles@poolp.org>
......@@ -16,7 +16,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: January 31 2013 $
.Dd $Mdocdate: May 24 2013 $
.Dt SMTPD 8
.Os
.Sh NAME
......
/* $OpenBSD: smtpd.c,v 1.188 2013/02/14 13:11:40 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
......
.\" $OpenBSD: smtpd.conf.5,v 1.92 2013/02/17 17:45:01 jmc Exp $
.\" $OpenBSD$
.\"
.\" Copyright (c) 2008 Janne Johansson <jj@openbsd.org>
.\" Copyright (c) 2009 Jacek Masiulaniec <jacekm@dobremiasto.net>
......@@ -17,7 +17,7 @@
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\"
.Dd $Mdocdate: February 17 2013 $
.Dd $Mdocdate: May 24 2013 $
.Dt SMTPD.CONF 5
.Os
.Sh NAME
......@@ -87,7 +87,7 @@ For example, with recipient domain "example.org":
%{rcpt.domain[8:]} expands to "org"
%{rcpt.domain[-3:]} expands to "org"
%{rcpt.domain[0:6]} expands to "example"
%{rcpt.domain[0:-4]} expands to "example"
%{rcpt.domain[0:-4]} expands to "example"
.Ed
.Pp
Additional configuration files can be included with the
......@@ -241,11 +241,12 @@ function.
.Pp
Finally, the method of delivery is specified:
.Bl -tag -width Ds
.It Ic deliver to lmtp Ar [host:port|socket]
.It Ic deliver to lmtp Op Ar host : Ns Ar port | socket
Mail is delivered to
.Pa host:port
or to the unix socket
.Pa socket
.Ar host : Ns Ar port ,
or to the
.Ux
.Ar socket
over LMTP.
.It Ic deliver to maildir Ar path
Mail is added to a maildir.
......
/* $OpenBSD: smtpd.h,v 1.408 2013/03/06 21:42:40 sthen Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
......@@ -77,7 +77,7 @@
#ifndef SMTPD_NAME
#define SMTPD_NAME "OpenSMTPD"
#endif
#define SMTPD_VERSION "5.3.2p1"
#define SMTPD_VERSION "5.3.3p1"
#define SMTPD_BANNER "220 %s ESMTP %s"
#define SMTPD_SESSION_TIMEOUT 300
#define SMTPD_BACKLOG 5
......
/* $OpenBSD: ssl.c,v 1.52 2013/01/26 09:37:24 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
......
/* $OpenBSD: ssl.h,v 1.1 2013/01/26 09:37:24 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2013 Gilles Chehade <gilles@poolp.org>
*
......
/* $OpenBSD: ssl_privsep.c,v 1.5 2013/01/26 09:37:24 gilles Exp $ */
/* $OpenBSD$ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
......
/* $OpenBSD: ssl_smtpd.c,v 1.1 2013/01/26 09:37:24 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
......
/* $OpenBSD: stat_backend.c,v 1.7 2013/03/08 19:11:52 chl Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2012 Gilles Chehade <gilles@poolp.org>
......
/* $OpenBSD: stat_ramstat.c,v 1.7 2013/03/08 19:11:52 chl Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2012 Gilles Chehade <gilles@poolp.org>
......
/* $OpenBSD: table.c,v 1.3 2013/02/05 15:23:40 gilles Exp $ */
/* $OpenBSD$ */
/*
* Copyright (c) 2013 Eric Faurot <eric@openbsd.org>
......@@ -280,9 +280,22 @@ table_config(struct table *t)
void
table_add(struct table *t, const char *key, const char *val)
{
char lkey[1024], *old;
if (t->t_type & T_DYNAMIC)
errx(1, "table_add: cannot add to table");
dict_set(&t->t_dict, key, val ? xstrdup(val, "table_add") : NULL);
if (! lowercase(lkey, key, sizeof lkey)) {
log_warnx("warn: lookup key too long: %s", key);
return;
}