Up to [local] / src / usr.sbin / smtpd
Request diff between arbitrary revisions
Default branch: MAIN
Revision 1.40 / (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_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.39: +1 -11 lines
Diff to previous 1.39 (colored)
add required headers for smtpd.h and remove unnecessary ones in other files. ok jung@
Revision 1.39 / (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_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,
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.38: +2 -2 lines
Diff to previous 1.38 (colored)
remove spaces after '!' no binary change ok millert
Revision 1.38 / (download) - annotate - [select for diffs], Sat Dec 5 21:27:42 2015 UTC (8 years, 6 months ago) by mmcc
Branch: MAIN
Changes since 1.37: +2 -3 lines
Diff to previous 1.37 (colored)
Remove a few NULL-checks before free().
Revision 1.37 / (download) - annotate - [select for diffs], Wed Oct 14 21:04:37 2015 UTC (8 years, 7 months ago) by gilles
Branch: MAIN
Changes since 1.36: +2 -2 lines
Diff to previous 1.36 (colored)
whitespace
Revision 1.36 / (download) - annotate - [select for diffs], Tue Jan 20 17:37:54 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.35: +2 -1 lines
Diff to previous 1.35 (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.35 / (download) - annotate - [select for diffs], Fri May 24 17:03:14 2013 UTC (11 years ago) by eric
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE,
OPENBSD_5_6,
OPENBSD_5_5_BASE,
OPENBSD_5_5,
OPENBSD_5_4_BASE,
OPENBSD_5_4
Changes since 1.34: +9 -5 lines
Diff to previous 1.34 (colored)
sync with OpenSMTPD 5.3.2 ok gilles@
Revision 1.34 / (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.33: +2 -1 lines
Diff to previous 1.33 (colored)
assorted fixes spotted by Coverity. some log message updates. ok gilles@
Revision 1.33 / (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.32: +53 -63 lines
Diff to previous 1.32 (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.32 / (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.31: +2 -2 lines
Diff to previous 1.31 (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.31 / (download) - annotate - [select for diffs], Thu Sep 27 17:47:49 2012 UTC (11 years, 8 months ago) by chl
Branch: MAIN
Changes since 1.30: +2 -3 lines
Diff to previous 1.30 (colored)
use xmalloc()/xcalloc() helpers while there unify usage of log_trace() in ramstat_set() ok gilles@ eric@
Revision 1.30 / (download) - annotate - [select for diffs], Fri Sep 21 19:37:08 2012 UTC (11 years, 8 months ago) by eric
Branch: MAIN
Changes since 1.29: +2 -4 lines
Diff to previous 1.29 (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.29 / (download) - annotate - [select for diffs], Fri Sep 21 16:40:20 2012 UTC (11 years, 8 months ago) by eric
Branch: MAIN
Changes since 1.28: +3 -3 lines
Diff to previous 1.28 (colored)
wrap expandtree into a "struct expand". ok gilles@
Revision 1.28 / (download) - annotate - [select for diffs], Thu Sep 20 14:28:57 2012 UTC (11 years, 8 months ago) by eric
Branch: MAIN
Changes since 1.27: +2 -2 lines
Diff to previous 1.27 (colored)
constify parameters that are supposed to be const. ok gilles@
Revision 1.27 / (download) - annotate - [select for diffs], Wed Sep 19 12:59:59 2012 UTC (11 years, 8 months ago) by eric
Branch: MAIN
Changes since 1.26: +1 -2 lines
Diff to previous 1.26 (colored)
expandnodes must be bzero()'d before parsing to be sure there is no bogus data left on return, since the RB compare functions uses memcmp(). While there, remove all calls to bzero() before alias_parse(). ok gilles@
Revision 1.26 / (download) - annotate - [select for diffs], Wed Sep 19 12:45:04 2012 UTC (11 years, 8 months ago) by eric
Branch: MAIN
Changes since 1.25: +7 -7 lines
Diff to previous 1.25 (colored)
rename variables for consistency ok gilles@
Revision 1.25 / (download) - annotate - [select for diffs], Wed Sep 19 09:06:35 2012 UTC (11 years, 8 months ago) by eric
Branch: MAIN
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (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.24 / (download) - annotate - [select for diffs], Mon May 16 21:05:51 2011 UTC (13 years 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
Changes since 1.23: +4 -2 lines
Diff to previous 1.23 (colored)
murder struct path and make sure smtpd uses simpler structures that do not bring a shitload of unnecessary information everywhere. this required many parts of smtpd to be refactored and more specifically envelope expansion. in the process lots of code got simplified, and the envelope expansion code has been isolated to lka_session.c with some longstanding bugs fixed. Diff has been tested by many with no major regression reported. armani@ spotted a bug in a setup where a domain is listed a both primary and virtual, I will fix that in-tree as it's becoming painful to maintain this diff out.
Revision 1.23 / (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.22: +1 -4 lines
Diff to previous 1.22 (colored)
remove all unused headers
Revision 1.22 / (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.21: +3 -1 lines
Diff to previous 1.21 (colored)
a bit of .h cleanups, no functionnal change
Revision 1.21 / (download) - annotate - [select for diffs], Tue Apr 27 09:49:23 2010 UTC (14 years, 1 month ago) by gilles
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE,
OPENBSD_4_8
Changes since 1.20: +5 -7 lines
Diff to previous 1.20 (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.20 / (download) - annotate - [select for diffs], Mon Nov 9 23:54:08 2009 UTC (14 years, 7 months ago) by gilles
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE,
OPENBSD_4_7
Changes since 1.19: +5 -7 lines
Diff to previous 1.19 (colored)
now that we don't keep an expand_node in memory for each expansion result, we don't need to calloc them as they won't be saved in the tree.
Revision 1.19 / (download) - annotate - [select for diffs], Mon Nov 9 23:49:34 2009 UTC (14 years, 7 months ago) by gilles
Branch: MAIN
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (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.18 / (download) - annotate - [select for diffs], Sun Nov 8 23:25:44 2009 UTC (14 years, 7 months ago) by gilles
Branch: MAIN
Changes since 1.17: +2 -3 lines
Diff to previous 1.17 (colored)
forwards_get() also calls alias_to_expand_node()
Revision 1.17 / (download) - annotate - [select for diffs], Sun Nov 8 23:08:56 2009 UTC (14 years, 7 months ago) by gilles
Branch: MAIN
Changes since 1.16: +9 -8 lines
Diff to previous 1.16 (colored)
rework a bit expansion and data structures involved in the expansion so we no longer have a direct mapping between structures saved in aliases/virtual db and structures used at runtime during expansion. side effects ? struct alias is smaller, databases are smaller and it is no longer necessary to rebuild aliases/virtual databases each time jacekm@ or I make changes to some obscure structure used indirectely during expansion rebuild databases, flush queues, make clean
Revision 1.16 / (download) - annotate - [select for diffs], Sun Nov 8 21:40:05 2009 UTC (14 years, 7 months ago) by gilles
Branch: MAIN
Changes since 1.15: +3 -3 lines
Diff to previous 1.15 (colored)
- make aliases expansion use a rb tree instead of a tail queue, the code doesn't take advantage of the new structure yet, but this was a needed change for upcoming improvements. - introduce aliasestree_{lookup,insert,remove} to the aliases api - rename queue_generate_id() to generate_uid() and move it to utils.c as it is used all over the place and not only in queue tree idea discussed with jacekm@, if you update rebuild aliases db, make clean and flush queue
Revision 1.15 / (download) - annotate - [select for diffs], Sun Nov 8 19:38:26 2009 UTC (14 years, 7 months ago) by gilles
Branch: MAIN
Changes since 1.14: +1 -2 lines
Diff to previous 1.14 (colored)
first commit of a serie to cleanup, simplify and improve aliases resolution which is probably the most complex code in smtpd right now. no longer use a single list to hold aliases to be resolved and resolved aliases, and do not use struct alias to hold resolved aliases. instead use a delivery list that is a list of struct path, and populate it with resolved aliases. idea discussed with jacekm@, this needs some testing to make sure it does not introduce a regression with aliases. flush your queue and make clean.
Revision 1.14 / (download) - annotate - [select for diffs], Sat Aug 8 00:02:22 2009 UTC (14 years, 10 months ago) by gilles
Branch: MAIN
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored)
import some changes from portable smtpd to reduce the delta between both. this commit contains mostly missing casts and cosmethic changes, do not expect to build this anywhere but on OpenBSD, it does not contain any of the portable glue.
Revision 1.13 / (download) - annotate - [select for diffs], Tue Mar 3 23:23:52 2009 UTC (15 years, 3 months ago) by gilles
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE,
OPENBSD_4_6
Changes since 1.12: +3 -32 lines
Diff to previous 1.12 (colored)
Fix a long standing issue where ~/.forward files were opened by user _smtpd causing them not to be handled when a user's homedir is set to mode 0700. I still need to do some cleanup and make sure it works as it should, but this diff provides better behavior than what we had.
Revision 1.12 / (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.11: +2 -3 lines
Diff to previous 1.11 (colored)
replace MAX* constants by sizeof where possible ok jacekm@
Revision 1.11 / (download) - annotate - [select for diffs], Thu Jan 29 21:50:10 2009 UTC (15 years, 4 months ago) by form
Branch: MAIN
Changes since 1.10: +45 -20 lines
Diff to previous 1.10 (colored)
better parsing of .forward files ok gilles@
Revision 1.10 / (download) - annotate - [select for diffs], Thu Jan 8 19:17:31 2009 UTC (15 years, 5 months ago) by jacekm
Branch: MAIN
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored)
ensure getpwnam is always followed by endpwent; ok gilles@ henning@
Revision 1.9 / (download) - annotate - [select for diffs], Wed Jan 7 00:26:30 2009 UTC (15 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.8: +4 -2 lines
Diff to previous 1.8 (colored)
- when performing aliases expansion, do not forget to set an action to each expanded envelope, orelse they will use the default action and be passed to MTA no matter if recipient is local or not. bug reported by Nicholas Marriott <nicholas.marriott@gmail.com>, fixed by me and okayd by jacekm@, collaborative work ;-)
Revision 1.8 / (download) - annotate - [select for diffs], Sun Jan 4 00:58:59 2009 UTC (15 years, 5 months ago) by gilles
Branch: MAIN
Changes since 1.7: +3 -2 lines
Diff to previous 1.7 (colored)
aliases/forwards expansion was not done correctly and a race could cause delivery to happen before expansion is over, causing some of the recipients to never receive the mail. change how the mfa, lka, queue and smtp processes communicate to ensure smtp never receives an acknowledgment before ALL expanded envelopes are on disk. While at it, lka was doing work which belongs in mfa, fix that also. this is based on an idea from a talk with jacekm@, change not over but already better than what we had.
Revision 1.7 / (download) - annotate - [select for diffs], Thu Jan 1 16:15:47 2009 UTC (15 years, 5 months ago) by jacekm
Branch: MAIN
Changes since 1.6: +1 -8 lines
Diff to previous 1.6 (colored)
remove unnecessary includes; ok gilles@
Revision 1.6 / (download) - annotate - [select for diffs], Sat Dec 13 13:15:38 2008 UTC (15 years, 5 months ago) by jacekm
Branch: MAIN
Changes since 1.5: +1 -3 lines
Diff to previous 1.5 (colored)
Declare alias_parse in smtpd.h, and fix callers that pass it wrong number of arguments. ok gilles@
Revision 1.5 / (download) - annotate - [select for diffs], Sat Dec 6 14:30:51 2008 UTC (15 years, 6 months ago) by jacekm
Branch: MAIN
Changes since 1.4: +1 -2 lines
Diff to previous 1.4 (colored)
Don't include <err.h> where log.c API must be used. ok gilles@
Revision 1.4 / (download) - annotate - [select for diffs], Tue Nov 25 23:06:15 2008 UTC (15 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.3: +2 -3 lines
Diff to previous 1.3 (colored)
- more prototype moving to smtpd.h
Revision 1.3 / (download) - annotate - [select for diffs], Mon Nov 17 21:32:23 2008 UTC (15 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.2: +7 -4 lines
Diff to previous 1.2 (colored)
- err() -> fatal() - printf() -> log_debug() - be more verbose in debug mode
Revision 1.2 / (download) - annotate - [select for diffs], Wed Nov 5 12:14:45 2008 UTC (15 years, 7 months ago) by sobrado
Branch: MAIN
Changes since 1.1: +2 -0 lines
Diff to previous 1.1 (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.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@