Up to [local] / src / usr.sbin / smtpd
Request diff between arbitrary revisions
Default branch: MAIN
Revision 1.52 / (download) - annotate - [select for diffs], Wed Jan 3 08:11:15 2024 UTC (5 months, 1 week ago) by op
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE,
OPENBSD_7_5,
HEAD
Changes since 1.51: +5 -7 lines
Diff to previous 1.51 (colored)
relax ORCPT syntax validation We expected the ORCPT parameter to be a valid rfc822 address. This is wrong on multiple levels: - any other IANA-registered "addr-type" can be used - the parameter may be encoded and we didn't decode it prior validation - RFC3461 explicitly states that "[..] the address associated with the ORCPT keyword is NOT constrained to conform to the syntax rules for that 'addr-type'". Instead, just validate the xtext and preserve the ORCPT value as-is. Issue originally reported by Tim Kuijsten, Tassilo Philipp and others. ok millert@
Revision 1.49.4.1 / (download) - annotate - [select for diffs], Tue Feb 7 15:50:54 2023 UTC (16 months ago) by bluhm
Branch: OPENBSD_7_1
Changes since 1.49: +15 -19 lines
Diff to previous 1.49 (colored) next main 1.50 (colored)
smtpd(8) could abort due to a connection from a local, scoped ipv6 address. avoid using inet_pton(3) which doesn't support scoped ipv6 address, and use getaddrinfo(3) instead of. from semarie@; OK millert@ florian@ kn@ this is errata/7.1/024_smtpd.patch.sig
Revision 1.50.4.1 / (download) - annotate - [select for diffs], Tue Feb 7 15:50:30 2023 UTC (16 months ago) by bluhm
Branch: OPENBSD_7_2
Changes since 1.50: +15 -11 lines
Diff to previous 1.50 (colored) next main 1.51 (colored)
smtpd(8) could abort due to a connection from a local, scoped ipv6 address. avoid using inet_pton(3) which doesn't support scoped ipv6 address, and use getaddrinfo(3) instead of. from semarie@; OK millert@ florian@ kn@ this is errata/7.2/020_smtpd.patch.sig
Revision 1.51 / (download) - annotate - [select for diffs], Mon Feb 6 18:35:52 2023 UTC (16 months ago) by semarie
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE,
OPENBSD_7_4,
OPENBSD_7_3_BASE,
OPENBSD_7_3
Changes since 1.50: +15 -11 lines
Diff to previous 1.50 (colored)
smtpd(8) could abort due to a connection from a local, scoped ipv6 address. avoid using inet_pton(3) which doesn't support scoped ipv6 address, and use getaddrinfo(3) instead of. ok millert@ florian@ kn@
Revision 1.50 / (download) - annotate - [select for diffs], Sat Sep 24 17:08:32 2022 UTC (20 months, 2 weeks ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE
Branch point for: OPENBSD_7_2
Changes since 1.49: +1 -9 lines
Diff to previous 1.49 (colored)
ascii_load_sockaddr: Remove old IPv6 address parsing for envelope files. IPv6 addresses have been formatted as "[address]" in envelope files for years. This was supposed to be removed after the 6.6 release but got forgotten. Noticed by kn@, OK deraadt@ kn@
Revision 1.49 / (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_1_BASE,
OPENBSD_7_0_BASE,
OPENBSD_7_0
Branch point for: OPENBSD_7_1
Changes since 1.48: +1 -18 lines
Diff to previous 1.48 (colored)
add required headers for smtpd.h and remove unnecessary ones in other files. ok jung@
Revision 1.48 / (download) - annotate - [select for diffs], Wed May 26 18:08:55 2021 UTC (3 years ago) by eric
Branch: MAIN
Changes since 1.47: +2 -3 lines
Diff to previous 1.47 (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.47 / (download) - annotate - [select for diffs], Mon Nov 25 14:18:32 2019 UTC (4 years, 6 months ago) by gilles
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE,
OPENBSD_6_9,
OPENBSD_6_8_BASE,
OPENBSD_6_8,
OPENBSD_6_7_BASE,
OPENBSD_6_7
Changes since 1.46: +11 -1 lines
Diff to previous 1.46 (colored)
store smtp session username in envelope and allow ruleset to match specific users or mailaddr: match auth "gilles@openbsd.org" [...] match auth "@openbsd.org" [...] ok eric@
Revision 1.46 / (download) - annotate - [select for diffs], Thu Sep 19 16:00:59 2019 UTC (4 years, 8 months ago) by gilles
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE,
OPENBSD_6_6
Changes since 1.45: +10 -1 lines
Diff to previous 1.45 (colored)
second attempt at fixing how we display inet6 addresses in smtpd. this diff is simpler than my initial reverted attempt, corrects the likely reason for the initial revert and has been running successfully for the day on my MX with tons of incoming and outgoing inet6 trafic. ok millert@
Revision 1.45 / (download) - annotate - [select for diffs], Wed Aug 14 21:11:25 2019 UTC (4 years, 9 months ago) by gilles
Branch: MAIN
Changes since 1.44: +1 -10 lines
Diff to previous 1.44 (colored)
revert the inet6 format diff, regression observed by florian@
Revision 1.44 / (download) - annotate - [select for diffs], Tue Aug 13 16:02:33 2019 UTC (4 years, 9 months ago) by gilles
Branch: MAIN
Changes since 1.43: +10 -1 lines
Diff to previous 1.43 (colored)
use proper format to display inet6 addresses in logs as well as to store in disk envelopes. smtpd used the Received and helo response format that isn't valid in a relay url and looks wrong in logs. spotted and tested ok@ by semarie
Revision 1.43 / (download) - annotate - [select for diffs], Wed Jul 3 03:24:03 2019 UTC (4 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.42: +3 -3 lines
Diff to previous 1.42 (colored)
snprintf/vsnprintf return < 0 on error, rather than -1.
Revision 1.42 / (download) - annotate - [select for diffs], Sun Dec 30 23:09:58 2018 UTC (5 years, 5 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE,
OPENBSD_6_5
Changes since 1.41: +1 -2 lines
Diff to previous 1.41 (colored)
Delete unnecessary <libgen.h> #includes ok deraadt@
Revision 1.41 / (download) - annotate - [select for diffs], Thu Dec 27 15:41:50 2018 UTC (5 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.40: +11 -1 lines
Diff to previous 1.40 (colored)
extract subaddress from last resolved node, not from dest or rcpt address which was incorrect and can lead to ambiguous cases, this will affect the people who were using subaddresses within aliases themselves AND expected deliveries to a maildir subdir of the recipient user. ok eric@
Revision 1.40 / (download) - annotate - [select for diffs], Sat Dec 8 08:01:15 2018 UTC (5 years, 6 months ago) by sunil
Branch: MAIN
Changes since 1.39: +17 -15 lines
Diff to previous 1.39 (colored)
Use correct RFC 3464 specified values for Action field in a DSN. error -> failed success -> delivered This fixes DSN parsing for Mailman. Issue reported by Cristiano Costa on misc@opensmtpd.org. While here, rename enums to reflect the intent and properly handle envelope ascii load/dump to understand change in the values. Suggestions and ok gilles@
Revision 1.39 / (download) - annotate - [select for diffs], Tue May 29 19:48:19 2018 UTC (6 years ago) by eric
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE,
OPENBSD_6_4
Changes since 1.38: +1 -127 lines
Diff to previous 1.38 (colored)
remove unused code ok gilles@
Revision 1.38 / (download) - annotate - [select for diffs], Thu May 24 11:38:24 2018 UTC (6 years ago) by gilles
Branch: MAIN
Changes since 1.37: +39 -103 lines
Diff to previous 1.37 (colored)
switch smtpd to new grammar ok eric@
Revision 1.37 / (download) - annotate - [select for diffs], Sun Aug 6 08:35:14 2017 UTC (6 years, 10 months ago) by gilles
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE,
OPENBSD_6_3,
OPENBSD_6_2_BASE,
OPENBSD_6_2
Changes since 1.36: +2 -57 lines
Diff to previous 1.36 (colored)
a long time ago, we made a change to the format of envelopes and introduced a function to upgrade from v1 to v2 on the fly. this was meant to stay just for the transition in one release. 3 years and 8 months later, it's finally time we remove it ;-) ok eric@, sunil@
Revision 1.36 / (download) - annotate - [select for diffs], Mon Dec 28 22:08:30 2015 UTC (8 years, 5 months ago) by jung
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE,
OPENBSD_6_1,
OPENBSD_6_0_BASE,
OPENBSD_6_0,
OPENBSD_5_9_BASE,
OPENBSD_5_9
Changes since 1.35: +10 -10 lines
Diff to previous 1.35 (colored)
remove spaces after '!' no binary change ok millert
Revision 1.35 / (download) - annotate - [select for diffs], Mon Dec 14 10:35:29 2015 UTC (8 years, 5 months ago) by sunil
Branch: MAIN
Changes since 1.34: +27 -18 lines
Diff to previous 1.34 (colored)
Wrap long lines and fix bad indents. Ok gilles@
Revision 1.34 / (download) - annotate - [select for diffs], Mon Nov 30 14:32:00 2015 UTC (8 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.33: +10 -1 lines
Diff to previous 1.33 (colored)
if a ca_name is set, dump it to on-disk envelope so we recall it on reload. we don't set ca_name yet, it is part of a larger diff i'm splitting
Revision 1.33 / (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.32: +9 -1 lines
Diff to previous 1.32 (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.32 / (download) - annotate - [select for diffs], Wed Oct 14 20:57:17 2015 UTC (8 years, 7 months ago) by gilles
Branch: MAIN
Changes since 1.31: +3 -2 lines
Diff to previous 1.31 (colored)
we dump esc_code if we have an esc_class, code may be (and actually was) confused as a pasto, so add a comment to make it clear that this is not an error
Revision 1.31 / (download) - annotate - [select for diffs], Fri Oct 9 09:56:28 2015 UTC (8 years, 8 months ago) by gilles
Branch: MAIN
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)
if enhanced status class is not set, enhanced status code is never dumped in disk envelope.
Revision 1.30 / (download) - annotate - [select for diffs], Fri Jan 16 06:40:20 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE,
OPENBSD_5_8,
OPENBSD_5_7_BASE,
OPENBSD_5_7
Changes since 1.29: +2 -1 lines
Diff to previous 1.29 (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.29 / (download) - annotate - [select for diffs], Sat Apr 19 12:30:54 2014 UTC (10 years, 1 month ago) by gilles
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE,
OPENBSD_5_6
Changes since 1.28: +6 -6 lines
Diff to previous 1.28 (colored)
(void) cast strlcpy(), it cannot truncate (void) cast strlcat(), they are detected and handled later
Revision 1.28 / (download) - annotate - [select for diffs], Tue Feb 4 15:44:05 2014 UTC (10 years, 4 months ago) by eric
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE,
OPENBSD_5_5
Changes since 1.27: +113 -1 lines
Diff to previous 1.27 (colored)
Add support for DSN and Enhanced Status Code
Revision 1.27 / (download) - annotate - [select for diffs], Tue Feb 4 13:44:41 2014 UTC (10 years, 4 months ago) by eric
Branch: MAIN
Changes since 1.26: +4 -4 lines
Diff to previous 1.26 (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.26 / (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.25: +6 -6 lines
Diff to previous 1.25 (colored)
bcopy -> memmove bzero -> memset
Revision 1.25 / (download) - annotate - [select for diffs], Thu Dec 5 09:44:16 2013 UTC (10 years, 6 months ago) by eric
Branch: MAIN
Changes since 1.24: +2 -1 lines
Diff to previous 1.24 (colored)
warn when failing to parse a field
Revision 1.24 / (download) - annotate - [select for diffs], Thu Nov 28 10:43:37 2013 UTC (10 years, 6 months ago) by eric
Branch: MAIN
Changes since 1.23: +4 -4 lines
Diff to previous 1.23 (colored)
unsigned char casts for ctype ok gilles@
Revision 1.23 / (download) - annotate - [select for diffs], Mon Nov 18 11:47:16 2013 UTC (10 years, 6 months ago) by eric
Branch: MAIN
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored)
change dict_poproot() prototype: do not take key placeholder parameter as it can't work that way.
Revision 1.22 / (download) - annotate - [select for diffs], Wed Nov 6 10:01:29 2013 UTC (10 years, 7 months ago) by eric
Branch: MAIN
Changes since 1.21: +115 -5 lines
Diff to previous 1.21 (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.21 / (download) - annotate - [select for diffs], Sat Oct 26 20:32:48 2013 UTC (10 years, 7 months ago) by eric
Branch: MAIN
Changes since 1.20: +365 -398 lines
Diff to previous 1.20 (colored)
Simplify code for loading and dumping envelopes. Makes it much easier to deal with automatic upgrade between envelope versions at load time.
Revision 1.20 / (download) - annotate - [select for diffs], Fri May 24 17:03:14 2013 UTC (11 years ago) by eric
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE,
OPENBSD_5_4
Changes since 1.19: +6 -2 lines
Diff to previous 1.19 (colored)
sync with OpenSMTPD 5.3.2 ok gilles@
Revision 1.19 / (download) - annotate - [select for diffs], Thu Jan 31 18:34:43 2013 UTC (11 years, 4 months ago) by eric
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE,
OPENBSD_5_3
Changes since 1.18: +4 -1 lines
Diff to previous 1.18 (colored)
assorted fixes spotted by Coverity. some log message updates. ok gilles@
Revision 1.18 / (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.17: +162 -115 lines
Diff to previous 1.17 (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.17 / (download) - annotate - [select for diffs], Fri Oct 12 08:51:02 2012 UTC (11 years, 8 months ago) by eric
Branch: MAIN
Changes since 1.16: +5 -17 lines
Diff to previous 1.16 (colored)
Extend the "retry" field to 16 bits. The new quadratic retry formula makes the maximum retry delay a bit to small on 8 bits. ok gilles@ chl@
Revision 1.16 / (download) - annotate - [select for diffs], Thu Oct 11 21:49:11 2012 UTC (11 years, 8 months ago) by gilles
Branch: MAIN
Changes since 1.15: +4 -4 lines
Diff to previous 1.15 (colored)
- remove dead store spotted by clang
Revision 1.15 / (download) - annotate - [select for diffs], Thu Oct 11 21:47:48 2012 UTC (11 years, 8 months ago) by gilles
Branch: MAIN
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored)
- remove dead store spotted by clang
Revision 1.14 / (download) - annotate - [select for diffs], Wed Sep 26 19:52:20 2012 UTC (11 years, 8 months ago) by eric
Branch: MAIN
Changes since 1.13: +7 -7 lines
Diff to previous 1.13 (colored)
Stop using the delivery_data union (field "to") in delivery_mda. It's confusing and not necessary as it's only used for "buffer". Instead, just add a "buffer" member in the structure and rename "as_user" to "user". The delivery_data union becomes an anonymous union in expandnode, which is the only other place where it's used. ok gilles@
Revision 1.13 / (download) - annotate - [select for diffs], Wed Sep 19 18:20:36 2012 UTC (11 years, 8 months ago) by eric
Branch: MAIN
Changes since 1.12: +2 -7 lines
Diff to previous 1.12 (colored)
Remove DF_ENQUEUE flag. It is mostly unused and logically broken. Ignore it in existing envelopes until it gets completely dropped. Change "smtpctl show queue" to display the address family of the envelope source instead of the ENQUEUE flag. ok gilles@
Revision 1.12 / (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.11: +5 -2 lines
Diff to previous 1.11 (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.11 / (download) - annotate - [select for diffs], Sun Sep 2 12:21:22 2012 UTC (11 years, 9 months ago) by chl
Branch: MAIN
Changes since 1.10: +3 -1 lines
Diff to previous 1.10 (colored)
remove warning asked by gilles@ ok gilles@
Revision 1.10 / (download) - annotate - [select for diffs], Fri Aug 24 13:21:56 2012 UTC (11 years, 9 months ago) by chl
Branch: MAIN
Changes since 1.9: +2 -59 lines
Diff to previous 1.9 (colored)
In envelope ascii dump/load: - remove loading of evpid. - don't dump the msgid - ignore msgid at load - remove now unused functions ascii_{dump,load}_uint{32,64}_hex() With inputs from eric@ and gilles@ ok gilles@ eric@
Revision 1.9 / (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.8: +8 -1 lines
Diff to previous 1.8 (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.8 / (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.7: +26 -26 lines
Diff to previous 1.7 (colored)
coding style: replace all occurences of u_int* with uint* ok eric@
Revision 1.7 / (download) - annotate - [select for diffs], Sun Aug 19 10:32:32 2012 UTC (11 years, 9 months ago) by chl
Branch: MAIN
Changes since 1.6: +35 -35 lines
Diff to previous 1.6 (colored)
Kill envelope_{dump,load}_file() and replace them with envelope_{dump,load}_buffer(). with input from eric@ ok eric@
Revision 1.6 / (download) - annotate - [select for diffs], Sun Jun 3 19:52:56 2012 UTC (12 years ago) by eric
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE,
OPENBSD_5_2
Changes since 1.5: +35 -2 lines
Diff to previous 1.5 (colored)
Do not store the envelope id within the envelope, only the message id. Make sure existing envelopes can be properly loaded. ok chl@ gilles@
Revision 1.5 / (download) - annotate - [select for diffs], Fri Jun 1 09:24:58 2012 UTC (12 years ago) by eric
Branch: MAIN
Changes since 1.4: +174 -1 lines
Diff to previous 1.4 (colored)
move envelope dump/load functions to envelope.c ok gilles@
Revision 1.4 / (download) - annotate - [select for diffs], Sun Jan 15 16:47:49 2012 UTC (12 years, 4 months ago) by chl
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE,
OPENBSD_5_1
Changes since 1.3: +22 -10 lines
Diff to previous 1.3 (colored)
Add ascii_{load,dump}_time() to properly deal with time_t. This fixes build warnings for portable smptd. ok eric@ gilles@
Revision 1.3 / (download) - annotate - [select for diffs], Thu Jan 12 15:01:33 2012 UTC (12 years, 5 months ago) by eric
Branch: MAIN
Changes since 1.2: +19 -1 lines
Diff to previous 1.2 (colored)
remove envelope_get_errormsg() and move envelope_set_errormsg() to envelope.c ok gilles@
Revision 1.2 / (download) - annotate - [select for diffs], Wed Jan 11 23:25:29 2012 UTC (12 years, 5 months ago) by eric
Branch: MAIN
Changes since 1.1: +4 -4 lines
Diff to previous 1.1 (colored)
fix flags writing ok gilles@
Revision 1.1 / (download) - annotate - [select for diffs], Wed Jan 11 22:24:37 2012 UTC (12 years, 5 months ago) by gilles
Branch: MAIN
implement an envelope_ascii API that's not tied to a specific queue_backend simplify queue_fsqueue