OpenBSD CVS

CVS log for src/usr.sbin/smtpd/parse.y


[BACK] Up to [local] / src / usr.sbin / smtpd

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.299 / (download) - annotate - [select for diffs], Mon Feb 19 21:00:19 2024 UTC (3 months, 1 week ago) by gilles
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, HEAD
Changes since 1.298: +8 -8 lines
Diff to previous 1.298 (colored)

no need to be as strict with table formats on various match constraints,
this prevents the reuse of T_HASH tables in T_LIST contexts when the key
column actually makes sense by itself.

diff from Philipp (philipp+openbsd [at] bureaucracy [dot] de)

Revision 1.298 / (download) - annotate - [select for diffs], Sat Feb 3 15:50:00 2024 UTC (3 months, 3 weeks ago) by op
Branch: MAIN
Changes since 1.297: +1 -2 lines
Diff to previous 1.297 (colored)

leave the command for mbox delivery unset

The mbox delivery is handled apart from the other delivery methods.
Since the mda is already hardcoded in mda_mbox(), there's no need to
fill the command string in parse.y.  While here also assess that for
mbox deliveries the command is unset at delivery time too.

based on a diff by gilles

ok gilles@, millert@

Revision 1.297 / (download) - annotate - [select for diffs], Fri Feb 2 20:54:27 2024 UTC (3 months, 4 weeks ago) by millert
Branch: MAIN
Changes since 1.296: +1 -3 lines
Diff to previous 1.296 (colored)

Run lmtp deliveries as the recipient user, not SMTPD_USER (_smtpd).
This is a backout of revision 1.278.  Delivery via lmtp is not
limited to running mail.lmtp, it may also be modified by a user's
.forward file (if any).  OK gilles@

Revision 1.296 / (download) - annotate - [select for diffs], Sun Dec 3 11:52:16 2023 UTC (5 months, 4 weeks ago) by op
Branch: MAIN
Changes since 1.295: +9 -1 lines
Diff to previous 1.295 (colored)

add the `no-dsn' option to `listen on socket' too

ok millert@

Revision 1.295 / (download) - annotate - [select for diffs], Sun Dec 3 11:50:50 2023 UTC (5 months, 4 weeks ago) by op
Branch: MAIN
Changes since 1.294: +2 -1 lines
Diff to previous 1.294 (colored)

set the socket family too to mirror the LISTEN case; no-op in practice
since AF_UNSPEC is zero.

Revision 1.294 / (download) - annotate - [select for diffs], Sun Dec 3 11:48:52 2023 UTC (5 months, 4 weeks ago) by op
Branch: MAIN
Changes since 1.293: +2 -1 lines
Diff to previous 1.293 (colored)

enable DSN (Delivery Status Notification) for the implicit socket too

DSN is implicitly enabled when using `listen on sock' but it's not for
the implicit socket, avoid this incoherence by enabling it on the
implicit socket too.

Report and diff by Tassilo Philipp (tphilipp at potion-studios dot com)
ok millert@

Revision 1.293 / (download) - annotate - [select for diffs], Fri Dec 1 09:25:49 2023 UTC (6 months ago) by op
Branch: MAIN
Changes since 1.292: +11 -11 lines
Diff to previous 1.292 (colored)

allow tables and filter over multiple lines

This augments the grammar for tables and filter listing so that a
newline is allowed after a comma.  i.e. these now works as expected:

	table foo {
		"one",
		"two"
	}

	listen on socket filter {
		"foo",
		"bar"
	}

based on a diff from tim@
ok millert@, tim@

Revision 1.292 / (download) - annotate - [select for diffs], Wed May 10 07:19:49 2023 UTC (12 months, 3 weeks ago) by op
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4
Changes since 1.291: +3 -1 lines
Diff to previous 1.291 (colored)

add a few missing headers, reduces the diff with -portable

ok millert@

Revision 1.291 / (download) - annotate - [select for diffs], Thu Feb 10 14:59:35 2022 UTC (2 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.290: +2 -2 lines
Diff to previous 1.290 (colored)

Do not verify the cert or CA for a relay using opportunistic TLS.
If a relay is not explicitly configured to use TLS but the remote
side supports STARTTLS, we will try to use it.  However, in this
case we should not verify the cert or CA (which may be self-signed).
This restores the relay behavior before the switch to libtls was made.
There is no change if the relay is explicitly configured to use TLS.
OK eric@

Revision 1.290 / (download) - annotate - [select for diffs], Fri Oct 15 15:01:29 2021 UTC (2 years, 7 months ago) by naddy
Branch: MAIN
Changes since 1.289: +8 -8 lines
Diff to previous 1.289 (colored)

Don't declare variables as "unsigned char *" that are passed to
functions that take "char *" arguments.  Where such chars are
assigned to int or passed to ctype functions, explicitly cast them
to unsigned char.

For OpenBSD's clang, -Wpointer-sign has been disabled by default,
but when the parse.y code was built elsewhere, the compiler would
complain.

With help from millert@
ok benno@ deraadt@

Revision 1.289 / (download) - annotate - [select for diffs], Mon Jun 14 17:58:15 2021 UTC (2 years, 11 months ago) by eric
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.288: +2 -16 lines
Diff to previous 1.288 (colored)

add required headers for smtpd.h and remove unnecessary ones in other files.

ok jung@

Revision 1.288 / (download) - annotate - [select for diffs], Wed May 26 18:08:55 2021 UTC (3 years ago) by eric
Branch: MAIN
Changes since 1.287: +15 -16 lines
Diff to previous 1.287 (colored)

replaces calls to err(3)/errx(3) with fatal()/fatalx() from log.c
for code that runs in the daemon.

ok florian@ millert@

Revision 1.287 / (download) - annotate - [select for diffs], Fri Apr 9 16:43:43 2021 UTC (3 years, 1 month ago) by eric
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.286: +32 -2 lines
Diff to previous 1.286 (colored)

allow to specify tls ciphers and protocols on listeners

ok tb@

Revision 1.286 / (download) - annotate - [select for diffs], Wed Mar 31 17:47:16 2021 UTC (3 years, 2 months ago) by eric
Branch: MAIN
Changes since 1.285: +19 -2 lines
Diff to previous 1.285 (colored)

allow to specify tls protocols and ciphers on relay actions

ok espie@ sthen@ tb@

Revision 1.285 / (download) - annotate - [select for diffs], Fri Mar 5 12:37:32 2021 UTC (3 years, 2 months ago) by eric
Branch: MAIN
Changes since 1.284: +23 -16 lines
Diff to previous 1.284 (colored)

Start porting smtpd to libtls.

Note that it changes the way SNI works: The certificate to use is now
selected by looking at the names found in the certificates themselves,
rather than the names of the pki entries in the configuration file.
The set of certificates for a tls listener must be defined explicitly by
using the pki listener option multiple times.

ok tb@

Revision 1.284 / (download) - annotate - [select for diffs], Sat Jan 23 16:11:11 2021 UTC (3 years, 4 months ago) by rob
Branch: MAIN
Changes since 1.283: +3 -5 lines
Diff to previous 1.283 (colored)

Remove unused variables found by clang. Additional unused var spotted by eric@.

OK mvs@, eric@

Revision 1.283 / (download) - annotate - [select for diffs], Tue Jan 19 09:16:20 2021 UTC (3 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.282: +12 -1 lines
Diff to previous 1.282 (colored)

Do the KAME embedded scope fixup in the two places where getifaddrs() is
used. With this there should be no more embedded scopes left and therefor
in6addr_to_text() can be removed. getnameinfo() will just do the right
thing now.
OK eric@

Revision 1.282 / (download) - annotate - [select for diffs], Thu Dec 31 08:27:15 2020 UTC (3 years, 5 months ago) by martijn
Branch: MAIN
Changes since 1.281: +83 -83 lines
Diff to previous 1.281 (colored)

Rename the pony process to dispatcher and klondike to crypto.

From gilles@
OK millert@ giovanni@

Revision 1.281 / (download) - annotate - [select for diffs], Wed Sep 23 19:11:50 2020 UTC (3 years, 8 months ago) by martijn
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.280: +3 -86 lines
Diff to previous 1.280 (colored)

Revert agentx support for now, we're too close to release.

requested by deraadt@

Revision 1.280 / (download) - annotate - [select for diffs], Wed Sep 23 18:01:26 2020 UTC (3 years, 8 months ago) by martijn
Branch: MAIN
Changes since 1.279: +87 -4 lines
Diff to previous 1.279 (colored)

Add support for agentx to smtpd.

This is based around NETWORK-SERVICES-MIB from RFC2788 and MTA-MIB from
RFC2789, but does not export the full spec. Hopefully this will expand in
the future.

People who want to use this against net-snmp (currently the only option
known to me at the time of writing) may want to add -I -mta_sendmail to the
flags, so net-snmp doesn't throw garbage into the mib-2.28 subtree.

Revision 1.279 / (download) - annotate - [select for diffs], Wed Sep 16 11:19:42 2020 UTC (3 years, 8 months ago) by martijn
Branch: MAIN
Changes since 1.278: +19 -2 lines
Diff to previous 1.278 (colored)

Add the admd keyword. This can be used by filters interested in the
Authentication-Results header.

OK giovanni@

Revision 1.278 / (download) - annotate - [select for diffs], Mon Jun 1 05:21:30 2020 UTC (4 years ago) by chrisz
Branch: MAIN
Changes since 1.277: +3 -1 lines
Diff to previous 1.277 (colored)

Run lmtp deliveries as SMTPD_USER instead of the recipient user.

ok millert@

Revision 1.277 / (download) - annotate - [select for diffs], Mon Feb 24 23:54:27 2020 UTC (4 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.276: +2 -2 lines
Diff to previous 1.276 (colored)

Cast argument of ctype(3) macros to unsigned char, not int.
Similar to a diff from Hiltjo Posthum.  OK jung@ deraadt@

Revision 1.276 / (download) - annotate - [select for diffs], Mon Feb 3 15:41:22 2020 UTC (4 years, 3 months ago) by gilles
Branch: MAIN
Changes since 1.275: +1 -2 lines
Diff to previous 1.275 (colored)

now that mail.local(8) relies on lockspool(1) for mailbox locking, have the
mailbox created by smtpd for mbox before privileges are dropped then we can
call mail.local(8) with the recipient privileges.

ok millert@

Revision 1.275 / (download) - annotate - [select for diffs], Sun Feb 2 22:13:48 2020 UTC (4 years, 3 months ago) by gilles
Branch: MAIN
Changes since 1.274: +3 -3 lines
Diff to previous 1.274 (colored)

add SENDER to mda environment and teach lmtp to use that instead of command
line parameter. this allows simplifying lmtp command line and it would have
prevented the unpriv command exec for LMTP in recent advisory.

ok millert@ and jung@

Revision 1.274 / (download) - annotate - [select for diffs], Fri Jan 31 22:01:20 2020 UTC (4 years, 4 months ago) by gilles
Branch: MAIN
Changes since 1.273: +4 -4 lines
Diff to previous 1.273 (colored)

introduce mda_mbox() to handle mbox delivery in its own code path, and make
it use execle() since we know all parameters and don't need command line to
be parsed.

ok millert@ and jung@

Revision 1.273 / (download) - annotate - [select for diffs], Wed Jan 8 01:41:11 2020 UTC (4 years, 4 months ago) by gilles
Branch: MAIN
Changes since 1.272: +46 -1 lines
Diff to previous 1.272 (colored)

allow using the session username in builtin filters when available

Revision 1.272 / (download) - annotate - [select for diffs], Sat Dec 21 11:07:38 2019 UTC (4 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.271: +40 -1 lines
Diff to previous 1.271 (colored)

start bringing smtp-out reporting code, lacks some events still

Revision 1.271 / (download) - annotate - [select for diffs], Wed Dec 18 10:00:39 2019 UTC (4 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.270: +5 -5 lines
Diff to previous 1.270 (colored)

give a better name to a couple functions and struct fields related to
filters, no functional change

Revision 1.270 / (download) - annotate - [select for diffs], Wed Dec 18 07:57:52 2019 UTC (4 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.269: +22 -1 lines
Diff to previous 1.269 (colored)

teach relay action how to do domain-based relay host, this allows declaring
a single relay action with a mapping of relay hosts per domain.

ok eric@

Revision 1.269 / (download) - annotate - [select for diffs], Sat Dec 14 16:24:52 2019 UTC (4 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.268: +6 -2 lines
Diff to previous 1.268 (colored)

introduce a bypass keyword so that builtin filters can bypass processing of
a phase when a condition is met

suggested by several people including jung@, ok jung@

Revision 1.268 / (download) - annotate - [select for diffs], Thu Dec 12 22:10:47 2019 UTC (4 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.267: +18 -6 lines
Diff to previous 1.267 (colored)

filter protocol has an initial handshake within which smtpd tells filters
about a few global configuration informations. this makes smtpd tell proc
filters for which subsystem they are registered allowing them to register
only events that are relevant.

Revision 1.267 / (download) - annotate - [select for diffs], Tue Nov 26 07:50:01 2019 UTC (4 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.266: +57 -2 lines
Diff to previous 1.266 (colored)

allow using 'auth' as an origin:

    match from auth [...]

will match any authenticated session, disregarding where it comes from

Revision 1.266 / (download) - annotate - [select for diffs], Tue Nov 26 07:28:37 2019 UTC (4 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.265: +2 -2 lines
Diff to previous 1.265 (colored)

whitespaces

Revision 1.265 / (download) - annotate - [select for diffs], Tue Nov 26 06:10:20 2019 UTC (4 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.264: +82 -1 lines
Diff to previous 1.264 (colored)

mail-from and rcpt-to already carry origin and destination, so we can make
them a "for" and "from" parameter and allow grammar to express:

    match from mail-from gilles@openbsd.org for rcpt-to eric@openbsd.org

rather than:

    match from any mail-from gilles@openbsd.org \
	for domain openbsd.org rcpt-to eric@openbsd.org	[...]

ok eric@, jung@, millert@

Revision 1.264 / (download) - annotate - [select for diffs], Tue Nov 12 21:02:42 2019 UTC (4 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.263: +15 -2 lines
Diff to previous 1.263 (colored)

a long long time ago, there was no such thing as "from socket" and the
socket listener was tagged "local" so we could trick "from local" into
matching non-network connections.

this hack was removed years ago and the socket listener still had this
"local" tag hardcoded. this commit teaches parse.y how to assign a tag
to a socket listener and removes the hardcoded "local".

Revision 1.263 / (download) - annotate - [select for diffs], Sun Sep 22 11:49:53 2019 UTC (4 years, 8 months ago) by semarie
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.262: +3 -3 lines
Diff to previous 1.262 (colored)

few corrections on srs grammar

ok gilles@

Revision 1.262 / (download) - annotate - [select for diffs], Fri Sep 20 17:46:05 2019 UTC (4 years, 8 months ago) by gilles
Branch: MAIN
Changes since 1.261: +41 -2 lines
Diff to previous 1.261 (colored)

teach smtpd how to do SRS so hosts that act as forwarders don't break SPF.
this basic implementation does SRS0/SRS1 encoding/decoding, validating time
and checksums.

with insight from semarie@, ok eric@ and millert@

Revision 1.261 / (download) - annotate - [select for diffs], Fri Sep 6 08:23:56 2019 UTC (4 years, 8 months ago) by martijn
Branch: MAIN
Changes since 1.260: +6 -10 lines
Diff to previous 1.260 (colored)

Add support for filter-reports. These allow filters to send freetext
reports to other filters/report handlers.
Builtin filters work via the new "report" keyword.
Proc filters can send reports via:
"report|<seconds.<microseconds>|smtp-in|<reqid>|<message>"
Subscribing to these reports can be done via the the "filter-report"
keyword.
The reports themselves contain the usual elements followed by:
<type>|<name>|<message>
Type can be builtin or proc.
Name is the process name for type proc and the filter name for type builtin.

OK gilles@

Revision 1.260 / (download) - annotate - [select for diffs], Wed Sep 4 07:28:27 2019 UTC (4 years, 8 months ago) by gilles
Branch: MAIN
Changes since 1.259: +17 -2 lines
Diff to previous 1.259 (colored)

introduce the 'junk' builtin filter action which marks a session or
transaction as junked when a filter matches. this with the maildir
junk option allows classifying messages in Spam folder instead of
rejecting/disconnecting.

ok semarie@, eric@, martijn@

Revision 1.259 / (download) - annotate - [select for diffs], Sun Aug 25 03:40:45 2019 UTC (4 years, 9 months ago) by martijn
Branch: MAIN
Changes since 1.258: +33 -1 lines
Diff to previous 1.258 (colored)

Allow for "port smtp" and "port smtps" on listen statement.
This was previously not allowed, because both smtp and smtps are keywords.
Since port's argument is non-optional and smtp and smtps are common enough
there is no chance for misinterpretation.

Problem reported by phatbuckett <at> gmail <dot> com
OK gilles@

Revision 1.258 / (download) - annotate - [select for diffs], Fri Aug 23 19:05:01 2019 UTC (4 years, 9 months ago) by martijn
Branch: MAIN
Changes since 1.257: +2 -9 lines
Diff to previous 1.257 (colored)

Assign the filter name to the proc name in the case of proc_exec.
This gives a more intuitive log-entry for filter stderr output and gets rid
of the last_dynproc_id.

"nice" gilles@

Revision 1.257 / (download) - annotate - [select for diffs], Sun Aug 11 17:23:12 2019 UTC (4 years, 9 months ago) by gilles
Branch: MAIN
Changes since 1.256: +9 -2 lines
Diff to previous 1.256 (colored)

add 'from rdns' to ruleset match criterias making it possible to match
envelopes created by sessions that had or did not have an rDNS:

    match from rdns [...] action "local"
    match !from rdns [...] reject

Revision 1.256 / (download) - annotate - [select for diffs], Sun Aug 11 16:35:10 2019 UTC (4 years, 9 months ago) by gilles
Branch: MAIN
Changes since 1.255: +5 -1 lines
Diff to previous 1.255 (colored)

fix rewrite action on filtering of MAIL FROM phase
basically the transaction must be created in the proceed function for the
mail from phase, not in the checking function, otherwise the second pass
in the check function will fail due to the tx already existing.

reported by Niklas Hallqvist <niklas@appli.se>

Revision 1.255 / (download) - annotate - [select for diffs], Sun Aug 11 12:17:06 2019 UTC (4 years, 9 months ago) by gilles
Branch: MAIN
Changes since 1.254: +15 -15 lines
Diff to previous 1.254 (colored)

rework grammar for builtin filters so i can start documenting it

Revision 1.254 / (download) - annotate - [select for diffs], Sat Aug 10 16:07:01 2019 UTC (4 years, 9 months ago) by gilles
Branch: MAIN
Changes since 1.253: +13 -3 lines
Diff to previous 1.253 (colored)

this introduces experimental proxy v2 support which is fairly isolated to a
single proxy.c file, importing it to work in tree

initial work from Antoine Kaufmann <toni@famkaufmann.info>

Revision 1.253 / (download) - annotate - [select for diffs], Fri Jun 28 13:32:50 2019 UTC (4 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.252: +2 -2 lines
Diff to previous 1.252 (colored)

When system calls indicate an error they return -1, not some arbitrary
value < 0.  errno is only updated in this case.  Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.

Revision 1.252 / (download) - annotate - [select for diffs], Mon May 20 07:04:13 2019 UTC (5 years ago) by gilles
Branch: MAIN
Changes since 1.251: +3 -3 lines
Diff to previous 1.251 (colored)

rev 1.219 of the file was a fix to an LMTP issue that was misunderstood. we
fixed the root cause in mda_variables.c months ago independantely but we're
still carrying this diff which is not only unnecessary now, but is also the
cause of a bug with mailer-daemons going through an LMTP mda.

issue reported by otto@

Revision 1.251 / (download) - annotate - [select for diffs], Wed Feb 13 22:57:08 2019 UTC (5 years, 3 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.250: +3 -3 lines
Diff to previous 1.250 (colored)

(unsigned) means (unsigned int) which on ptrdiff_t or size_t or other
larger types really is a range reduction...
Almost any cast to (unsigned) is a bug.
ok millert tb benno

Revision 1.250 / (download) - annotate - [select for diffs], Fri Dec 28 14:21:02 2018 UTC (5 years, 5 months ago) by eric
Branch: MAIN
Changes since 1.249: +1 -4 lines
Diff to previous 1.249 (colored)

type static tables on the fly when the first element is added

ok gilles@

Revision 1.249 / (download) - annotate - [select for diffs], Fri Dec 28 11:40:29 2018 UTC (5 years, 5 months ago) by eric
Branch: MAIN
Changes since 1.248: +10 -10 lines
Diff to previous 1.248 (colored)

remove the tag workaround for table_create() and table_find(),
now that static tables handle their updates internally.

ok gilles@

Revision 1.248 / (download) - annotate - [select for diffs], Sun Dec 23 15:49:04 2018 UTC (5 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.247: +44 -1 lines
Diff to previous 1.247 (colored)

when a filter chain is only used once, no need to create a named chain, it
can now be inlined on listen lines:  listen on all filter { foo1, foo2 }

Revision 1.247 / (download) - annotate - [select for diffs], Sun Dec 23 14:26:02 2018 UTC (5 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.246: +3 -3 lines
Diff to previous 1.246 (colored)

revive filters tracing (-T filters) to make it easier understand what is
happening at filters level

Revision 1.246 / (download) - annotate - [select for diffs], Sat Dec 22 13:09:05 2018 UTC (5 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.245: +16 -1 lines
Diff to previous 1.245 (colored)

introduce 'rcpt-to' builtin filter, can only be used on 'rcpt-to' hook

Revision 1.245 / (download) - annotate - [select for diffs], Sat Dec 22 12:31:40 2018 UTC (5 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.244: +28 -5 lines
Diff to previous 1.244 (colored)

introduce 'mail-from' builtin filter, can be applied on the 'mail-from',
'rcpt-to', 'data' and 'commit' phases.

Revision 1.244 / (download) - annotate - [select for diffs], Sat Dec 22 12:17:16 2018 UTC (5 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.243: +30 -1 lines
Diff to previous 1.243 (colored)

introduce 'helo' builtin filter, can be used on any hook but 'connect'

Revision 1.243 / (download) - annotate - [select for diffs], Sat Dec 22 09:30:19 2018 UTC (5 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.242: +11 -17 lines
Diff to previous 1.242 (colored)

reuse existing tokens for builtin filter names to avoid creating too many
new keywords, 'check-rdns' & 'check-src' are not better than 'rdns' & 'src'

Revision 1.242 / (download) - annotate - [select for diffs], Sat Dec 22 08:54:02 2018 UTC (5 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.241: +45 -4 lines
Diff to previous 1.241 (colored)

introduce new matching criteria 'from rdns' to match sessions based on rDNS
of the client, works with literal and tables, both string and regex:

	match from rdns "mx1.poolp.org" for any action blahblah

Revision 1.241 / (download) - annotate - [select for diffs], Fri Dec 21 21:35:29 2018 UTC (5 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.240: +130 -2 lines
Diff to previous 1.240 (colored)

since we already support regex lookups in tables for builtin filters, let's
also support regex lookups in match rule criterias performing table lookups

ok millert@

Revision 1.240 / (download) - annotate - [select for diffs], Fri Dec 21 19:07:47 2018 UTC (5 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.239: +2 -4 lines
Diff to previous 1.239 (colored)

- make the proc filter fd non-blocking
- client sessions may disappear while filter is streaming data, dont panic

Revision 1.239 / (download) - annotate - [select for diffs], Fri Dec 21 17:04:46 2018 UTC (5 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.238: +74 -33 lines
Diff to previous 1.238 (colored)

implement some additional builtin filters:
check-src-{table,regex}, check-rdns-{table,regex}

make sure that these builtins may be used at all phases

Revision 1.238 / (download) - annotate - [select for diffs], Fri Dec 21 14:33:52 2018 UTC (5 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.237: +167 -42 lines
Diff to previous 1.237 (colored)

bring in new grammar for filters, allowing filter chains and plugging of
different filters & chains on different interfaces.

in this diff, proc filters are still disabled as they're missing on very
important piece of logic.

ok eric@

Revision 1.237 / (download) - annotate - [select for diffs], Thu Dec 13 14:43:31 2018 UTC (5 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.236: +1 -56 lines
Diff to previous 1.236 (colored)

only allow builtin filters to declare which hook they listen to in the conf
since proc filters are going to register themselves through the protocol.

this will allow us to plug proc filters that deal with multiple hooks w/out
having to declare each and every hook, and without risking to forget one.

discussed with eric@

Revision 1.236 / (download) - annotate - [select for diffs], Tue Dec 11 14:52:50 2018 UTC (5 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.235: +33 -39 lines
Diff to previous 1.235 (colored)

remove filter action "rewrite" can only be done from a proc filter
remove "report" keyword, a proc filter gets report events

discussed with eric@

Revision 1.235 / (download) - annotate - [select for diffs], Sun Dec 9 18:24:15 2018 UTC (5 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.234: +4 -4 lines
Diff to previous 1.234 (colored)

allow check-rdns and check-fcrdns in connect, helo/ehlo, mail-from, rcpt-to
hooks

ok eric@

Revision 1.234 / (download) - annotate - [select for diffs], Sun Dec 9 18:05:20 2018 UTC (5 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.233: +11 -3 lines
Diff to previous 1.233 (colored)

add check-fcrdns builtin filter

ok eric@

Revision 1.233 / (download) - annotate - [select for diffs], Thu Dec 6 13:57:06 2018 UTC (5 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.232: +13 -2 lines
Diff to previous 1.232 (colored)

allow passing data lines to proc filters

ok eric@

Revision 1.232 / (download) - annotate - [select for diffs], Fri Nov 30 15:33:40 2018 UTC (5 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.231: +17 -3 lines
Diff to previous 1.231 (colored)

prepare for smtp-out reporting and while at it, make a few changes to the
report format

Revision 1.231 / (download) - annotate - [select for diffs], Thu Nov 29 12:48:16 2018 UTC (5 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.230: +13 -2 lines
Diff to previous 1.230 (colored)

introduce FILTER_COMMIT which will allow taking a decision at DATA commit
time, unusable yet but necessary for the upcoming serie of diffs.

ok eric@

Revision 1.230 / (download) - annotate - [select for diffs], Thu Nov 8 13:24:22 2018 UTC (5 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.229: +5 -4 lines
Diff to previous 1.229 (colored)

introduce smtp-in keyword in grammar so we can report smtp-in and smtp-out
events with less ambiguity

ok eric@

Revision 1.229 / (download) - annotate - [select for diffs], Sat Nov 3 14:39:45 2018 UTC (5 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.228: +11 -20 lines
Diff to previous 1.228 (colored)

only apply filter rules to filtered interfaces

Revision 1.228 / (download) - annotate - [select for diffs], Sat Nov 3 13:56:49 2018 UTC (5 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.227: +12 -4 lines
Diff to previous 1.227 (colored)

check-rdns builtin filter, to be improved

Revision 1.227 / (download) - annotate - [select for diffs], Sat Nov 3 13:47:46 2018 UTC (5 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.226: +2 -23 lines
Diff to previous 1.226 (colored)

bring plumbing for proc filters

ok millert@, eric@, jung@

Revision 1.226 / (download) - annotate - [select for diffs], Sat Nov 3 13:42:24 2018 UTC (5 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.225: +191 -7 lines
Diff to previous 1.225 (colored)

bring plumbing for builtin filters

ok millert@, eric@, jung@

Revision 1.225 / (download) - annotate - [select for diffs], Thu Nov 1 14:48:49 2018 UTC (5 years, 7 months ago) by gilles
Branch: MAIN
Changes since 1.224: +22 -5 lines
Diff to previous 1.224 (colored)

teach smtp process how to report smtp events to lka and teach lka how to
report these events to a proc

ok millert@

Revision 1.224 / (download) - annotate - [select for diffs], Thu Nov 1 10:13:25 2018 UTC (5 years, 7 months ago) by gilles
Branch: MAIN
Changes since 1.223: +59 -4 lines
Diff to previous 1.223 (colored)

allow smtpd to fork processes at startup and maintain a socketpair with
them.

ok jung@, eric@

Revision 1.223 / (download) - annotate - [select for diffs], Thu Nov 1 00:18:44 2018 UTC (5 years, 7 months ago) by sashan
Branch: MAIN
Changes since 1.222: +3 -2 lines
Diff to previous 1.222 (colored)

- odd condition/test in PF lexer
  (and other lexers too)

This commit rectifies earlier change:

    in the lex... even inside quotes, a \ followed by space or tab should
    expand to space or tab, and a \ followed by newline should be ignored
    (as a line continuation).  compatible with the needs of hoststated
    (which has the most strict quoted string requirements), and ifstated
    (where one commonly does line continuations in strings).

OK deraadt@, OK millert@

Revision 1.222 / (download) - annotate - [select for diffs], Mon Sep 24 16:14:34 2018 UTC (5 years, 8 months ago) by eric
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.221: +10 -6 lines
Diff to previous 1.221 (colored)

Allow to use the "tls" keyword on any relay action to force TLS, with
strict certificate validation.  The "no-verify" becomes optional.

ok gilles@ millert@ semarie@

Revision 1.221 / (download) - annotate - [select for diffs], Fri Sep 7 07:35:31 2018 UTC (5 years, 8 months ago) by miko
Branch: MAIN
Changes since 1.220: +4 -9 lines
Diff to previous 1.220 (colored)

replace malloc()+strlcpy() with strndup() in cmdline_symset().

"looks good" gilles@ halex@

Revision 1.220 / (download) - annotate - [select for diffs], Wed Sep 5 08:47:34 2018 UTC (5 years, 8 months ago) by gilles
Branch: MAIN
Changes since 1.219: +6 -6 lines
Diff to previous 1.219 (colored)

rename token to match naming convention

ok eric@

Revision 1.219 / (download) - annotate - [select for diffs], Sat Sep 1 21:20:32 2018 UTC (5 years, 9 months ago) by gilles
Branch: MAIN
Changes since 1.218: +3 -3 lines
Diff to previous 1.218 (colored)

properly deal with MAILER-DAEMON sender in LMTP

reported and fix tested by Mark Kane

Revision 1.218 / (download) - annotate - [select for diffs], Sat Aug 25 19:05:23 2018 UTC (5 years, 9 months ago) by gilles
Branch: MAIN
Changes since 1.217: +1 -2 lines
Diff to previous 1.217 (colored)

remove unused header

from Freddy Dissaux

Revision 1.217 / (download) - annotate - [select for diffs], Sun Jul 15 08:49:12 2018 UTC (5 years, 10 months ago) by gilles
Branch: MAIN
Changes since 1.216: +1 -2 lines
Diff to previous 1.216 (colored)

remove unused variable

Revision 1.216 / (download) - annotate - [select for diffs], Wed Jul 11 07:39:22 2018 UTC (5 years, 10 months ago) by krw
Branch: MAIN
Changes since 1.215: +4 -4 lines
Diff to previous 1.215 (colored)

Do for most running out of memory err() what was done for most running
out of memory log_warn(). i.e. ("%s", __func__) instead of manual
function names and redundant verbiage about which wrapper detected the
out of memory condition.

ok henning@

Revision 1.215 / (download) - annotate - [select for diffs], Mon Jul 9 12:05:11 2018 UTC (5 years, 10 months ago) by krw
Branch: MAIN
Changes since 1.214: +5 -5 lines
Diff to previous 1.214 (colored)

No need to mention which memory allocation entry point failed (malloc,
calloc or strdup), we just need to log that we ran out of memory in a
particular function.

Recommended by florian@ and deraadt@

ok benno@ henning@ tb@

Revision 1.214 / (download) - annotate - [select for diffs], Mon Jun 18 18:19:14 2018 UTC (5 years, 11 months ago) by gilles
Branch: MAIN
Changes since 1.213: +3 -175 lines
Diff to previous 1.213 (colored)

simplify parse_config() further so it no longer has any side effect outside
of parse.y, there's still work to be done but it's now able to run twice if
we want (we don't) without failing due to some global side-effect.

ok millert@

Revision 1.213 / (download) - annotate - [select for diffs], Sat Jun 16 19:41:26 2018 UTC (5 years, 11 months ago) by gilles
Branch: MAIN
Changes since 1.212: +15 -15 lines
Diff to previous 1.212 (colored)

rework the table API so that it takes a struct smtpd * context in parameter
of functions creating, looking up or destroying tables.

this is a first step in cleaning up parse.y so it doesn't have side effects
outside of parse_config(), bringing nothing but making code cleaner.

ok millert@

Revision 1.212 / (download) - annotate - [select for diffs], Fri Jun 15 08:57:17 2018 UTC (5 years, 11 months ago) by gilles
Branch: MAIN
Changes since 1.211: +4 -4 lines
Diff to previous 1.211 (colored)

the %{sender} variable should expand to the MAIL FROM address, so in the
case of a mailer daemon, this is an empty string, not '@'

introduce %{mbox.from} which is the From separator line representation
of a sender, usually an email address or MAILER-DAEMON if sender is empty

ok eric@

Revision 1.211 / (download) - annotate - [select for diffs], Mon Jun 4 15:57:46 2018 UTC (5 years, 11 months ago) by gilles
Branch: MAIN
Changes since 1.210: +98 -46 lines
Diff to previous 1.210 (colored)

add support for mda wrappers allowing postmaster to define command wrappers
that will be executed (with recipient privileges) before calling the users'
mail delivery agent

ok eric@

Revision 1.210 / (download) - annotate - [select for diffs], Fri Jun 1 20:31:33 2018 UTC (6 years ago) by gilles
Branch: MAIN
Changes since 1.209: +59 -59 lines
Diff to previous 1.209 (colored)

reorder pki grammar, no functional change

Revision 1.209 / (download) - annotate - [select for diffs], Fri Jun 1 19:42:24 2018 UTC (6 years ago) by gilles
Branch: MAIN
Changes since 1.208: +184 -147 lines
Diff to previous 1.208 (colored)

instead of using 'set queue XXX' 'set mta XXX' 'set mda XXX' to set option
XXX on the relevant component, just drop the keyword 'set', it does not do
anything useful and makes config directives longer.

while at it, instead of having 'limit' as a main keyword, make it an option
on components.

and also while at it, do cleanup parse.y a bit

ok millert@

Revision 1.208 / (download) - annotate - [select for diffs], Fri Jun 1 12:24:16 2018 UTC (6 years ago) by eric
Branch: MAIN
Changes since 1.207: +16 -2 lines
Diff to previous 1.207 (colored)

Require a valid certificate by default when relaying through a smarthost.
Add "tls no-verify" relay option to disable it.

suggested and initial diff by semarie@.

ok gilles@

Revision 1.207 / (download) - annotate - [select for diffs], Thu May 31 21:06:12 2018 UTC (6 years ago) by gilles
Branch: MAIN
Changes since 1.206: +15 -15 lines
Diff to previous 1.206 (colored)

remove 'where' parameter from all x*() functions in utils.c, it doesn't
really help us with anything, propagate the change in codebase

ok millert@

Revision 1.206 / (download) - annotate - [select for diffs], Wed May 30 19:01:58 2018 UTC (6 years ago) by gilles
Branch: MAIN
Changes since 1.205: +35 -33 lines
Diff to previous 1.205 (colored)

cosmethic change, shuffle smtpd specific grammar bits _after_ the ones that
make sense to others

Revision 1.205 / (download) - annotate - [select for diffs], Wed May 30 09:31:57 2018 UTC (6 years ago) by gilles
Branch: MAIN
Changes since 1.204: +14 -1 lines
Diff to previous 1.204 (colored)

teach mail.maildir how to junk mails if -j option is set and X-Spam is
positive, this can be enabled with the 'junk' option in maildir action

ok eric@

Revision 1.204 / (download) - annotate - [select for diffs], Tue May 29 22:16:15 2018 UTC (6 years ago) by gilles
Branch: MAIN
Changes since 1.203: +11 -2 lines
Diff to previous 1.203 (colored)

it turns out we can provide syntaxic sugar for an LMTP action in smtpd.conf
which should please our users ;-)

while at it get rid of unix:/inet: prefixes in LMTP destinations, we either
use an absolute path for a UNIX socket or it's necessarily a network socket
so '/' as the first char of the destination makes the prefixes irrelevant.

Revision 1.203 / (download) - annotate - [select for diffs], Tue May 29 19:32:34 2018 UTC (6 years ago) by gilles
Branch: MAIN
Changes since 1.202: +4 -5 lines
Diff to previous 1.202 (colored)

simplify mail.maildir as well as the parse.y glue

ok eric@

Revision 1.202 / (download) - annotate - [select for diffs], Fri May 25 14:10:28 2018 UTC (6 years ago) by gilles
Branch: MAIN
Changes since 1.201: +9 -1 lines
Diff to previous 1.201 (colored)

default to from local and for local as we used to

spotted by millert@, ok eric@

Revision 1.201 / (download) - annotate - [select for diffs], Thu May 24 11:38:24 2018 UTC (6 years ago) by gilles
Branch: MAIN
Changes since 1.200: +642 -587 lines
Diff to previous 1.200 (colored)

switch smtpd to new grammar

ok eric@

Revision 1.200 / (download) - annotate - [select for diffs], Thu Apr 26 14:12:19 2018 UTC (6 years, 1 month ago) by krw
Branch: MAIN
Changes since 1.199: +3 -1 lines
Diff to previous 1.199 (colored)

Plug leak in error case of the common 'varset' implementations.

ok benno@

Revision 1.199 / (download) - annotate - [select for diffs], Fri Sep 8 16:51:21 2017 UTC (6 years, 8 months ago) by eric
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.198: +1 -3 lines
Diff to previous 1.198 (colored)

remove more filter-related cruft

ok gilles@

Revision 1.198 / (download) - annotate - [select for diffs], Mon Aug 28 06:00:05 2017 UTC (6 years, 9 months ago) by florian
Branch: MAIN
Changes since 1.197: +2 -2 lines
Diff to previous 1.197 (colored)

65535 is a valid port to listen on.
Off-by-one pointed out by and diff from Kris Katterjohn katterjohn AT
gmail, thanks!
chris@ pointed out that more than httpd(8) is effected.
OK gilles@

Revision 1.197 / (download) - annotate - [select for diffs], Tue Jul 11 06:08:40 2017 UTC (6 years, 10 months ago) by natano
Branch: MAIN
Changes since 1.196: +2 -11 lines
Diff to previous 1.196 (colored)

Remove "listen secure" syntax from smtpd.conf. It's broken since a couple of
months and noone complained.

Users should replace existing "listen secure" directives with two separate
"tls" and "smtps" listeners. i.e. a line like

        listen on $iface tls pki $pki

has to be replaced with

        listen on $iface tls pki $pki
        listen on $iface smtps pki $pki

Relaying syntax is not affected by this change.

suggested by eric
ok gilles

Revision 1.196 / (download) - annotate - [select for diffs], Mon May 22 13:43:15 2017 UTC (7 years ago) by gilles
Branch: MAIN
Changes since 1.195: +2 -112 lines
Diff to previous 1.195 (colored)

- filters are currently broken, do not allow using them until we're done

Revision 1.195 / (download) - annotate - [select for diffs], Mon Feb 13 12:43:43 2017 UTC (7 years, 3 months ago) by gilles
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.194: +4 -1 lines
Diff to previous 1.194 (colored)

fix incoming tls-require regression, introduced with last parse.y cleanup
causing the flag not to be propagated down to the listener

ok eric@

Revision 1.194 / (download) - annotate - [select for diffs], Mon Feb 13 12:23:47 2017 UTC (7 years, 3 months ago) by gilles
Branch: MAIN
Changes since 1.193: +3 -2 lines
Diff to previous 1.193 (colored)

allow negation of authenticated keyword:
	accept ! authenticated [...]

ok sunil@, jung@

Revision 1.193 / (download) - annotate - [select for diffs], Thu Jan 5 13:53:09 2017 UTC (7 years, 4 months ago) by krw
Branch: MAIN
Changes since 1.192: +2 -3 lines
Diff to previous 1.192 (colored)

Replace hand-rolled for(;;) emptying of 'symhead' TAILQ with more
modern TAILQ_FOREACH_SAFE().

No intentional functional change.

ok millert@ bluhm@ gilles@

Revision 1.192 / (download) - annotate - [select for diffs], Thu Jan 5 12:42:19 2017 UTC (7 years, 4 months ago) by krw
Branch: MAIN
Changes since 1.191: +7 -5 lines
Diff to previous 1.191 (colored)

Replace symset()'s hand-rolled for(;;) traversal of 'symhead' TAILQ
with more modern TAILQ_FOREACH(). This what symget() was already
doing.

Add paranoia '{}' around body of symget()'s TAILQ_FOREACH().

No intentional functional change.

ok bluhm@ otto@

Revision 1.191 / (download) - annotate - [select for diffs], Fri Nov 25 09:21:21 2016 UTC (7 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.190: +4 -1 lines
Diff to previous 1.190 (colored)

assign an id to each rule in the ruleset, first step towards an MTA layer
and scheduler simplification

ok eric@

Revision 1.190 / (download) - annotate - [select for diffs], Mon Sep 12 07:33:00 2016 UTC (7 years, 8 months ago) by eric
Branch: MAIN
Changes since 1.189: +54 -65 lines
Diff to previous 1.189 (colored)

listener configuration cleanup:

- have all listener creation functions take listen_opts as param,
  and call config_listener() when done, which adds the listener(s)
  to the current config list of listeners.
- make the fallback chain between interface(), host_v4() host_v6()
  and host_dns() obvious when creating an if_listener.
- fix a bug where the specified family was ignored if the listener
  is given as a hostname.

ok gilles@ sunil@

Revision 1.189 / (download) - annotate - [select for diffs], Wed Aug 31 15:24:04 2016 UTC (7 years, 9 months ago) by gilles
Branch: MAIN
Changes since 1.188: +9 -2 lines
Diff to previous 1.188 (colored)

introduce "authenticated" parameter so rules may apply to authenticated
sessions specifically

ok eric@, sunil@, jung@

Revision 1.188 / (download) - annotate - [select for diffs], Wed Aug 31 10:18:08 2016 UTC (7 years, 9 months ago) by gilles
Branch: MAIN
Changes since 1.187: +19 -2 lines
Diff to previous 1.187 (colored)

allow overriding the subaddressing delimiter with subaddressing-delimiter
keyword, the default is still +

ok eric@, sunil@

Revision 1.187 / (download) - annotate - [select for diffs], Tue Aug 30 21:33:58 2016 UTC (7 years, 9 months ago) by gilles
Branch: MAIN
Changes since 1.186: +2 -2 lines
Diff to previous 1.186 (colored)

when configuring the daemon, assign values to the structure being conf-ed,
not the global structure. this worked by accident.

ok eric@

Revision 1.186 / (download) - annotate - [select for diffs], Fri Jul 1 17:53:23 2016 UTC (7 years, 11 months ago) by eric
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.185: +2 -1 lines
Diff to previous 1.185 (colored)

flag the local socket listener as local.
clarify check for local listeners.

ok gilles@ millert@

Revision 1.185 / (download) - annotate - [select for diffs], Tue Jun 21 21:35:25 2016 UTC (7 years, 11 months ago) by benno
Branch: MAIN
Changes since 1.184: +9 -1 lines
Diff to previous 1.184 (colored)

do not allow whitespace in macro names, i.e. "this is" = "a variable".
change this in all config parsers in our tree that support macros.
problem reported by sven falempin.

feedback from henning@, stsp@, deraadt@
ok florian@ mikeb@

Revision 1.184 / (download) - annotate - [select for diffs], Thu Apr 21 14:27:41 2016 UTC (8 years, 1 month ago) by jsing
Branch: MAIN
Changes since 1.183: +16 -5 lines
Diff to previous 1.183 (colored)

Use automatic DH parameters, instead of fixed ones. Also disable DHE by
default since it is computationally expensive and a potential DoS vector.

ok gilles@

Revision 1.183 / (download) - annotate - [select for diffs], Mon Feb 22 16:19:05 2016 UTC (8 years, 3 months ago) by gilles
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.182: +6 -7 lines
Diff to previous 1.182 (colored)

the default address family for a listener was set too late and would
override the value provided by the user if any. this commit moves the
initialization earlier to avoid this.

issue reported by and fix ok jturner@

Revision 1.182 / (download) - annotate - [select for diffs], Sat Feb 13 20:43:07 2016 UTC (8 years, 3 months ago) by gilles
Branch: MAIN
Changes since 1.181: +98 -39 lines
Diff to previous 1.181 (colored)

handle enqueuer socket as a regular listener that can be configured with
"listen on socket". this simplifies a bit of code, removes some special
cases and will allow attaching filters & masking source just as on lo0.

diff from Peter Bisroev <peter@int19h.net>
ok gilles@, jung@

Revision 1.181 / (download) - annotate - [select for diffs], Mon Jan 18 09:19:41 2016 UTC (8 years, 4 months ago) by jung
Branch: MAIN
Changes since 1.180: +2 -3 lines
Diff to previous 1.180 (colored)

remove leftovers of (gone) curve option

ok gilles

Revision 1.180 / (download) - annotate - [select for diffs], Tue Jan 12 17:29:43 2016 UTC (8 years, 4 months ago) by sunil
Branch: MAIN
Changes since 1.179: +2 -2 lines
Diff to previous 1.179 (colored)

Let smtpd start on machines without a FQDN as hostname.

Ok millert@ gilles@ jung@

Revision 1.179 / (download) - annotate - [select for diffs], Mon Jan 4 13:30:20 2016 UTC (8 years, 4 months ago) by jung
Branch: MAIN
Changes since 1.178: +2 -2 lines
Diff to previous 1.178 (colored)

switch to /usr/local/libexec when looking for -extras and drop loop iterating
paths

this effectively reverts table.c r1.21 which was mainly introduced for a smooth
transition in -current

ok gilles

Revision 1.178 / (download) - annotate - [select for diffs], Mon Dec 28 22:08:30 2015 UTC (8 years, 5 months ago) by jung
Branch: MAIN
Changes since 1.177: +33 -33 lines
Diff to previous 1.177 (colored)

remove spaces after '!'

no binary change

ok millert

Revision 1.177 / (download) - annotate - [select for diffs], Sat Dec 12 20:02:31 2015 UTC (8 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.176: +1 -4 lines
Diff to previous 1.176 (colored)

remove CA from pki and no longer allow specifying a CA with 'pki' keyword.
introduce 'ca' keyword to allow specifying a custom CA.
making CA part of pki was a bad idea and several people hit use-cases that
plain couldn't work.

instead of:
    pki foobar.org ca "/etc/mail/CA.pem"

use now:
    ca foobar.org certificate "/etc/mail/CA.pem"


ok sunil@, jung@

Revision 1.176 / (download) - annotate - [select for diffs], Sat Dec 12 18:52:23 2015 UTC (8 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.175: +6 -6 lines
Diff to previous 1.175 (colored)

whitespaces

Revision 1.175 / (download) - annotate - [select for diffs], Sat Dec 12 18:49:38 2015 UTC (8 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.174: +1 -3 lines
Diff to previous 1.174 (colored)

when using senders map to restrict email address a user may use in SMTP
dialogue, if `masquerade' is used as a parameter then rewrite the email
address of the DATA From header to the email address in the map.

Revision 1.174 / (download) - annotate - [select for diffs], Sat Dec 12 17:16:56 2015 UTC (8 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.173: +4 -1 lines
Diff to previous 1.173 (colored)

allow overriding the default cipher-suite

ok jung@, sunil@, millert@

Revision 1.173 / (download) - annotate - [select for diffs], Sat Dec 12 14:44:36 2015 UTC (8 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.172: +10 -1 lines
Diff to previous 1.172 (colored)

check in parse.y that pki param is a valid hostname

Revision 1.172 / (download) - annotate - [select for diffs], Sat Dec 12 12:38:36 2015 UTC (8 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.171: +24 -2 lines
Diff to previous 1.171 (colored)

prepare bits to enable masquerade in parse.y

Revision 1.171 / (download) - annotate - [select for diffs], Sat Dec 12 12:34:51 2015 UTC (8 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.170: +2 -1 lines
Diff to previous 1.170 (colored)

add missing check for failed allocation

Revision 1.170 / (download) - annotate - [select for diffs], Sat Dec 12 12:28:04 2015 UTC (8 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.169: +2 -2 lines
Diff to previous 1.169 (colored)

spaces

Revision 1.169 / (download) - annotate - [select for diffs], Sat Dec 12 12:22:25 2015 UTC (8 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.168: +15 -1 lines
Diff to previous 1.168 (colored)

add bits so local enqueuer can run filters when they are enabled

Revision 1.168 / (download) - annotate - [select for diffs], Sat Dec 12 11:31:29 2015 UTC (8 years, 5 months ago) by sunil
Branch: MAIN
Changes since 1.167: +21 -1 lines
Diff to previous 1.167 (colored)

Implement senders map.

senders table allows to restrict the addresses that an authenticated
user can use in the SMTP dialogue.

Ok gilles@

Revision 1.167 / (download) - annotate - [select for diffs], Sat Dec 12 09:00:22 2015 UTC (8 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.166: +2 -2 lines
Diff to previous 1.166 (colored)

rename an smtpd specific define

Revision 1.166 / (download) - annotate - [select for diffs], Fri Dec 11 08:27:04 2015 UTC (8 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.165: +8 -3 lines
Diff to previous 1.165 (colored)

add keywords that are going to be used in upcoming mini diffs

Revision 1.165 / (download) - annotate - [select for diffs], Fri Dec 11 08:19:03 2015 UTC (8 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.164: +8 -1 lines
Diff to previous 1.164 (colored)

in add_filter_arg() do not allow the same filter twice in same chain
unused for now

Revision 1.164 / (download) - annotate - [select for diffs], Thu Dec 3 21:11:33 2015 UTC (8 years, 6 months ago) by jung
Branch: MAIN
Changes since 1.163: +27 -2 lines
Diff to previous 1.163 (colored)

introduce limit session keyword replacing fixed values

original diff from Renaud Allard

ok gilles

Revision 1.163 / (download) - annotate - [select for diffs], Wed Dec 2 09:06:36 2015 UTC (8 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.162: +3 -3 lines
Diff to previous 1.162 (colored)

whitespaces

Revision 1.162 / (download) - annotate - [select for diffs], Tue Dec 1 18:22:30 2015 UTC (8 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.161: +12 -1 lines
Diff to previous 1.161 (colored)

add received-auth parameter to listener to identify authenticated sessions
in locally appended Received header when enabled

ok millert@, jung@

Revision 1.161 / (download) - annotate - [select for diffs], Tue Dec 1 15:43:01 2015 UTC (8 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.160: +12 -12 lines
Diff to previous 1.160 (colored)

update enum values in listen options

Revision 1.160 / (download) - annotate - [select for diffs], Tue Dec 1 10:57:24 2015 UTC (8 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.159: +2 -2 lines
Diff to previous 1.159 (colored)

reorder header

Revision 1.159 / (download) - annotate - [select for diffs], Tue Dec 1 09:33:17 2015 UTC (8 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.158: +74 -4 lines
Diff to previous 1.158 (colored)

prepare the ground for the CA certificate handling refactor, this commit
adds the parse.y bit + structures & members needed but does not make use
of it yet

Revision 1.158 / (download) - annotate - [select for diffs], Mon Nov 30 14:13:03 2015 UTC (8 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.157: +2 -2 lines
Diff to previous 1.157 (colored)

when looking up tables, start in /usr/local/libexec before /usr/libexec, so
ports/packages can be installed in the proper place

ok jung@

Revision 1.157 / (download) - annotate - [select for diffs], Mon Nov 30 12:26:55 2015 UTC (8 years, 6 months ago) by sunil
Branch: MAIN
Changes since 1.156: +14 -4 lines
Diff to previous 1.156 (colored)

While delivering to lmtp or mda, accept optional "as user" parameter
whose privileges would be used instead of the default.

Ok gilles@ jung@

Revision 1.156 / (download) - annotate - [select for diffs], Thu Nov 5 12:35:58 2015 UTC (8 years, 6 months ago) by jung
Branch: MAIN
Changes since 1.155: +46 -46 lines
Diff to previous 1.155 (colored)

replace u_char and u_int* with standard stdint.h types to ease portable version
also remove trailing whitespaces while here

no binary change

ok sunil millert gilles

Revision 1.155 / (download) - annotate - [select for diffs], Tue Oct 27 21:20:11 2015 UTC (8 years, 7 months ago) by jung
Branch: MAIN
Changes since 1.154: +18 -2 lines
Diff to previous 1.154 (colored)

add a rcpt-to parameter to be able to use the original (probably expanded)
RCPT TO within LMTP sessions

ok gilles eric

Revision 1.154 / (download) - annotate - [select for diffs], Mon Sep 7 15:36:53 2015 UTC (8 years, 8 months ago) by gilles
Branch: MAIN
Changes since 1.153: +15 -1 lines
Diff to previous 1.153 (colored)

when bypassing the enqueuer, insert Message-Id header if none was found and
the client has connected from a loopback interface.

ok millert@ eric@

Revision 1.153 / (download) - annotate - [select for diffs], Wed Aug 19 16:14:54 2015 UTC (8 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.152: +2 -3 lines
Diff to previous 1.152 (colored)

do not cast result from xcalloc(); it is in scope

Revision 1.152 / (download) - annotate - [select for diffs], Sun Feb 8 04:50:32 2015 UTC (9 years, 3 months ago) by reyk
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.151: +2 -1 lines
Diff to previous 1.151 (colored)

Use AI_ADDRCONFIG when resolv hosts on startup.

OK henning@

Revision 1.151 / (download) - annotate - [select for diffs], Tue Jan 20 17:37:54 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.150: +3 -3 lines
Diff to previous 1.150 (colored)

use <limits.h> comprehensively.  For now try to push <> includes to
each .c file, and out of the .h files.  To avoid overinclude.
ok gilles, in principle.  If this has been done right, -portable should
become easier to maintain.

Revision 1.150 / (download) - annotate - [select for diffs], Fri Jan 16 06:40:20 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.149: +3 -2 lines
Diff to previous 1.149 (colored)

Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible.  Annotate <sys/param.h> lines with their current reasons.  Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc.  Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution.  These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)

Revision 1.149 / (download) - annotate - [select for diffs], Thu Nov 20 05:51:21 2014 UTC (9 years, 6 months ago) by jsg
Branch: MAIN
Changes since 1.148: +4 -1 lines
Diff to previous 1.148 (colored)

Don't allow embedded nul characters in strings.
Fixes a pfctl crash with an anchor name containing
an embedded nul found with the afl fuzzer.

pfctl parse.y patch from and ok deraadt@

Revision 1.148 / (download) - annotate - [select for diffs], Sun Nov 16 19:07:50 2014 UTC (9 years, 6 months ago) by bluhm
Branch: MAIN
Changes since 1.147: +6 -6 lines
Diff to previous 1.147 (colored)

Convert the logic in yyerror().  Instead of creating a temporary
format string, create a temporary message.
OK doug@

Revision 1.147 / (download) - annotate - [select for diffs], Fri Nov 14 03:20:37 2014 UTC (9 years, 6 months ago) by doug
Branch: MAIN
Changes since 1.146: +3 -2 lines
Diff to previous 1.146 (colored)

Add gcc printf format attributes to yyerror() in parse.y files.
No yyerror() calls needed to be changed.

ok bluhm@

Revision 1.146 / (download) - annotate - [select for diffs], Wed Jul 9 12:44:54 2014 UTC (9 years, 10 months ago) by eric
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.145: +13 -2 lines
Diff to previous 1.145 (colored)

add a "no-dsn" listener option to disable DSN extension.

Revision 1.145 / (download) - annotate - [select for diffs], Wed Jul 9 09:53:37 2014 UTC (9 years, 10 months ago) by eric
Branch: MAIN
Changes since 1.144: +211 -62 lines
Diff to previous 1.144 (colored)

config parser improvements:

- fail if the same option is specified multiple times on a listener
- prompt for queue encryption key after config parsing, not during.
- add ip addresses to localnames table
- prepare for filters

Revision 1.144 / (download) - annotate - [select for diffs], Tue Jul 8 21:58:33 2014 UTC (9 years, 10 months ago) by eric
Branch: MAIN
Changes since 1.143: +59 -68 lines
Diff to previous 1.143 (colored)

update filter configuration parsing (not plugged yet)

Revision 1.143 / (download) - annotate - [select for diffs], Sat Apr 19 17:23:19 2014 UTC (10 years, 1 month ago) by gilles
Branch: MAIN
Changes since 1.142: +6 -2 lines
Diff to previous 1.142 (colored)

add missing strlcpy() check in create_filter_chain() that would cause smtpd
to fatal at startup if truncation occured and we had enabled filters

(void) cast a strlcpy() that cannot truncate

Revision 1.142 / (download) - annotate - [select for diffs], Sat Apr 19 17:21:19 2014 UTC (10 years, 1 month ago) by gilles
Branch: MAIN
Changes since 1.141: +10 -2 lines
Diff to previous 1.141 (colored)

add missing strlcpy() checks in create_filter() that would cause smtpd to
	fatal at startup if truncation occured and we had enabled filters

Revision 1.141 / (download) - annotate - [select for diffs], Sat Apr 19 17:18:58 2014 UTC (10 years, 1 month ago) by gilles
Branch: MAIN
Changes since 1.140: +3 -1 lines
Diff to previous 1.140 (colored)

add missing strlcpy() check in is_if_in_group() to detect and warn about
the truncation rather than failing the ioctl() call that follows.

Revision 1.140 / (download) - annotate - [select for diffs], Sat Apr 19 17:12:02 2014 UTC (10 years, 1 month ago) by gilles
Branch: MAIN
Changes since 1.139: +8 -2 lines
Diff to previous 1.139 (colored)

add missing strlcpy() check when parsing "backup hostname" in smtpd.conf,
it could lead to smtpd not finding itself in a MX lookup if a hostname is
specified that exceeds the max hostname len.

while at it, add a missing free()

Revision 1.139 / (download) - annotate - [select for diffs], Sat Apr 19 17:08:49 2014 UTC (10 years, 1 month ago) by gilles
Branch: MAIN
Changes since 1.138: +8 -8 lines
Diff to previous 1.138 (colored)

(void) cast strlcpy() calls that cannot truncate

Revision 1.138 / (download) - annotate - [select for diffs], Tue Mar 25 10:28:58 2014 UTC (10 years, 2 months ago) by gilles
Branch: MAIN
Changes since 1.137: +3 -3 lines
Diff to previous 1.137 (colored)

reword error message when a table has an invalid configuration file, it has
confused a few people

ok eric@

Revision 1.137 / (download) - annotate - [select for diffs], Tue Feb 4 13:44:41 2014 UTC (10 years, 3 months ago) by eric
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.136: +24 -26 lines
Diff to previous 1.136 (colored)

pki code cleanup

- rename "struct ssl" and "cert" to "struct pki" and "cert" to "pki_name"
- inherit pki conf on fork instead of passing it through imsg at startup
- implement SNI on smtp listeners

Revision 1.136 / (download) - annotate - [select for diffs], Wed Jan 22 00:21:17 2014 UTC (10 years, 4 months ago) by henning
Branch: MAIN
Changes since 1.135: +2 -2 lines
Diff to previous 1.135 (colored)

relax the cfg file secrecy check slightly to allow group readability
default permissions and mtree NOT changed.
prodded by benno, ok phessler benno jmatthew theo pelikan florian

Revision 1.135 / (download) - annotate - [select for diffs], Thu Dec 26 17:25:32 2013 UTC (10 years, 5 months ago) by eric
Branch: MAIN
Changes since 1.134: +9 -9 lines
Diff to previous 1.134 (colored)

bcopy -> memmove
bzero -> memset

Revision 1.134 / (download) - annotate - [select for diffs], Thu Dec 5 15:04:09 2013 UTC (10 years, 5 months ago) by eric
Branch: MAIN
Changes since 1.133: +0 -1 lines
Diff to previous 1.133 (colored)

bogus ';'

Revision 1.133 / (download) - annotate - [select for diffs], Sat Nov 30 10:11:57 2013 UTC (10 years, 6 months ago) by eric
Branch: MAIN
Changes since 1.132: +12 -0 lines
Diff to previous 1.132 (colored)

do not hardcode scheduler batch size, and reduce default limit to avoid
hammering effects.

Revision 1.132 / (download) - annotate - [select for diffs], Thu Nov 28 13:13:56 2013 UTC (10 years, 6 months ago) by eric
Branch: MAIN
Changes since 1.131: +7 -2 lines
Diff to previous 1.131 (colored)

limit the number of envelopes to recall in the hoststat cache.

Revision 1.131 / (download) - annotate - [select for diffs], Mon Nov 25 19:17:07 2013 UTC (10 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.130: +7 -7 lines
Diff to previous 1.130 (colored)

use u_char for buffers in yylex, for ctype calls, as done in all other
parse.y in the tree
issue found by millert, ok gilles

Revision 1.130 / (download) - annotate - [select for diffs], Thu Nov 21 08:52:57 2013 UTC (10 years, 6 months ago) by eric
Branch: MAIN
Changes since 1.129: +3 -1 lines
Diff to previous 1.129 (colored)

correctly set verify flag on the listener

Revision 1.129 / (download) - annotate - [select for diffs], Wed Nov 20 09:22:42 2013 UTC (10 years, 6 months ago) by eric
Branch: MAIN
Changes since 1.128: +36 -0 lines
Diff to previous 1.128 (colored)

Rework the mda and scheduler to use the holdq mechanism instead of
tempfail for limiting the number of pending deliveries to the same
user.  This allows to reach optimal delivery time even in case of
burst, while keeping the number of inflight envelopes low.

Revision 1.128 / (download) - annotate - [select for diffs], Tue Nov 19 10:01:20 2013 UTC (10 years, 6 months ago) by eric
Branch: MAIN
Changes since 1.127: +27 -6 lines
Diff to previous 1.127 (colored)

Add a limit on the number of inflight envelopes.  The scheduler suspends
scheduling of mta/mda envelopes until the number of inflight envelopes
falls below that line.

Revision 1.127 / (download) - annotate - [select for diffs], Wed Nov 13 08:39:33 2013 UTC (10 years, 6 months ago) by eric
Branch: MAIN
Changes since 1.126: +28 -9 lines
Diff to previous 1.126 (colored)

Fix case-folding issue with pki names. They are case-insensitive.
Make sure a pki entry exists when used in a listen or relay rule.

Revision 1.126 / (download) - annotate - [select for diffs], Wed Nov 6 10:01:29 2013 UTC (10 years, 6 months ago) by eric
Branch: MAIN
Changes since 1.125: +577 -466 lines
Diff to previous 1.125 (colored)

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).

Revision 1.125 / (download) - annotate - [select for diffs], Sun Oct 27 11:01:47 2013 UTC (10 years, 7 months ago) by eric
Branch: MAIN
Changes since 1.124: +91 -51 lines
Diff to previous 1.124 (colored)

Make the filter infrastructure move forward.
This is a work-in-progress and it's not supposed to be useable for now.

Revision 1.124 / (download) - annotate - [select for diffs], Fri Oct 25 21:31:23 2013 UTC (10 years, 7 months ago) by eric
Branch: MAIN
Changes since 1.123: +1 -71 lines
Diff to previous 1.123 (colored)

local enqueuer improvements:

- parse the whole input before trying to establish the connection
  to the local socket: fixes timeout problems when reading the output
  of a long running program.

- use sendmail(8)-like exit status.

Revision 1.123 / (download) - annotate - [select for diffs], Fri Jul 19 21:14:52 2013 UTC (10 years, 10 months ago) by eric
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.122: +50 -4 lines
Diff to previous 1.122 (colored)

Many MTA improvements:

- Better transient error handling logic: failing destinations are
  automatically disabled for a while.  When a destination is active
  again, ask the scheduler to retry previous envelopes immediatly.
- More informative error report when all routes fail for a mail.
- Implement a "smtpctl show hoststats" command to get the latest stat
  message per MX domain.
- Implement a "smtpctl show routes" command to show the state the
  currently known routes to remote MXs.
- Implement a "smtpctl resume route" command to re-enable a route that
  has been disabled.
- Do not hardcode limits
- Minor code improvements

Revision 1.122 / (download) - annotate - [select for diffs], Fri Jul 19 20:37:07 2013 UTC (10 years, 10 months ago) by eric
Branch: MAIN
Changes since 1.121: +7 -2 lines
Diff to previous 1.121 (colored)

Assorted queue improvements:
- cleanup the internal queue backend API and get rid of the QOP_* thing.
- implement a queue_proc backend
- rename queue_fsqueue.c to queue_fs
- enable support for queue encryption
- add an envelope cache
- better logging and error reporting

Revision 1.121 / (download) - annotate - [select for diffs], Fri Jul 19 19:53:33 2013 UTC (10 years, 10 months ago) by eric
Branch: MAIN
Changes since 1.120: +4 -3 lines
Diff to previous 1.120 (colored)

Add a table_proc backend for delegating table lookups to another
process.  Stop building experimental table_sqlite and table_ldap as
they will be provided as external backends.

Revision 1.120 / (download) - annotate - [select for diffs], Fri Jul 19 19:10:22 2013 UTC (10 years, 10 months ago) by eric
Branch: MAIN
Changes since 1.119: +26 -15 lines
Diff to previous 1.119 (colored)

Allow to specify an address family on a listener

Revision 1.119 / (download) - annotate - [select for diffs], Fri Jul 19 13:11:18 2013 UTC (10 years, 10 months ago) by eric
Branch: MAIN
Changes since 1.118: +81 -10 lines
Diff to previous 1.118 (colored)

Improve and document the way the default server name is found.

Revision 1.118 / (download) - annotate - [select for diffs], Mon Jun 3 08:48:40 2013 UTC (11 years ago) by zhuk
Branch: MAIN
Changes since 1.117: +1 -2 lines
Diff to previous 1.117 (colored)

No need to set backend var here, it's always set before to the same value.

okay gilles@, eric@

Revision 1.117 / (download) - annotate - [select for diffs], Fri May 24 17:03:14 2013 UTC (11 years ago) by eric
Branch: MAIN
Changes since 1.116: +76 -75 lines
Diff to previous 1.116 (colored)

sync with OpenSMTPD 5.3.2

ok gilles@

Revision 1.116 / (download) - annotate - [select for diffs], Wed Mar 6 21:42:40 2013 UTC (11 years, 2 months ago) by sthen
Branch: MAIN
Changes since 1.115: +7 -4 lines
Diff to previous 1.115 (colored)

as done in ospf{,6}d/relayd, sync yyerror in various other daemons with
that from bgpd, so that it logs to syslog when daemonized.

Revision 1.115 / (download) - annotate - [select for diffs], Sun Feb 17 12:28:30 2013 UTC (11 years, 3 months ago) by gilles
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.114: +3 -24 lines
Diff to previous 1.114 (colored)

disable queue compression temporarily, we lack the smtpctl bits

Revision 1.114 / (download) - annotate - [select for diffs], Thu Feb 14 12:30:49 2013 UTC (11 years, 3 months ago) by gilles
Branch: MAIN
Changes since 1.113: +12 -10 lines
Diff to previous 1.113 (colored)

- smtpctl trace expand, enables tracing of aliases expansion
- replace "users" keyword with "userbase" when providing alternate userbase
- disambiguise expansion nodes when expanding across domains and userbases
- allow use of '=' instead of '=>' when declaring a mapping

ok eric@

Revision 1.113 / (download) - annotate - [select for diffs], Tue Feb 5 15:30:59 2013 UTC (11 years, 3 months ago) by gilles
Branch: MAIN
Changes since 1.112: +5 -1 lines
Diff to previous 1.112 (colored)

add missing free in config parser

ok eric

Revision 1.112 / (download) - annotate - [select for diffs], Mon Jan 28 15:14:02 2013 UTC (11 years, 4 months ago) by gilles
Branch: MAIN
Changes since 1.111: +3 -2 lines
Diff to previous 1.111 (colored)

allow lookups from backends in "accept for [...] virtual" context

Revision 1.111 / (download) - annotate - [select for diffs], Sat Jan 26 09:37:23 2013 UTC (11 years, 4 months ago) by gilles
Branch: MAIN
Changes since 1.110: +530 -464 lines
Diff to previous 1.110 (colored)

Sync with our smtpd repo:

* first bricks of ldap and sqlite support (not finished but both working)
* new table API to replace map API, all lookups are done through tables
* improved handling of temporary errors throughout the daemon
* improved scheduler and mta logic: connection reuse, optimizes batches
* improved queue: more tolerant to admin errors, new layout, less disk-IO
* improved memory usage under high load
* SSL certs/keys isolated to lookup process to avoid facing network
* VIRTUAL support improved, fully virtual setups possible now
* runtime tracing of processes through smtpctl trace
* ssl_privsep.c sync-ed with relayd
* ssl.c no longer contains smtpd specific interfaces
* smtpd-specific ssl bits moved to ssl_smtpd.c
* update mail address in copyright

FLUSH YOUR QUEUE. FLUSH YOUR QUEUE. FLUSH YOUR QUEUE. FLUSH YOUR QUEUE.

smtpd.conf(5) simplified, it will require adaptations

ok eric@

Revision 1.110 / (download) - annotate - [select for diffs], Mon Nov 12 14:58:53 2012 UTC (11 years, 6 months ago) by eric
Branch: MAIN
Changes since 1.109: +17 -26 lines
Diff to previous 1.109 (colored)

Cleanups and improvements:

* Log more events (especially client session) and use a better scheme
  for that: each messages is prefixed with a token to easily identify
  its class:
    - info/warn/debug: general server messages
    - smtp-in: smtp client connections
    - relay: status update for relayed messages
    - delivery: status update for local deliveries

* Implement "smtpctl monitor" to display updates of selected internal
  counters.

* When reloading the on-disk queue at startup do not commit a message
  if no envelope was submitted for that message.

* Remove unused stuff in the config parser.

ok gilles@

Revision 1.109 / (download) - annotate - [select for diffs], Sun Oct 14 11:58:23 2012 UTC (11 years, 7 months ago) by gilles
Branch: MAIN
Changes since 1.108: +7 -6 lines
Diff to previous 1.108 (colored)

introduce map_file.c which will deprecate map_stdio.c

The idea is to have a file-backed map but to have smtpd(8) cache the maps
so that it cannot be partially read if edited while mail is received. The
file is read and converted to a static map (map_static.c), changes aren't
visible to smtpd until an explicit: smtpctl update map  which reads file,
builds a new static map and invalidates the former.

partial-read issue discussed with beck@ and halex@
idea to convert internally to a static map by eric@

diff ok eric@ and chl@

Revision 1.108 / (download) - annotate - [select for diffs], Thu Oct 11 21:14:32 2012 UTC (11 years, 7 months ago) by gilles
Branch: MAIN
Changes since 1.107: +10 -10 lines
Diff to previous 1.107 (colored)

- replace "from all" and "for all" with "from any" and "for any"

ok eric@, chl@

Revision 1.107 / (download) - annotate - [select for diffs], Tue Oct 9 20:33:02 2012 UTC (11 years, 7 months ago) by gilles
Branch: MAIN
Changes since 1.106: +10 -9 lines
Diff to previous 1.106 (colored)

- allow a listen statement to impose tls on its clients;
- make listen statements impose authentication if 'auth' is specified and
	to make it optional if 'auth-optional' is specified;
- sync documentation accordingly

with ideas and input from beck@ and halex@, ok eric@

Revision 1.106 / (download) - annotate - [select for diffs], Mon Oct 8 20:35:16 2012 UTC (11 years, 7 months ago) by gilles
Branch: MAIN
Changes since 1.105: +2 -2 lines
Diff to previous 1.105 (colored)

disk space is cheap but we still want to limit the default size of a body
to a sane default for everyone.

Revision 1.105 / (download) - annotate - [select for diffs], Thu Oct 4 19:49:53 2012 UTC (11 years, 7 months ago) by gilles
Branch: MAIN
Changes since 1.104: +14 -8 lines
Diff to previous 1.104 (colored)

default map source to S_PLAIN, this allows us to simplify smtpd.conf:
	map aliases source plain "/etc/mail/aliases"
can be reduced to:
	map aliases "/etc/mail/aliases"

Revision 1.104 / (download) - annotate - [select for diffs], Sun Sep 30 17:25:09 2012 UTC (11 years, 8 months ago) by chl
Branch: MAIN
Changes since 1.103: +20 -45 lines
Diff to previous 1.103 (colored)

use xmalloc(), xcalloc() and xmemdup() helpers

ok gilles@

Revision 1.103 / (download) - annotate - [select for diffs], Sun Sep 30 14:28:16 2012 UTC (11 years, 8 months ago) by gilles
Branch: MAIN
Changes since 1.102: +45 -7 lines
Diff to previous 1.102 (colored)

- add decision to the rule so that we can actually perform a reject match
  ie:

	reject from 192.168.1.0/24 for domain "openbsd.org"
	accept from 192.168.0.0/16 for domain "openbsd.org" deliver to mbox

it was documented but not working.

ok eric@ & chl@

Revision 1.102 / (download) - annotate - [select for diffs], Sat Sep 29 10:32:08 2012 UTC (11 years, 8 months ago) by eric
Branch: MAIN
Changes since 1.101: +5 -22 lines
Diff to previous 1.101 (colored)

Remove support for "as user" for local deliveries.
It's not documented and not implemented.

ok gilles@

Revision 1.101 / (download) - annotate - [select for diffs], Wed Sep 26 09:49:43 2012 UTC (11 years, 8 months ago) by halex
Branch: MAIN
Changes since 1.100: +1 -4 lines
Diff to previous 1.100 (colored)

fix double free() issue in error paths

ok eric@ gilles@

Revision 1.100 / (download) - annotate - [select for diffs], Mon Sep 17 20:19:18 2012 UTC (11 years, 8 months ago) by eric
Branch: MAIN
Changes since 1.99: +33 -254 lines
Diff to previous 1.99 (colored)

Add map_create() and map_add() helpers.  Simplify the config parser by a
great deal.

While there, rename the default "localhost" map to "<localhost>" to make
it look more internal, and create a single "<anyhost>" map referenced by
"from all" rules, instead of creating a dynamic one for each of them.

ok gilles@ chl@

Revision 1.99 / (download) - annotate - [select for diffs], Sat Sep 15 15:12:11 2012 UTC (11 years, 8 months ago) by eric
Branch: MAIN
Changes since 1.98: +11 -1 lines
Diff to previous 1.98 (colored)

When enqueueing from the local socket, the input address is faked as "::1".
This is confusing and even broken, as systems running with ipv6 disabled on
lo0 will not be able to enqueue mails using the local socket.

So instead, use AF_LOCAL and print it as "local" in envelopes/maps.  Add it
to the "localhost" and "all" maps accordingly, and fix the ruleset matching.

ok gilles@ chl@

Revision 1.98 / (download) - annotate - [select for diffs], Sat Sep 8 13:58:29 2012 UTC (11 years, 8 months ago) by chl
Branch: MAIN
Changes since 1.97: +1 -3 lines
Diff to previous 1.97 (colored)

remove unused header

ok gilles@

Revision 1.97 / (download) - annotate - [select for diffs], Sat Sep 1 16:09:14 2012 UTC (11 years, 9 months ago) by gilles
Branch: MAIN
Changes since 1.96: +1 -56 lines
Diff to previous 1.96 (colored)

- remove crypto_backend
- remove support for encrypted queue, it will be reintroduced later after
  pouring more thinking into it

if you had it enabled, flush your queue before updating

Revision 1.96 / (download) - annotate - [select for diffs], Thu Aug 30 18:25:44 2012 UTC (11 years, 9 months ago) by gilles
Branch: MAIN
Changes since 1.95: +11 -2 lines
Diff to previous 1.95 (colored)

- import latest aldap.[ch] and ber.[ch] from ypldap
- revive map_ldap.c by updating it to the current API

diff by Mathieu Masson who played puzzle with an oooold changeset of mine,
this import is to let us work on it in tree, it won't work as is.

idea ok eric@ and chl@

Revision 1.95 / (download) - annotate - [select for diffs], Wed Aug 29 18:36:24 2012 UTC (11 years, 9 months ago) by naddy
Branch: MAIN
Changes since 1.94: +2 -2 lines
Diff to previous 1.94 (colored)

switch the default queue encryption to AES-128
I'm committing this on behalf of gilles@

Revision 1.94 / (download) - annotate - [select for diffs], Wed Aug 29 16:26:17 2012 UTC (11 years, 9 months ago) by gilles
Branch: MAIN
Changes since 1.93: +71 -10 lines
Diff to previous 1.93 (colored)

Introduce the crypto_backend API and provide support for... encrypted queue
using the new API. By default, OpenSMTPD does not provide queue encryption,
but it can be enabled with "queue encryption [args]" and will transparently
encrypt/decrypt envelopes/messages as they hit the queue.

By default, it will use Blowfish in CBC mode with a different random IV for
each envelope and message. User provided key is expanded using sha256 but a
different cipher and digest may be specified in smtpd.conf

Queue encryption is compatible with compression and if both options are set
it will do them in correct order and transparently.

tested by chl@, a few users and myself
ok chl@ and I

Revision 1.93 / (download) - annotate - [select for diffs], Sun Aug 26 13:38:43 2012 UTC (11 years, 9 months ago) by gilles
Branch: MAIN
Changes since 1.92: +2 -2 lines
Diff to previous 1.92 (colored)

- use the same compression algorithm, gzip, for message file and envelopes
- rename compress_zlib.c to compress_gzip.c

with this commit it is possible to inspect a compressed queue with gzcat :)

Revision 1.92 / (download) - annotate - [select for diffs], Sat Aug 25 23:35:09 2012 UTC (11 years, 9 months ago) by chl
Branch: MAIN
Changes since 1.91: +24 -3 lines
Diff to previous 1.91 (colored)

Add compress_backend, allowing compression of messages and envelopes in the queue.
To use it, just add "queue compress" in smtpd.conf. For now, only zlib is used.

lots of feedback from eric@ and gilles@

ok eric@ gilles@

Revision 1.91 / (download) - annotate - [select for diffs], Tue Aug 21 20:19:46 2012 UTC (11 years, 9 months ago) by eric
Branch: MAIN
Changes since 1.90: +11 -2 lines
Diff to previous 1.90 (colored)

Allow smtpd to work as a backup MX, relaying only to MXs with higher
priority in the DNS record. For example:

   accept for domain "foo.org" relay backup "mx3.foo.org"

will relay mails for "foo.org" using only hosts with higher priority
(i.e. lower value) than "mx3.foo.org", which is supposed to be the
current server.

If the specified backup MX is not found in the DNS record, relaying
works as normal.

ok gilles@

Revision 1.90 / (download) - annotate - [select for diffs], Sun Aug 19 14:16:58 2012 UTC (11 years, 9 months ago) by chl
Branch: MAIN
Changes since 1.89: +8 -8 lines
Diff to previous 1.89 (colored)

coding style: replace all occurences of u_int* with uint*

ok eric@

Revision 1.89 / (download) - annotate - [select for diffs], Sun Jul 8 15:48:00 2012 UTC (11 years, 10 months ago) by gilles
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.88: +30 -26 lines
Diff to previous 1.88 (colored)

- plug text_to_relayhost() in parse.y to support relay URLs.
- document the new URL syntax in smtpd.conf.5
- replace starttls:// schema with tls://

Beware, "relay via" rules should now be expressed with a relay URL:

	accept [...] relay via "mx1.example.org" smtps port 465
becomes accept [...] relay via "smtps://mx1.example.org"

This will allow using mappings of relays with different protocols and
options.

Make sure to update your smtpd.conf if you relay via !

ok eric, ok chl

Revision 1.88 / (download) - annotate - [select for diffs], Sun May 13 00:10:49 2012 UTC (12 years ago) by gilles
Branch: MAIN
Changes since 1.87: +25 -130 lines
Diff to previous 1.87 (colored)

- cleanup parse.y by removing lots of code that should not have been there,
  but in ruleset.c and util.c instead.

- introduce the new map_compare() map API call to allow iterating over keys
  and comparing them with provided key using provided function. this allows
  checking a partial key in a key set, very useful for comparing an address
  to a set of netmask.

- introduce new map kind K_NETADDR
- implement K_NETADDR for map_db and map_stdio
- teach ruleset checking how to use the map_compare() with K_NETADDR

we can now do the following:

   map "srcaddr" source plain "/etc/mail/srcaddr.txt"

   accept from map srcaddr for domain "openbsd.org" [...]

Revision 1.87 / (download) - annotate - [select for diffs], Sat May 12 21:49:31 2012 UTC (12 years ago) by gilles
Branch: MAIN
Changes since 1.86: +9 -22 lines
Diff to previous 1.86 (colored)

- remove unused sources S_EXT, S_DYN and S_EXT from enum map_src
- continue simplification of parse.y
- remove "for network", if we ever need it we can reimport, probably no
  one knows of that undocumented strange feature ;-)
- change syntax for virtual domains configuration:

	  accept for virtual vmap	[...] <- wrong
	  accept for virtual map vmap	[...] <- right

  the reason for this change is that we will soon implement relay rules
  through maps and that keeping that syntax would make it inconsistent
  with the other rules.

- update man pages for makemap and smtpd.conf to reflect changes

ok eric@, looks ok chl@

Revision 1.86 / (download) - annotate - [select for diffs], Sat May 12 18:41:10 2012 UTC (12 years ago) by gilles
Branch: MAIN
Changes since 1.85: +14 -37 lines
Diff to previous 1.85 (colored)

- simplify a bit maps by removing fields which are still unused years
  after the initial ambitious implementation: byebye map type & map flags

- simplify a bit parse.y by removing assignations to these otherwise unused
  fields

- remove the DNS map source, it may be a good idea, but we can just add it
  when we plan to implement it (if we do)

- make the { } options in map declaration, it's been annoying me for a long
  time now, this allows the following to work:

       map "foobar" source plain "/etc/mail/foobar"

- update smtpd.conf.5 accordingly ;-)

Revision 1.85 / (download) - annotate - [select for diffs], Mon Apr 16 13:32:16 2012 UTC (12 years, 1 month ago) by chl
Branch: MAIN
Changes since 1.84: +2 -1 lines
Diff to previous 1.84 (colored)

add missing header needed by str* and mem* functions

ok gilles@

Revision 1.84 / (download) - annotate - [select for diffs], Tue Dec 13 21:44:47 2011 UTC (12 years, 5 months ago) by gilles
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.83: +2 -2 lines
Diff to previous 1.83 (colored)

- introduce delivery backend API (delivery.c)
- move each delivery method to it's own delivery backend
- simplify smtpd.c accordingly
- rename A_EXT -> A_MDA since that's what we really do

ok eric@

Revision 1.83 / (download) - annotate - [select for diffs], Thu Dec 8 17:04:19 2011 UTC (12 years, 5 months ago) by todd
Branch: MAIN
Changes since 1.82: +5 -1 lines
Diff to previous 1.82 (colored)

check for NULL ->ifa_addr, found the hard way by yours truly on his phone
ok chl@ & gilles@

Revision 1.82 / (download) - annotate - [select for diffs], Thu Oct 27 14:32:57 2011 UTC (12 years, 7 months ago) by chl
Branch: MAIN
Changes since 1.81: +5 -4 lines
Diff to previous 1.81 (colored)

Use PRI{x,d}64 in format strings instead of %llx, %lld or %qd to print {u_,}int64_t or time_t

While there, cast some time_t to int64_t

These will fix build warnings for portable smptd

ok gilles@ eric@

Revision 1.81 / (download) - annotate - [select for diffs], Sun Oct 23 15:36:53 2011 UTC (12 years, 7 months ago) by eric
Branch: MAIN
Changes since 1.80: +7 -6 lines
Diff to previous 1.80 (colored)

a few important fixes:

- use correct endianness when dumping/loading port
- use the right flag set when dumping/loading flags
- keep and use the authmap name when needed, rather than an id that
  might change when smtpd is restarted
- dump/load the authmap name with the envelope
- remove the rule struct from rq_batch as only the relay info is useful

ok gilles@

Revision 1.80 / (download) - annotate - [select for diffs], Thu Sep 1 16:23:33 2011 UTC (12 years, 9 months ago) by chl
Branch: MAIN
Changes since 1.79: +2 -1 lines
Diff to previous 1.79 (colored)

add missing header needed by bsearch()

ok gilles@

Revision 1.79 / (download) - annotate - [select for diffs], Thu Sep 1 09:42:15 2011 UTC (12 years, 9 months ago) by chl
Branch: MAIN
Changes since 1.78: +3 -2 lines
Diff to previous 1.78 (colored)

- if no filter is setup, do not overwrite the data line with filtmsg buffer
- remove annoying debug lines
- disable back filters at smtpd.conf level

committing on behalf of gilles@

Revision 1.78 / (download) - annotate - [select for diffs], Wed Aug 31 18:56:30 2011 UTC (12 years, 9 months ago) by gilles
Branch: MAIN
Changes since 1.77: +2 -3 lines
Diff to previous 1.77 (colored)

add support for per-line DATA callbacks, this allows filters to take their
decisions *while* the message is being received by the client.

Revision 1.77 / (download) - annotate - [select for diffs], Sat Aug 27 22:32:41 2011 UTC (12 years, 9 months ago) by gilles
Branch: MAIN
Changes since 1.76: +51 -25 lines
Diff to previous 1.76 (colored)

initial support for a session-time filtering API

currently only HELO/EHLO, MAIL, RCPT are supported, however ... I have
voluntarily disabled filters at smtpd.conf level so people don't play with
it until the API has stabilized a bit

discussed with several people in private, no one opposed the feature

Revision 1.76 / (download) - annotate - [select for diffs], Thu Jun 9 17:41:52 2011 UTC (12 years, 11 months ago) by gilles
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.75: +81 -7 lines
Diff to previous 1.75 (colored)

'relay as' and 'relay via as' rules allow smtpd to rewrite the user part,
the domain part or the entire address of the sender at the SMTP sesssion
level. this is not masquerade but allows smtpd to communicate with hosts
that do a check of SMTP sender fqdn.

sent to tech@, a couple 'no regression' feedbacks

Revision 1.75 / (download) - annotate - [select for diffs], Sun May 22 21:03:14 2011 UTC (13 years ago) by gilles
Branch: MAIN
Changes since 1.74: +50 -2 lines
Diff to previous 1.74 (colored)

teach smtpd how to listen on an interface group so that we can do:
	listen on egress
	listen on wlan

idea unvoluntarily suggested by Mikolaj Kucharski a few weeks ago,
unslacked after theo suggested it again.

Revision 1.74 / (download) - annotate - [select for diffs], Sat May 21 16:58:04 2011 UTC (13 years ago) by gilles
Branch: MAIN
Changes since 1.73: +22 -2 lines
Diff to previous 1.73 (colored)

"for all" does not necessary apply to relay rules, so do not forget to look
for an alias map.

fixes "accept from all for all alias myaliases deliver to mbox" and makes
thib "super happy"

ok thib@

Revision 1.73 / (download) - annotate - [select for diffs], Sun May 1 12:57:11 2011 UTC (13 years, 1 month ago) by eric
Branch: MAIN
Changes since 1.72: +14 -14 lines
Diff to previous 1.72 (colored)

the smtpd env is meant to be global, so do not pass it all around.

discussed with and ok gilles@

Revision 1.72 / (download) - annotate - [select for diffs], Sun Nov 28 14:35:58 2010 UTC (13 years, 6 months ago) by gilles
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.71: +2 -7 lines
Diff to previous 1.71 (colored)

remove all unused headers

Revision 1.71 / (download) - annotate - [select for diffs], Sun Nov 28 13:56:43 2010 UTC (13 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.70: +3 -1 lines
Diff to previous 1.70 (colored)

a bit of .h cleanups, no functionnal change

Revision 1.70 / (download) - annotate - [select for diffs], Fri Oct 29 09:16:08 2010 UTC (13 years, 7 months ago) by gilles
Branch: MAIN
Changes since 1.69: +20 -4 lines
Diff to previous 1.69 (colored)

smtpd no longer knows a map called "secrets" which holds credentials for
authenticated relaying. one can create many maps holding credentials and
name them however he/she wants, just like any other map.

teach smtpd how to select a credentials map at the rule-level allowing a
setup to relay through the same MX with different credentials depending
on the source.

smtpd.conf.5 updated to reflect changes with help from jmc@

Revision 1.69 / (download) - annotate - [select for diffs], Thu Oct 28 21:15:50 2010 UTC (13 years, 7 months ago) by gilles
Branch: MAIN
Changes since 1.68: +16 -3 lines
Diff to previous 1.68 (colored)

teach smtpd how to handle per-rule delays for message expiry, this allows
some rules to have a longer expiry delay than the default:

	accept for [...] relay expire 8d  # will stay 8 days in queue

I added the man page bits so I don't forget but I need to reword it a bit

Revision 1.68 / (download) - annotate - [select for diffs], Mon Oct 18 13:28:00 2010 UTC (13 years, 7 months ago) by sthen
Branch: MAIN
Changes since 1.67: +4 -1 lines
Diff to previous 1.67 (colored)

Missing semicolons to appease yyextract, ok gilles@

Revision 1.67 / (download) - annotate - [select for diffs], Sat Oct 9 22:05:35 2010 UTC (13 years, 7 months ago) by gilles
Branch: MAIN
Changes since 1.66: +48 -24 lines
Diff to previous 1.66 (colored)

backout the "new" queue code commited 4 months ago. it has many good ideas,
is way more optimized than what we had earlier and there's definitely stuff
we want to keep, however it is early optimization that doesn't account for
many features and makes them hard (if not impossible) to write without
ugly workarounds that ruin the purpose of the optimizations.

the backout goes to 30 May's right before the commit and catches up on all
the non-queue related commits that happened since then.

i'll work on reintroducing the ideas from this queue when the basic
features we expect from a MTA are implemented.

suggested on tech@ about a week ago, no objections, several "please make
smtpd move forward" mails from hackers and tech readers.

Revision 1.66 / (download) - annotate - [select for diffs], Mon Sep 20 09:01:09 2010 UTC (13 years, 8 months ago) by gilles
Branch: MAIN
Changes since 1.65: +13 -13 lines
Diff to previous 1.65 (colored)

- fix a regression caused by latest commit (long story made short: do not
  attempt to expand the local delivery buffer when relaying mail, it was
  kind of ok before but no longer is)
- use the same buffer for local deliveries to files and commands

tested by jmc@ and I

Revision 1.65 / (download) - annotate - [select for diffs], Wed Sep 8 23:32:27 2010 UTC (13 years, 8 months ago) by gilles
Branch: MAIN
Changes since 1.64: +5 -1 lines
Diff to previous 1.64 (colored)

when I fixed the ruleset matching on rules that had more than one condition
by expanding them to several rules, I forgot to copy the tags to the
expanded rules. this commit unbreaks matching rules by tag.

documentation follows shortly ...

spotted and fixed by me a while ago, jacekm@ timeout

Revision 1.64 / (download) - annotate - [select for diffs], Tue Aug 3 18:42:41 2010 UTC (13 years, 10 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.63: +4 -3 lines
Diff to previous 1.63 (colored)

fix linecount bug with comments spanning multiple lines
problem reported with the obvious fix for bgpd by Sebastian Benoit
<benoit-lists at fb12.de>, also PR 6432
applied to all the others by yours truly. ok theo
isn't it amazing how far this parser (and more) spread?

Revision 1.63 / (download) - annotate - [select for diffs], Thu Jun 10 19:34:51 2010 UTC (13 years, 11 months ago) by chl
Branch: MAIN
Changes since 1.62: +60 -20 lines
Diff to previous 1.62 (colored)

allow configure queue expiry

with help from jacekm@

ok gilles@ jacekm@

Revision 1.62 / (download) - annotate - [select for diffs], Tue Jun 1 23:06:23 2010 UTC (14 years ago) by jacekm
Branch: MAIN
Changes since 1.61: +3 -10 lines
Diff to previous 1.61 (colored)

new queue, again; gcc2 compile tested by deraadt

Revision 1.61 / (download) - annotate - [select for diffs], Tue Jun 1 19:47:09 2010 UTC (14 years ago) by jacekm
Branch: MAIN
Changes since 1.60: +9 -2 lines
Diff to previous 1.60 (colored)

New queue doesn't compile on gcc2, back out.  Spotted by deraadt@

Revision 1.60 / (download) - annotate - [select for diffs], Mon May 31 23:38:56 2010 UTC (14 years ago) by jacekm
Branch: MAIN
Changes since 1.59: +3 -10 lines
Diff to previous 1.59 (colored)

Rewrite entire queue code.

Major goals:

1) Fix bad performance caused by the runner process doing full queue
read in 1s intervals.  My Soekris can now happily accept >50 msg/s
while having multi-thousand queue; before, one hundred queue would
bring the system to its knees.

2) Introduce Qmail-like scheduler that doesn't write as much to the
disk so that it needs less code for servicing error conditions,
which in some places can be tricky to get right.

3) Introduce separation between the scheduler and the backend; these
two queue aspects shouldn't be too tied too each other.  This means
that eg. storing queue in SQL requires rewrite of just queue_backend.c.

4) Make on-disk queue format architecture independent, and more
easily extensible, to reduce number of flag days in the future.

Minor goals:

ENOSPC no longer prevents delivery attempts, fixed session limiting
for relayed mail, improved batching of "relay via" mails, human-readable
mailq output, "show queue raw" command, clearer logging, sending
of single bounce about multiple recipients, exact delay= computation,
zero delay between deliveries while within session limit (currently
1s delay between re-scheduling is enforced), mta no longer requests
content fd, corrected session limit for bounce submissions, tiny
<100B queue files instead of multi-KB, detect loops before accepting
mail, reduce traffic on imsg channels by killing enormous struct
submit_status.

Revision 1.59 / (download) - annotate - [select for diffs], Thu May 27 15:36:04 2010 UTC (14 years ago) by gilles
Branch: MAIN
Changes since 1.58: +34 -9 lines
Diff to previous 1.58 (colored)

when a rule has two conditions (ie: accept for { domain foo, domain bar } )
expand to two rules each having its own condition rather than one rule
with a tail queue of conditions. this simplifies code a bit and removes a
couple hacks.

basic testing by oga and me

Revision 1.58 / (download) - annotate - [select for diffs], Thu May 27 11:17:29 2010 UTC (14 years ago) by gilles
Branch: MAIN
Changes since 1.57: +1 -2 lines
Diff to previous 1.57 (colored)

kill struct opt from struct rule, we don't use it, we don't need it

Revision 1.57 / (download) - annotate - [select for diffs], Wed May 19 20:57:10 2010 UTC (14 years ago) by gilles
Branch: MAIN
Changes since 1.56: +2 -2 lines
Diff to previous 1.56 (colored)

cleanup-only commit, removes unrequired includes, no functionnal change

Revision 1.56 / (download) - annotate - [select for diffs], Tue Apr 27 10:17:53 2010 UTC (14 years, 1 month ago) by gilles
Branch: MAIN
Changes since 1.55: +9 -4 lines
Diff to previous 1.55 (colored)

this commit enables "plain" as a backend for maps (that means aliases,
virtual AND secrets), adds a description in smtpd.conf.5 and removes a
mention to special map "aliases" which was removed a while ago.

to use plain maps:  map "myaliases" { source plain "/etc/mail/aliases" }

code diff was okayd a while ago by jacekm@

Revision 1.55 / (download) - annotate - [select for diffs], Tue Apr 20 18:55:01 2010 UTC (14 years, 1 month ago) by jacekm
Branch: MAIN
Changes since 1.54: +7 -1 lines
Diff to previous 1.54 (colored)

Support "accept from local ..." as documented in the man page.

Reported by Rene Maroufi <info@maroufi.net>

Revision 1.54 / (download) - annotate - [select for diffs], Tue Apr 20 11:03:05 2010 UTC (14 years, 1 month ago) by gilles
Branch: MAIN
Changes since 1.53: +9 -15 lines
Diff to previous 1.53 (colored)

when a size is declared with a quantifier in smtpd.conf, have parse.y use
scan_scaled(3) to support the quantifiers rather than rolling my own code.

prompted by jacekm@

Revision 1.53 / (download) - annotate - [select for diffs], Mon Apr 19 14:37:33 2010 UTC (14 years, 1 month ago) by gilles
Branch: MAIN
Changes since 1.52: +4 -1 lines
Diff to previous 1.52 (colored)

two lines were missing from previous commit

Revision 1.52 / (download) - annotate - [select for diffs], Mon Apr 19 10:12:48 2010 UTC (14 years, 1 month ago) by gilles
Branch: MAIN
Changes since 1.51: +34 -3 lines
Diff to previous 1.51 (colored)

basic support for SIZE extension, has been sitting in my tree for a month
or so ...

okayd by jacekm@ a while ago

Revision 1.51 / (download) - annotate - [select for diffs], Fri Feb 26 15:06:39 2010 UTC (14 years, 3 months ago) by gilles
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.50: +9 -9 lines
Diff to previous 1.50 (colored)

- fix netmask matching for AF_INET, it was broken in many ways, problem
  was reported by nicm@ which spent a couple hours with me trying to
  understand what was causing the bug, and helping me write and test fix.

Revision 1.50 / (download) - annotate - [select for diffs], Thu Dec 10 14:57:51 2009 UTC (14 years, 5 months ago) by jacekm
Branch: MAIN
Changes since 1.49: +9 -9 lines
Diff to previous 1.49 (colored)

Fix few read overruns found by parfait.
Nudge by deraadt@

Revision 1.49 / (download) - annotate - [select for diffs], Sun Dec 6 00:27:31 2009 UTC (14 years, 5 months ago) by jacekm
Branch: MAIN
Changes since 1.48: +5 -3 lines
Diff to previous 1.48 (colored)

fix previous

Revision 1.48 / (download) - annotate - [select for diffs], Sat Dec 5 18:42:31 2009 UTC (14 years, 5 months ago) by chl
Branch: MAIN
Changes since 1.47: +17 -31 lines
Diff to previous 1.47 (colored)

fix interface tagging listeners in the ipv6 case

while there factor some common code (from jacekm input)

ok jacekm@

Revision 1.47 / (download) - annotate - [select for diffs], Thu Nov 12 12:35:03 2009 UTC (14 years, 6 months ago) by jacekm
Branch: MAIN
Changes since 1.46: +7 -6 lines
Diff to previous 1.46 (colored)

Fix a memleak in parse_config(). Correct return code in few error paths.
Fix two memleaks in purge_config().

First problem spotted by parfait, the other ones - by myself.

"looks good" gilles@

Revision 1.46 / (download) - annotate - [select for diffs], Thu Nov 5 12:24:13 2009 UTC (14 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.45: +3 -3 lines
Diff to previous 1.45 (colored)

some structures reference the maps they use by their id, if we allow 0 as a
valid map id, then we have no way to know for these structures if they have
a reference to a map, or if the member was not set. make map id start at 1.

Revision 1.45 / (download) - annotate - [select for diffs], Tue Nov 3 22:57:41 2009 UTC (14 years, 7 months ago) by gilles
Branch: MAIN
Changes since 1.44: +2 -1 lines
Diff to previous 1.44 (colored)

teach makemap how to build a set, which is a map containing only keys.
smtpd is now capable of looking primary domains at runtime in a set, which
means that the following becomes possible:

	map "primary" { source db "/etc/mail/primary.db" }
	accept for domain map "primary" deliver to mbox

while at it fix a couple bugs in the aliases resolution path which caused
recipients to bounce if a ruleset did not have an "accept for local" rule

"diff reads good" jacekm@, flush queue & make clean

Revision 1.44 / (download) - annotate - [select for diffs], Tue Nov 3 20:55:23 2009 UTC (14 years, 7 months ago) by gilles
Branch: MAIN
Changes since 1.43: +29 -15 lines
Diff to previous 1.43 (colored)

this commit removes the hardcoded special "aliases" map and brings support
for multiple aliases maps that can be attached at the rule level. with it,
you can for example define different aliases maps for different domains or
different aliases maps for the same domain depending on the client source:

map "localiases" { source db "/etc/mail/localiases.db" }
map "netaliases" { source db "/etc/mail/netaliases.db" }

accept from 192.168.0.0/16 for local alias "localiases" deliver to mbox
accept from all for local alias "netaliases" deliver to mbox

idea discussed with jacekm@ and various other hackers, diff contains some
bug fixes too which were not part of the original diff. man page follows
very shortly ... make clean & flush queue !

Revision 1.43 / (download) - annotate - [select for diffs], Mon Oct 19 21:09:55 2009 UTC (14 years, 7 months ago) by gilles
Branch: MAIN
Changes since 1.42: +6 -6 lines
Diff to previous 1.42 (colored)

change virtual rule so that it reads: accept for virtual "mapname", instead
of: accept for virtual map "mapname" ...

discussed with jacekm@

Revision 1.42 / (download) - annotate - [select for diffs], Mon Oct 19 20:48:13 2009 UTC (14 years, 7 months ago) by gilles
Branch: MAIN
Changes since 1.41: +69 -23 lines
Diff to previous 1.41 (colored)

currently, smtpd is capable of having multiple listeners with different
options but they will all share the same ruleset. this means that there
is no way to have a rule apply to a session established on one listener
but not applied on another.

this commit brings initial support for tagging listeners and having the
rules able to match these specific listeners. The following will define
a rule which will only apply to interfaces tagged as "mynet":

listen on lo0			# implicit lo0 tag
listen on fxp0 tag mynet
listen on fxp1 tag mynet

accept on mynet for domain "example.org" deliver to mbox

Revision 1.41 / (download) - annotate - [select for diffs], Mon Oct 19 20:00:46 2009 UTC (14 years, 7 months ago) by gilles
Branch: MAIN
Changes since 1.40: +25 -7 lines
Diff to previous 1.40 (colored)

users within virtual domains do not necessarily map to a real user account,
teach smtpd how to deliver using specific user permissions:

	accept for virtual map "foo" deliver to maildir "/m/%d/%u" user foo

will deliver mail under /m/domain/user as user foo

idea and initial diff discussed with jacekm@

Revision 1.40 / (download) - annotate - [select for diffs], Sun Oct 11 17:40:49 2009 UTC (14 years, 7 months ago) by gilles
Branch: MAIN
Changes since 1.39: +22 -2 lines
Diff to previous 1.39 (colored)

implement proper virtual domains instead of faking them on top of primary
domains. this means that:

- virtual domains no longer deliver to a local user when not told to
- they no longer attempt to resolve aliases when not told to
- they no longer need an explicit rule in smtpd.conf for EACH domain
- the "virtual" map is no longer hardcoded
- smtpd no longer needs a restart to support a new domain

instead we introduce the: accept for virtual map "mapname" [...] syntax
which refers to a map that can be manipulated at runtime.

idea discussed and okayd with jacekm@

Revision 1.39 / (download) - annotate - [select for diffs], Wed Sep 16 20:22:18 2009 UTC (14 years, 8 months ago) by jacekm
Branch: MAIN
Changes since 1.38: +6 -11 lines
Diff to previous 1.38 (colored)

Do not print "could not load cert" warning at startup if certificate is not
required.  Requested by jmc@, gilles@ ok.

Revision 1.38 / (download) - annotate - [select for diffs], Fri Jun 5 23:04:51 2009 UTC (14 years, 11 months ago) by jacekm
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.37: +9 -2 lines
Diff to previous 1.37 (colored)

if path in "deliver to maildir path" is omitted, use ~/Maildir by
default; from gilles@

Revision 1.37 / (download) - annotate - [select for diffs], Tue Jun 2 22:23:35 2009 UTC (15 years ago) by gilles
Branch: MAIN
Changes since 1.36: +20 -5 lines
Diff to previous 1.36 (colored)

make env->sc_listeners and env->sc_ssl pointers, one step further toward
configuration reloading without killing active sessions; ok jacekm@

Revision 1.36 / (download) - annotate - [select for diffs], Sat May 30 23:53:41 2009 UTC (15 years ago) by gilles
Branch: MAIN
Changes since 1.35: +22 -6 lines
Diff to previous 1.35 (colored)

It is now possible to specify a certificate to use when relaying to another
host which requests client certificates:

	accept [...] relay via [...] ssl certificate "mycert"

diff from Josh Elsasser <josh@elsasser.org>, tested and okayed by me with
no change but the addition of status 554 to the state machine to deal with
remote host telling us it doesn't like our certificate.

Revision 1.35 / (download) - annotate - [select for diffs], Wed May 27 16:51:26 2009 UTC (15 years ago) by jacekm
Branch: MAIN
Changes since 1.34: +11 -1 lines
Diff to previous 1.34 (colored)

temporary fix to a ruleset processing bug that stems from the fact
that the ip address/subnet parsing isn't done in the same way as
in other daemons.

fix by gilles@

Revision 1.34 / (download) - annotate - [select for diffs], Thu May 21 01:27:48 2009 UTC (15 years ago) by gilles
Branch: MAIN
Changes since 1.33: +70 -45 lines
Diff to previous 1.33 (colored)

no longer create a dynamic map with 127.0.0.1 and ::1 for every single rule
that has an implicit local source. instead we create static "localhost" map
before the configuration file is parsed, we fill it with every single local
address we can find, and we have rules with implicit local source reference
that special map.

this unbreaks a behavior which I hated and which prevented:

	accept for all relay

from accepting relaying if LOCAL session was initiated on any interface but
lo0.

Revision 1.33 / (download) - annotate - [select for diffs], Wed May 20 14:29:44 2009 UTC (15 years ago) by gilles
Branch: MAIN
Changes since 1.32: +3 -1 lines
Diff to previous 1.32 (colored)

first step towards configuration reload in smtpd, smtpctl reload will parse
the configuration file again and replace current configuration with new one
in all processes. what we don't support yet is graceful restart, clients in
sessions at the moment of the reload will have a temp failure thrown at 'em
which is ok RFC-wise but which we will try to improve anyway.

tested with various setups, "diff reads good" jacekm@

Revision 1.32 / (download) - annotate - [select for diffs], Sun Apr 12 16:03:01 2009 UTC (15 years, 1 month ago) by gilles
Branch: MAIN
Changes since 1.31: +24 -15 lines
Diff to previous 1.31 (colored)

Code assumed the certificate name to always match the interface name, even
when a certificate name was explicitely provided. This would cause imsg to
fatal() because with some configurations, it would look for the wrong name
in the ssl tree and would fail to find the proper cert.

issue spotted by Gregory Edigarov <gregory.edigarov@gmail.com>, I found the
fix just a few minutes ago when I succeeded to reproduce the issue...

Revision 1.31 / (download) - annotate - [select for diffs], Thu Apr 9 19:49:34 2009 UTC (15 years, 1 month ago) by jacekm
Branch: MAIN
Changes since 1.30: +51 -50 lines
Diff to previous 1.30 (colored)

change syntax of the "listen on" and "relay via" directives:
1) kill the ssmtp keyword in "ssmtp listen on ...";
2) kill the use keyword in "... use certificate foo";
3) tls no longer implicit, user must explicitely use the tls or smtps option.
4) for "relay via", move the tls/smtps options to right after the
port specification; makes it similar to "listen on".

These directives:

  ssmtp listen on fxp0 use ceritifate "foo"
  accept for all relay via tls "mx.bar.com"

now become:

  listen on fxp0 smtps certificate "foo"
  accept for all relay via "mx.bar.com" tls

ok gilles@

Revision 1.30 / (download) - annotate - [select for diffs], Tue Mar 31 21:03:49 2009 UTC (15 years, 2 months ago) by tobias
Branch: MAIN
Changes since 1.29: +13 -5 lines
Diff to previous 1.29 (colored)

Fixed memory leaks which would occur if the second of two memory
allocations fails.

looks right deraadt, krw
ok henning

Revision 1.29 / (download) - annotate - [select for diffs], Thu Mar 19 00:40:34 2009 UTC (15 years, 2 months ago) by gilles
Branch: MAIN
Changes since 1.28: +3 -3 lines
Diff to previous 1.28 (colored)

when listen was declared without a port parameter, it would get it wrong
because of a missing htons()

Revision 1.28 / (download) - annotate - [select for diffs], Mon Mar 16 23:26:40 2009 UTC (15 years, 2 months ago) by gilles
Branch: MAIN
Changes since 1.27: +52 -2 lines
Diff to previous 1.27 (colored)

in accept rules, support "for local" as a destination which is an alias to
"localhost" and system hostname. this allows us to ship with a config file
that goes:  accept for local deliver to mbox  , and which will allow us to
have mail working sanely out of the box.

Revision 1.27 / (download) - annotate - [select for diffs], Mon Mar 9 01:43:19 2009 UTC (15 years, 2 months ago) by gilles
Branch: MAIN
Changes since 1.26: +8 -2 lines
Diff to previous 1.26 (colored)

add basic support for outgoing authentication (AUTH PLAIN over ssl) which
can be turned on by adding "enable auth" to a "relay via" rule. this made
me rework the mx resolution so that it is done by the mta process and not
the runner process anymore.

Revision 1.26 / (download) - annotate - [select for diffs], Sun Mar 8 21:50:33 2009 UTC (15 years, 2 months ago) by gilles
Branch: MAIN
Changes since 1.25: +4 -4 lines
Diff to previous 1.25 (colored)

supporting delivery to a mbox that's not in _PATH_MAILDIR is not supported,
if someone comes with good rationale why this is needed, we'll consider it,
meanwhile it's more work than it looks like and it brings a lot of pain.

discussed with jacekm@ and deraadt@

Revision 1.25 / (download) - annotate - [select for diffs], Sun Feb 22 11:44:29 2009 UTC (15 years, 3 months ago) by form
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.24: +11 -6 lines
Diff to previous 1.24 (colored)

replace MAX* constants by sizeof where possible

ok jacekm@

Revision 1.24 / (download) - annotate - [select for diffs], Fri Jan 30 10:09:58 2009 UTC (15 years, 4 months ago) by form
Branch: MAIN
Changes since 1.23: +15 -11 lines
Diff to previous 1.23 (colored)

more const -> sizeof()
no binary changes

ok gilles@

Revision 1.23 / (download) - annotate - [select for diffs], Wed Jan 28 21:44:15 2009 UTC (15 years, 4 months ago) by gilles
Branch: MAIN
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored)

first steps towards better mta code. currently mta uses struct batch to
store a lot of its session related code, but this is just not right and
this commit starts making mta code aware of struct session. This will
ease the implementation of ssl sessions in mta.

while at it, make mta autodetect port to use if it isn't provided in a
rule but can be derived from a parameter (i.e: "relay via ssmtp ...").

Revision 1.22 / (download) - annotate - [select for diffs], Wed Jan 14 23:36:52 2009 UTC (15 years, 4 months ago) by gilles
Branch: MAIN
Changes since 1.21: +11 -5 lines
Diff to previous 1.21 (colored)

slightly change "relay via" so that it can differentiate "ssmtp", "tls" and
"ssl" while providing mta with the informations it needs to do its work.

Revision 1.21 / (download) - annotate - [select for diffs], Sun Jan 4 16:40:58 2009 UTC (15 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.20: +59 -11 lines
Diff to previous 1.20 (colored)

- change name of "masked" member in struct netaddr, it was misleading
- allow "from all" so that the ugly "accept from { 0.0.0.0/0, ::/0 }"
construct becomes a nice looking "accept from all"

ok jacekm@

Revision 1.20 / (download) - annotate - [select for diffs], Sat Dec 20 00:18:03 2008 UTC (15 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.19: +17 -7 lines
Diff to previous 1.19 (colored)

- import first bricks of SMTP AUTH support. currently only AUTH PLAIN is
	supported, AUTH LOGIN will follow soon. AUTH will only work if a
	listen directive has "enable auth" keywords, AND session is safe
	(ssmtp or starttls).

Revision 1.19 / (download) - annotate - [select for diffs], Thu Dec 18 22:13:57 2008 UTC (15 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.18: +4 -1 lines
Diff to previous 1.18 (colored)

- condition lists is wrongly described, unbreak the following syntax:
	"accept for { domain "foo", domain "bar" } ..."
	From Nicholas Mariott <nicholas.marriott@gmail.com>

Revision 1.18 / (download) - annotate - [select for diffs], Thu Dec 11 23:19:00 2008 UTC (15 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

- last snprintf -> bsnprintf

Revision 1.17 / (download) - annotate - [select for diffs], Thu Dec 11 23:06:39 2008 UTC (15 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.16: +5 -13 lines
Diff to previous 1.16 (colored)

- snprintf -> bsnprintf

Revision 1.16 / (download) - annotate - [select for diffs], Wed Dec 10 23:04:24 2008 UTC (15 years, 5 months ago) by jacekm
Branch: MAIN
Changes since 1.15: +10 -1 lines
Diff to previous 1.15 (colored)

That the "aliases" and "virtual" maps satisfy m_src == S_DB is checked
too late, ie. at alias resolution time, and it's only a log_info.

Move the check to parse.y, and make daemon die if m_src != S_DB.

ok gilles@

Revision 1.15 / (download) - annotate - [select for diffs], Sat Dec 6 14:23:47 2008 UTC (15 years, 5 months ago) by jacekm
Branch: MAIN
Changes since 1.14: +3 -1 lines
Diff to previous 1.14 (colored)

Unbreak -Werror.

ok gilles

Revision 1.14 / (download) - annotate - [select for diffs], Sat Dec 6 02:04:56 2008 UTC (15 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.13: +72 -7 lines
Diff to previous 1.13 (colored)

- it is now possible to specify an interface instead of an address or a
	hostname in a listen statement (ie: listen on lo0)
	request by deraadt@ a while ago, ok jacekm@

Revision 1.13 / (download) - annotate - [select for diffs], Thu Dec 4 17:24:13 2008 UTC (15 years, 6 months ago) by cloder
Branch: MAIN
Changes since 1.12: +7 -6 lines
Diff to previous 1.12 (colored)

Declare printf-style functions with __attribute__((format(printf,x,x)))
and fix some of the errors caught by this. Part of a general push to
make yyerror() -Wformat clean throughout the tree.

Revision 1.12 / (download) - annotate - [select for diffs], Thu Dec 4 00:10:15 2008 UTC (15 years, 6 months ago) by ian
Branch: MAIN
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored)

obvious 'missing space' typo in message, ok gilles@ krw@

Revision 1.11 / (download) - annotate - [select for diffs], Tue Nov 25 20:26:40 2008 UTC (15 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.10: +10 -6 lines
Diff to previous 1.10 (colored)

- recent change in parse.y caused htons() to be called twice on the port
	provided to "relay via" rules, once in parse.y once in lka.c, fix.
- rename struct address to struct relayhost, introduce struct mxhost which
	not only holds the sockaddr_storage, but also additionnal flags we
	want forwarded to the mta process.
- propagate the change

Revision 1.10 / (download) - annotate - [select for diffs], Sat Nov 22 20:26:08 2008 UTC (15 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.9: +10 -9 lines
Diff to previous 1.9 (colored)

- allow the optionnal ssmtp keywork in "relay via" rules, while at it
	allow port to become optionnal (implicit 25) or provided by value
	or name.

Revision 1.9 / (download) - annotate - [select for diffs], Thu Nov 13 23:24:19 2008 UTC (15 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.8: +3 -2 lines
Diff to previous 1.8 (colored)

- rephrase the "cannot load cert" warning that is output at startup when a
	listen directive has no matching certificate. it sounds like a
	critical failure when it just means "no tls support".
- minor log_debug() addition in smtp.c

Revision 1.8 / (download) - annotate - [select for diffs], Mon Nov 10 22:35:23 2008 UTC (15 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.7: +9 -9 lines
Diff to previous 1.7 (colored)

- define MAX_LINE_SIZE which is the maximum length of a line we allow from
	a client. it must be set to the highest value we have from all of
	the extensions which are/will be implemented.
- replace all occurences of STRLEN define with MAX_LINE_SIZE, kill STRLEN

Revision 1.7 / (download) - annotate - [select for diffs], Mon Nov 10 17:24:24 2008 UTC (15 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.6: +11 -12 lines
Diff to previous 1.6 (colored)

spaces fixed while reading code

Revision 1.6 / (download) - annotate - [select for diffs], Mon Nov 10 02:13:40 2008 UTC (15 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.5: +10 -4 lines
Diff to previous 1.5 (colored)

- move '=>' into the lex loop, requested by and with help from deraadt@

Revision 1.5 / (download) - annotate - [select for diffs], Mon Nov 10 00:57:35 2008 UTC (15 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.4: +17 -5 lines
Diff to previous 1.4 (colored)

- snprintf() can return -1, make sure every call is checked properly

Revision 1.4 / (download) - annotate - [select for diffs], Mon Nov 10 00:29:33 2008 UTC (15 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.3: +8 -6 lines
Diff to previous 1.3 (colored)

- recognize '=>' as one token instead of trying to match '=' and '>'. this
	prevents:  "foo  =      >  bar" from being valid

Revision 1.3 / (download) - annotate - [select for diffs], Wed Nov 5 12:14:45 2008 UTC (15 years, 6 months ago) by sobrado
Branch: MAIN
Changes since 1.2: +2 -0 lines
Diff to previous 1.2 (colored)

add a few missing id tags; there are a bunch of files, and developers
will probably miss this change when working on more important matters,
so it is probably better to sort them now.  there is a risk of losing
the tags if a change needs to be reverted too.

written with excellent advice from jmc@

ok gilles@

Revision 1.2 / (download) - annotate - [select for diffs], Sat Nov 1 21:41:53 2008 UTC (15 years, 7 months ago) by gilles
Branch: MAIN
Changes since 1.1: +5 -0 lines
Diff to previous 1.1 (colored)

- put back all copyright holders
- add myself as a copyright holder

Revision 1.1 / (download) - annotate - [select for diffs], Sat Nov 1 21:35:28 2008 UTC (15 years, 7 months ago) by gilles
Branch: MAIN

smtpd is a smtp server implementation for OpenBSD. It is a work in progress
which still lacks many features. bringing it in tree will help working on it
more easily.

"at this stage it should go in" henning@, "move ahead" deraadt@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.