summaryrefslogtreecommitdiffstats
path: root/usr.sbin/smtpd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* set TLS SNI when relaying to hostsemarie2020-06-091-1/+22
| | | | | ok beck@ "looks reasonable" millert@
* Run lmtp deliveries as SMTPD_USER instead of the recipient user.chrisz2020-06-012-4/+6
| | | | ok millert@
* Correct getsockname(2)/getpeername(2) usage.millert2020-05-211-7/+11
| | | | | Fixes an uninitialized variable and a potential stack overflow with IPv6 connections. From Leah Neukirchen; OK eric@ deraadt@
* Only allow forkmda() to be called from a local action dispatcher.millert2020-05-061-1/+3
| | | | From gilles@, OK deraadt@ jung@
* In virtual alias context, do not try to match catchall entries foreric2020-04-281-1/+5
| | | | | | | | | | usernames, but only for email addresses. fixes an issue where usernames always expand to the @ wildcard if defined in the virtual alias file. discussed with Gilles Chehade ok millert@
* update filter documentation after protocol changeeric2020-04-251-20/+27
| | | | from Gilles Chehade
* point out that the "junk" filter decision adds the X-Spam headereric2020-04-251-5/+13
| | | | from Ryan Kavanagh
* strip trailing CRs at smtp level rather than io leveleric2020-04-246-10/+25
| | | | ok millert@
* ce examples of "Ar arg Ar arg" with "Ar arg arg" and stop the spread;jmc2020-04-232-13/+13
|
* Check for the dispatcher name in the envelope validation function.eric2020-04-222-11/+5
| | | | | | | Fixes a possible crash and caching issue when manually moving an envelope to the queue with smtpctl discover. ok millert@
* switch email and result fields in mail-from/rcpt-to event reportseric2020-04-171-4/+4
| | | | | | | | and bump protocol version. discussed with jung@, martijn@ and Gilles. ok jung@
* When failing to validate a peer TLS certificate in the MTA due to thebeck2020-04-101-2/+6
| | | | | | | | desired name of the MX not being present in the certificate, log that this is he reason for the failure and the name we couldn't find in the cert. ok millert@ martijn@
* bump smtpd versioneric2020-04-081-2/+2
|
* use CRLF line-ending during the SMTP dialog in the local enqueuereric2020-03-181-17/+18
| | | | ok millert@
* Exit when m_get_string() returns NULL to prevent nullptr dereference intobhe2020-03-171-1/+3
| | | | | | strlen(). ok millert@
* Initialize session.rcptto to NULL before parsing command line optinos.millert2020-03-161-0/+1
| | | | | Otherwise, if neither -r nor -u is specified, it will be used uninitialized. Found by tobhe@; OK tobhe@ deraadt@
* Add missing casts to unsigned char when using ctype(3).millert2020-03-153-6/+6
| | | | From Hiltjo Posthuma
* Rewrite qp_encoded_write.martijn2020-03-081-37/+40
| | | | | | | | | | | | | | | | | Among the fixes are: - Don't count a leading dot, since it's part of smtp and not the message. - Let qp_encoded_write handle line wrappings, since it can do a better job at the bookkeeping than the caller - Make sure a soft linebreak that starts with a dot is escaped for the SMTP-layer - Only encode a space character if it's followed by a hard linebreak, since this is the only case mandated by RFC5321 and it gives a more readable output and saves a few additional bytes. - Fix that we actually limit the encoded linelength to 76 characters as specified in RFC5321. Feedback and OK eric@
* fsqueue_envelope_dump() returns 0 on temporary failure, not -1.millert2020-02-251-3/+2
| | | | | | We should only exit the loop that creates the queue file if we successfully created the file or we've exceeded the max number of tries. From gilles@ based on feedback from Qualys.
* Cast argument of ctype(3) macros to unsigned char, not int.millert2020-02-244-20/+20
| | | | Similar to a diff from Hiltjo Posthum. OK jung@ deraadt@
* Bump version to 6.6.4 for errata and to match -portable.millert2020-02-241-2/+2
|
* Fix two security vulnerabilities discovered by Qualys.millert2020-02-246-23/+47
| | | | | | | An out of bounds read in smtpd allows an attacker to inject arbitrary commands into the envelope file which are then executed as root. Separately, missing privilege revocation in smtpctl allows arbitrary commands to be run with the _smtpq group.
* Standardize argument naming for "sourceaddr" and unify the wording a bit,schwarze2020-02-121-5/+6
| | | | similar to what deraadt@ recently did in other manual pages.
* ORCPT addresses are prefixed with an address type, the stricter check causegilles2020-02-032-3/+7
| | | | | | the prefix to be rejected as it contains a character not allowed in address reported by Scott Vanderbilt
* now that mail.local(8) relies on lockspool(1) for mailbox locking, have thegilles2020-02-034-8/+41
| | | | | | | mailbox created by smtpd for mbox before privileges are dropped then we can call mail.local(8) with the recipient privileges. ok millert@
* add SENDER to mda environment and teach lmtp to use that instead of commandgilles2020-02-023-10/+32
| | | | | | | 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@
* be much stricter about ORCPT, it isn't in the code path of local deliverygilles2020-02-011-2/+4
| | | | | | and doesn't have an associated context variable, but let's be paranoid. ok millert@
* condition to enter mda_mbox() is too strict, if user have commands in theirgilles2020-02-011-2/+4
| | | | forward file they're not supposed to enter that code path.
* introduce mda_mbox() to handle mbox delivery in its own code path, and makegilles2020-01-316-11/+84
| | | | | | | it use execle() since we know all parameters and don't need command line to be parsed. ok millert@ and jung@
* Bump smtpd version after recent changessolene2020-01-301-2/+2
| | | | ok gilles@
* Fix a security vulnerability discovered by Qualys which can lead to agilles2020-01-281-16/+14
| | | | | | | | privileges escalation on mbox deliveries and unprivileged code execution on lmtp deliveries, due to a logic issue causing a sanity check to be missed. ok eric@, millert@
* opportunistic tls downgrade logic is more complex than it should and can ingilles2020-01-201-26/+6
| | | | | | | some cases lead to a sanity check fatal() being hit. rework the logic so it is simpler and makes the sanity check fatal() unreachable. ok eric@ millert@
* remove literal tab from a column list;jmc2020-01-081-2/+2
|
* allow using the session username in builtin filters when availablegilles2020-01-084-8/+116
|
* enable builtin filtering for commit phasegilles2020-01-081-2/+9
|
* emable builtin filtering for phase DATA, no idea why we didn't earlier asgilles2020-01-081-2/+9
| | | | the grammar allowed it and the code was already there.
* reorder reporting events so they are triggered _after_ protocol-servergilles2020-01-082-18/+14
| | | | | events. this ensures that both smtp-in and smtp-out receive the events in the same order.
* generate tx-envelope before tx-rcpt like for smtp-ingilles2020-01-071-3/+3
|
* fix reporting of tx-mail and tx-rcpt for smtp-outgilles2020-01-073-26/+29
|
* generate link-auth reporting event for outgoing sessionsgilles2020-01-071-5/+19
|
* make it more explicit that filters are unique processesgilles2020-01-061-3/+3
|
* do not allow passing options to smtpctl encryptgilles2020-01-061-2/+2
|
* provide a better error message for invalid smtpctl commandsgilles2020-01-061-1/+6
|
* upon return of authentication we log the username and generate an smtp-ingilles2020-01-031-2/+2
| | | | | | | report for the authentication result, however we use a buffer that is too small and usernames from virtual accounts may get truncated in logs. reported by Bjorn Kalkbrenner
* upon connect to remote host extract hostname from banner when possible thengilles2019-12-211-5/+12
| | | | generate link-greeting smtp-out report event
* if a filter was attached to a relay action in config, notify instance thatgilles2019-12-211-1/+3
| | | | it can register smtp-out events
* start bringing smtp-out reporting code, lacks some events stillgilles2019-12-213-7/+366
|
* add FILTER_SUBSYSTEM_SMTP_OUT to filter_subsystem enum and add filter namegilles2019-12-211-2/+5
| | | | to struct dispatcher_remote, this will reduce the smtp-out reporting diff
* keep track of DATA length in mta_session, will be needed for smtp-outgilles2019-12-211-3/+7
| | | | reporting
* keep track of the relay action in relays, will be used for smtp-outgilles2019-12-211-1/+2
| | | | reporting