Up to [local] / src / usr.sbin / smtpd
Request diff between arbitrary revisions
Default branch: MAIN
Revision 1.32 / (download) - annotate - [select for diffs], Mon Jun 14 17:58:15 2021 UTC (4 years, 3 months ago) by eric
Branch: MAIN
CVS Tags: OPENBSD_7_7_BASE,
OPENBSD_7_7,
OPENBSD_7_6_BASE,
OPENBSD_7_6,
OPENBSD_7_5_BASE,
OPENBSD_7_5,
OPENBSD_7_4_BASE,
OPENBSD_7_4,
OPENBSD_7_3_BASE,
OPENBSD_7_3,
OPENBSD_7_2_BASE,
OPENBSD_7_2,
OPENBSD_7_1_BASE,
OPENBSD_7_1,
OPENBSD_7_0_BASE,
OPENBSD_7_0,
HEAD
Changes since 1.31: +1 -12 lines
Diff to previous 1.31 (colored)
add required headers for smtpd.h and remove unnecessary ones in other files. ok jung@
Revision 1.31 / (download) - annotate - [select for diffs], Thu May 31 21:06:12 2018 UTC (7 years, 3 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,
OPENBSD_6_6_BASE,
OPENBSD_6_6,
OPENBSD_6_5_BASE,
OPENBSD_6_5,
OPENBSD_6_4_BASE,
OPENBSD_6_4
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (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.30 / (download) - annotate - [select for diffs], Thu May 24 11:38:24 2018 UTC (7 years, 4 months ago) by gilles
Branch: MAIN
Changes since 1.29: +11 -16 lines
Diff to previous 1.29 (colored)
switch smtpd to new grammar ok eric@
Revision 1.29 / (download) - annotate - [select for diffs], Mon Dec 28 22:08:30 2015 UTC (9 years, 8 months ago) by jung
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE,
OPENBSD_6_3,
OPENBSD_6_2_BASE,
OPENBSD_6_2,
OPENBSD_6_1_BASE,
OPENBSD_6_1,
OPENBSD_6_0_BASE,
OPENBSD_6_0,
OPENBSD_5_9_BASE,
OPENBSD_5_9
Changes since 1.28: +3 -3 lines
Diff to previous 1.28 (colored)
remove spaces after '!' no binary change ok millert
Revision 1.28 / (download) - annotate - [select for diffs], Tue Jan 20 17:37:54 2015 UTC (10 years, 8 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.27: +4 -3 lines
Diff to previous 1.27 (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.27 / (download) - annotate - [select for diffs], Fri May 9 21:30:11 2014 UTC (11 years, 4 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE,
OPENBSD_5_6
Changes since 1.26: +6 -4 lines
Diff to previous 1.26 (colored)
stop casting sizeof to int
Revision 1.26 / (download) - annotate - [select for diffs], Sat Apr 19 12:43:19 2014 UTC (11 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.25: +11 -10 lines
Diff to previous 1.25 (colored)
unchecked strlcat() call in expand_to_text() may cause aliases expansion to fail later, make it fail early. (void) cast other calls, they are detected and handled correctly later
Revision 1.25 / (download) - annotate - [select for diffs], Thu Dec 26 17:25:32 2013 UTC (11 years, 8 months ago) by eric
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE,
OPENBSD_5_5
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)
bcopy -> memmove bzero -> memset
Revision 1.24 / (download) - annotate - [select for diffs], Thu Oct 24 20:39:23 2013 UTC (11 years, 11 months ago) by eric
Branch: MAIN
Changes since 1.23: +67 -17 lines
Diff to previous 1.23 (colored)
When building the expansion tree, distinguish between apparently identical nodes that appear in different contexts. The same delivery can happen for different users, or as a different destination address. Fixes a bug with setups like the following, where a mail sent to [email protected] was not delivered to both /tmp/me and /tmp/she. table foobar { [email protected] = vmail, [email protected] = vmail, \ [email protected] = "[email protected],[email protected]" } accept for domain foo.net virtual <foobar> deliver to maildir "/tmp/%{dest.user}"
Revision 1.23 / (download) - annotate - [select for diffs], Fri May 24 17:03:14 2013 UTC (12 years, 4 months ago) by eric
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE,
OPENBSD_5_4
Changes since 1.22: +19 -1 lines
Diff to previous 1.22 (colored)
sync with OpenSMTPD 5.3.2 ok gilles@
Revision 1.22 / (download) - annotate - [select for diffs], Fri Apr 12 18:22:49 2013 UTC (12 years, 5 months ago) by eric
Branch: MAIN
Changes since 1.21: +3 -3 lines
Diff to previous 1.21 (colored)
replace MAX_LINE_SIZE and SMTP_LINE_MAX with SMTPD_MAXLINESIZE for consistency and clarity. Remove useless and confusing extra byte in a few arrays based on this define. ok gilles@
Revision 1.21 / (download) - annotate - [select for diffs], Thu Feb 14 12:30:49 2013 UTC (12 years, 7 months ago) by gilles
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE,
OPENBSD_5_3
Changes since 1.20: +79 -3 lines
Diff to previous 1.20 (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.20 / (download) - annotate - [select for diffs], Thu Jan 31 18:34:43 2013 UTC (12 years, 7 months ago) by eric
Branch: MAIN
Changes since 1.19: +9 -2 lines
Diff to previous 1.19 (colored)
assorted fixes spotted by Coverity. some log message updates. ok gilles@
Revision 1.19 / (download) - annotate - [select for diffs], Sat Jan 26 09:37:23 2013 UTC (12 years, 7 months ago) by gilles
Branch: MAIN
Changes since 1.18: +78 -2 lines
Diff to previous 1.18 (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.18 / (download) - annotate - [select for diffs], Wed Oct 10 18:02:37 2012 UTC (12 years, 11 months ago) by eric
Branch: MAIN
Changes since 1.17: +2 -1 lines
Diff to previous 1.17 (colored)
For each alias node, mark if it has been expanded from an alias map or from a .forward file. Local deliveries for files and filters expanded from an alias map are run as user _smtpd. issue reported by tood@ ok gilles@ todd@
Revision 1.17 / (download) - annotate - [select for diffs], Thu Sep 27 18:57:25 2012 UTC (12 years, 11 months ago) by eric
Branch: MAIN
Changes since 1.16: +24 -6 lines
Diff to previous 1.16 (colored)
clarify the alias expansion code. The session manages a list of nodes to process. A node has a link to the parent node from which it has been expanded, and a link to the rule that led to its creation. Depending on its type and the associated rule, each node is either "expanded" to create new nodes or "submitted" to create a final envelope. Nodes which have already been seen, either processed or not, are discarded to avoid loops. The expansion process is bootstrapped by creating an EXPAND_ADDRESS node from the original dest, with no rule and no parent. It is done when all nodes have been expanded or if an error occurs before. The expand depth is limited 5 levels. The whole expansion fails if the limit is reached. While there, make sure that only one .forward file is queried at a time, and only append the subfolder tag in the maildir case. Fixe issues with some virtual map setups where the dest would get mixed up, and make the whole expansion process generally easier to follow. ok chl@ gilles@
Revision 1.16 / (download) - annotate - [select for diffs], Fri Sep 21 19:37:08 2012 UTC (13 years ago) by eric
Branch: MAIN
Changes since 1.15: +5 -1 lines
Diff to previous 1.15 (colored)
Do not pass the username to forwards_get() which does not have to care about this. Instead, set the username on the expand context, and copy it on the expand nodes as they are inserted. ok gilles@
Revision 1.15 / (download) - annotate - [select for diffs], Fri Sep 21 16:40:20 2012 UTC (13 years ago) by eric
Branch: MAIN
Changes since 1.14: +9 -9 lines
Diff to previous 1.14 (colored)
wrap expandtree into a "struct expand". ok gilles@
Revision 1.14 / (download) - annotate - [select for diffs], Wed Sep 19 12:45:04 2012 UTC (13 years ago) by eric
Branch: MAIN
Changes since 1.13: +4 -4 lines
Diff to previous 1.13 (colored)
rename variables for consistency ok gilles@
Revision 1.13 / (download) - annotate - [select for diffs], Wed Sep 19 09:06:35 2012 UTC (13 years ago) by eric
Branch: MAIN
Changes since 1.12: +9 -41 lines
Diff to previous 1.12 (colored)
start cleaning the expansion code: - change expandtree_* prefix to expand_ for better readability and because the structure might change at some point - rename <>_free_nodes() to <>_free() - remove unused <>_remove_node() - refcounting has no purpose at all; just remove it as well as the decrement/increment functions, and replace the latter with <>_insert - expandnode flags is only used to know if it's been processed or not, don't make it a flag but a simple field with clear name. ok gilles@ chl@
Revision 1.12 / (download) - annotate - [select for diffs], Tue Sep 18 15:35:13 2012 UTC (13 years ago) by eric
Branch: MAIN
Changes since 1.11: +5 -7 lines
Diff to previous 1.11 (colored)
make use of expandtree_free_nodes() in lka_session_destroy(). change to a simpler implementation for it while there. ok gilles@
Revision 1.11 / (download) - annotate - [select for diffs], Sun Nov 28 14:35:58 2010 UTC (14 years, 9 months ago) by gilles
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE,
OPENBSD_5_2,
OPENBSD_5_1_BASE,
OPENBSD_5_1,
OPENBSD_5_0_BASE,
OPENBSD_5_0,
OPENBSD_4_9_BASE,
OPENBSD_4_9
Changes since 1.10: +1 -4 lines
Diff to previous 1.10 (colored)
remove all unused headers
Revision 1.10 / (download) - annotate - [select for diffs], Sun Nov 28 13:56:43 2010 UTC (14 years, 9 months ago) by gilles
Branch: MAIN
Changes since 1.9: +3 -1 lines
Diff to previous 1.9 (colored)
a bit of .h cleanups, no functionnal change
Revision 1.9 / (download) - annotate - [select for diffs], Sat Oct 9 22:05:35 2010 UTC (14 years, 11 months ago) by gilles
Branch: MAIN
Changes since 1.8: +13 -10 lines
Diff to previous 1.8 (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.8 / (download) - annotate - [select for diffs], Tue Jun 1 23:06:23 2010 UTC (15 years, 3 months ago) by jacekm
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE,
OPENBSD_4_8
Changes since 1.7: +10 -13 lines
Diff to previous 1.7 (colored)
new queue, again; gcc2 compile tested by deraadt
Revision 1.7 / (download) - annotate - [select for diffs], Tue Jun 1 19:47:08 2010 UTC (15 years, 3 months ago) by jacekm
Branch: MAIN
Changes since 1.6: +12 -9 lines
Diff to previous 1.6 (colored)
New queue doesn't compile on gcc2, back out. Spotted by deraadt@
Revision 1.6 / (download) - annotate - [select for diffs], Mon May 31 23:38:56 2010 UTC (15 years, 3 months ago) by jacekm
Branch: MAIN
Changes since 1.5: +10 -13 lines
Diff to previous 1.5 (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.5 / (download) - annotate - [select for diffs], Wed May 19 20:57:10 2010 UTC (15 years, 4 months ago) by gilles
Branch: MAIN
Changes since 1.4: +1 -2 lines
Diff to previous 1.4 (colored)
cleanup-only commit, removes unrequired includes, no functionnal change
Revision 1.4 / (download) - annotate - [select for diffs], Tue Apr 27 09:49:23 2010 UTC (15 years, 4 months ago) by gilles
Branch: MAIN
Changes since 1.3: +26 -13 lines
Diff to previous 1.3 (colored)
initial work at fixing aliases support: - kill struct alias, struct expandnode is used instead - introduce map_parse_alias() and map_parse_virtual() - aliases and virtual code no longer assume db(3) but use the map API which lets them become backend agnostic AND value-checked. this actually makes the code simpler by removing all values parsing from aliases.c - rename K_SECRETS -> K_SECRET, K_ALIASES -> K_ALIAS for consistency the enum has singular names. - aliases, virtual and forward now work with an expandtree and deal with multiple levels of resolving by merging expandtree's more coming soon ;)
Revision 1.3 / (download) - annotate - [select for diffs], Mon Nov 9 23:49:34 2009 UTC (15 years, 10 months ago) by gilles
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE,
OPENBSD_4_7
Changes since 1.2: +32 -10 lines
Diff to previous 1.2 (colored)
- add a reference count and flags to struct expand_node - during expansion, no longer create a new node for each result but try to lookup for an existing equivalent node and increment its reference count so that: a) we save on memory, b) we don't need to expand the same users again and again just because they keep appearing in expansion results. - while expanding, flag nodes as F_EXPAND_DONE so that we know which nodes we already processed - be smarter when expanding, if we have a clue that an iteration has not brought any new result (because no new nodes were added and all existing nodes have F_EXPAND_DONE), end expansion and proceed to delivery. - various small cleanups discussed with jacekm@ yesterday, rebuild aliases db, make clean
Revision 1.2 / (download) - annotate - [select for diffs], Mon Nov 9 10:32:48 2009 UTC (15 years, 10 months ago) by jacekm
Branch: MAIN
Changes since 1.1: +3 -2 lines
Diff to previous 1.1 (colored)
fatal on RB_INSERT failure
Revision 1.1 / (download) - annotate - [select for diffs], Sun Nov 8 23:15:03 2009 UTC (15 years, 10 months ago) by gilles
Branch: MAIN
move expansion code to new expand.c to clearly separate it from aliases