summaryrefslogtreecommitdiffstats
path: root/usr.sbin/smtpd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* reset the io event when data is queued.eric2016-11-243-33/+17
| | | | | | remove all calls to io_reload() which are now unnecessary. ok gilles@ sunil@
* Normalize the io input buffer internally when reinstalling the io event, soeric2016-11-225-19/+11
| | | | | | the caller doesn't have to bother with this. ok gilles@ sunil@
* replace calls to iobuf_*() functions with the corresponding io_*() wrappers.eric2016-11-215-77/+67
| | | | ok sunil@ gilles@
* add dedicated functions to set fd and callback on a struct io.eric2016-11-207-27/+47
| | | | | | simplify io_init() prototype. ok sunil@ gilles@
* fix regression introduced in previous commiteric2016-11-182-41/+58
| | | | | | spotted by Heiko Zimmermann ok gilles@
* Add io api functions for dealing with buffered data, as wrapper arounderic2016-11-174-10/+133
| | | | | | their iobuf counterparts. ok gilles@ sunil@
* remove IO_TLSVERIFIED which is not a io event, and inline necessary codeeric2016-11-174-49/+42
| | | | | | where the callback functions are called for this event. ok gilles@
* pass the user pointer as parameter to the io callback instead of havingeric2016-11-167-31/+32
| | | | | | the user dereference the io structure. ok millert@ gilles@
* add -F to usage() too;jmc2016-10-191-2/+2
|
* document -F which somehow escaped documentationgilles2016-10-191-3/+9
|
* Remove the "phase" state variable from the smtp session. Simply checkeric2016-10-161-26/+9
| | | | | | | "helo[0]" to see if an HELO/EHLO command was received (reset after starttls), and "tx" to know if we are in a transaction. ok gilles@ millert@
* A logic issue in smtpd's header parsing can cause SMTP sessions to hang.gilles2016-10-132-2/+9
| | | | diff by eric@, ok me
* fix smtp session logic bug that can lead to a server crash.eric2016-10-031-1/+3
|
* remove useless #ifndeferic2016-09-141-5/+1
| | | | ok sunil@
* listener configuration cleanup:eric2016-09-121-64/+53
| | | | | | | | | | | | - 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@
* remove documentation for filters, we'll document when it's readygilles2016-09-111-24/+2
|
* Streamline the daemon shutdown sequence.eric2016-09-088-154/+72
| | | | | | | | | Only the parent process handles SIGTERM and SIGINT. Upon receiving one of those, it closes all imsg sockets and waitpid() for the children. It fatal()s if one of the sockets is closed unexpectedly. Other processes exit() "normally" when one of the imsg sockets is closed. ok gilles@ sunil@
* use closefrom() before reexec to make sure the new process only getseric2016-09-061-3/+4
| | | | | | the imsg socket. ok gilles@ sunil@
* The smtpd processes are not expected to ever leave their event loop.eric2016-09-047-27/+21
| | | | | | | So stop pretending that the *_shutdown() functions could ever be called in this context, and just fatal() if event_dispatch() returns. ok gilles@ sunil@ giovanni@
* Remove the "smtpctl stop" command.eric2016-09-045-41/+9
| | | | | | The daemon is stopped with kill(1). ok gilles@
* log IP/hostname for all SMTP operations.giovanni2016-09-032-36/+49
| | | | | patch from Pavel Korovin, thanks ok gilles@
* remove dead codegilles2016-09-031-25/+1
|
* get rid of the type-checking system on internal messages.eric2016-09-034-118/+74
| | | | | | bump all imsg protocol versions since message format changed. ok gilles@ sunil@
* in lka specifically, use initgroups() so that users may share files betweengilles2016-09-031-2/+2
| | | | | | smtpd and another daemon by adding supplementary groups ok eric@
* switch from EVP_{En,De}cryptInit & EVP_{En,De}cryptFinal to their _exgilles2016-09-031-11/+9
| | | | | | counterparts, as suggested by bcook ok bcook@, sunil@, eric@
* use imsg_read_nofd() implementation from bgpd.eric2016-09-021-9/+6
| | | | | | let the caller handle EAGAIN. ok gilles@
* turn server preference for ciphers on by defaultgilles2016-09-021-1/+2
| | | | ok jsing@
* zap dead codeeric2016-09-012-15/+2
| | | | ok gilles@ sunil@
* Get rid of the custom msgbuf_write2() function adapted from libutil.eric2016-09-011-71/+2
| | | | | | It is not necessary now that the profiling code is gone. ok gilles@ sunil@
* remove noop functioneric2016-09-019-22/+9
| | | | ok sunil@
* get rid of the imsg buffer usage profiling code.eric2016-09-014-94/+4
| | | | ok gilles@ jung@ sunil@
* Remove dead code. queue_flow_control() has never been used and iseric2016-08-313-64/+3
| | | | | | probably a bad idea. ok gilles@
* no need for Xo/Xc here, plus minor tweak;jmc2016-08-311-5/+3
|
* introduce "authenticated" parameter so rules may apply to authenticatedgilles2016-08-314-6/+27
| | | | | | sessions specifically ok eric@, sunil@, jung@
* word fix;jmc2016-08-311-2/+2
|
* allow overriding the subaddressing delimiter with subaddressing-delimitergilles2016-08-318-21/+54
| | | | | | keyword, the default is still + ok eric@, sunil@
* when configuring the daemon, assign values to the structure being conf-ed,gilles2016-08-301-2/+2
| | | | | | not the global structure. this worked by accident. ok eric@
* Properly initialize the message parser. fix a regression where theeric2016-08-201-1/+2
| | | | | | message headers would not be altered as expected. ok gilles@
* make smtpd less verbose at startuperic2016-08-191-5/+5
| | | | ok gilles@ sunil@ jung@ millert@
* log ip addresses as well in authentication phasegiovanni2016-07-291-7/+10
| | | | ok gilles@
* bump versiongilles2016-07-241-2/+2
| | | | ok deraadt@
* Create a smtp transaction context on a session only for the duration oferic2016-07-221-99/+79
| | | | | | that transaction. ok gilles@
* add -r option to enqueuer as compat interface for mailxgilles2016-07-031-2/+5
| | | | diff by Richard <richard@aaazen.com>
* remove misleading comment. it's not true anymore.eric2016-07-021-5/+1
| | | | ok gilles@
* datain counter is part of the transaction stateeric2016-07-021-7/+5
| | | | ok gilles@
* set the msgid on the transactioneric2016-07-021-9/+12
| | | | ok gilles@ jung@
* always refer to the helo string stored on the sessioneric2016-07-011-3/+3
| | | | ok gilles@
* flag the local socket listener as local.eric2016-07-012-3/+4
| | | | | | clarify check for local listeners. ok gilles@ millert@
* update aliases documentation to reflect realitygilles2016-06-301-3/+4
|
* Explicitely enclose SMTP transactions between BEGIN and COMMIT/ROLLBACKeric2016-06-293-21/+44
| | | | | | filter events. Bump filter API version. ok gilles@ jung@