diff options
author | Eric Faurot <eric@cvs.openbsd.org> | 2013-11-06 10:01:30 +0000 |
---|---|---|
committer | Eric Faurot <eric@cvs.openbsd.org> | 2013-11-06 10:01:30 +0000 |
commit | 0960f1497adeed8214c7f1943c6de212fb3a594f (patch) | |
tree | 25860af318c0a4b313f827eeb6284b9a69bd7284 /usr.sbin/smtpd/smtp.c | |
parent | 278e0e70a50aa814408ee0756a520e3d0c54f626 (diff) |
Much much improved config parser and related changes.
Simplify code and do not impose an order on conditions and rule options.
Format changes that may require smtpd.conf update for some setups:
- SSL certificates are no longer automatically loaded, but must be
explicitely declared using the "pki" keyword.
- "certificate" option becomes "pki" in listener and accept rules.
- "ssl://" becomes "secure://" in relay via rules.
- "helo" becomes "hostnames" in relay rules
New features:
- accept rules do not need an explicit action, in which case alias table
or .forward must provide one.
- new "forward-only" action to force relaying and reject rcpts that expand
as local delivery.
- "!" (negation) modifier on rule matching conditions.
- new "recipient" rule matching condition.
- new "verify" option on listeners and relay rules to reject invalid
certificates.
Other changes:
- remember the helo name advertised on incoming mail and use it for sending
bounces.
- bump envelope version (existing envelopes are updated on-the-fly).
Diffstat (limited to 'usr.sbin/smtpd/smtp.c')
-rw-r--r-- | usr.sbin/smtpd/smtp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/smtp.c b/usr.sbin/smtpd/smtp.c index ed71a943fc4..2d4d8e6943d 100644 --- a/usr.sbin/smtpd/smtp.c +++ b/usr.sbin/smtpd/smtp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtp.c,v 1.129 2013/10/27 11:01:47 eric Exp $ */ +/* $OpenBSD: smtp.c,v 1.130 2013/11/06 10:01:29 eric Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@poolp.org> @@ -66,6 +66,7 @@ smtp_imsg(struct mproc *p, struct imsg *imsg) switch (imsg->hdr.type) { case IMSG_DNS_PTR: case IMSG_LKA_EXPAND_RCPT: + case IMSG_LKA_HELO: case IMSG_LKA_AUTHENTICATE: case IMSG_LKA_SSL_INIT: case IMSG_LKA_SSL_VERIFY: @@ -296,7 +297,7 @@ smtp_setup_events(void) TAILQ_FOREACH(l, env->sc_listeners, entry) { log_debug("debug: smtp: listen on %s port %d flags 0x%01x" - " cert \"%s\"", ss_to_text(&l->ss), ntohs(l->port), + " pki \"%s\"", ss_to_text(&l->ss), ntohs(l->port), l->flags, l->ssl_cert_name); session_socket_blockmode(l->fd, BM_NONBLOCK); @@ -361,6 +362,8 @@ smtp_enqueue(uid_t *euid) strlcpy(listener->tag, "local", sizeof(listener->tag)); listener->ss.ss_family = AF_LOCAL; listener->ss.ss_len = sizeof(struct sockaddr *); + strlcpy(listener->hostname, "localhost", + sizeof(listener->hostname)); } /* |