summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd
AgeCommit message (Collapse)Author
2021-02-13readability fix; from larry hynesJason McIntyre
2021-02-13comma swap; from larry hynesJason McIntyre
2021-01-27mark up fixes; from lyndonJason McIntyre
2021-01-27makemap does not need a common which it does not use.Theo de Raadt
2021-01-23Remove unused variables found by clang. Additional unused var spotted by eric@.rob
OK mvs@, eric@
2021-01-19Do the KAME embedded scope fixup in the two places where getifaddrs() isClaudio Jeker
used. With this there should be no more embedded scopes left and therefor in6addr_to_text() can be removed. getnameinfo() will just do the right thing now. OK eric@
2020-12-31Rename the pony process to dispatcher and klondike to crypto.Martijn van Duren
From gilles@ OK millert@ giovanni@
2020-12-29sync usage() with SYNOPSIS; the -S option remainsJason McIntyre
undocumented, at least for now;
2020-12-23smtpd's filter state machine can prematurely release resourcesTodd C. Miller
leading to a crash. From gilles@
2020-12-23Fix a memory leak: use a single memory allocation for struct addrinfo andEric Faurot
the sockaddr it contains, as expected by freeaddrinfo(). Move the allocation to a helper function for clarity. comments from martijn@ millert@ ok millert@
2020-12-23Use regfree after we're done with preg.Martijn van Duren
From gilles@
2020-12-21The plumbing already allowed for smtp authentication, hook it up to the -aMartijn van Duren
flag. Manpage order feedback jmc@ OK eric@
2020-12-21Use NI_NUMERICSERV. We don't use the result and it's faster and is aMartijn van Duren
workaround for the memory-leak in asr. smtp_session part from eric@ OK eric@ gilles@
2020-12-20Onlly call event_del if there are events enabled, since not all libeventsMartijn van Duren
are created equal. From gilles@
2020-12-20Free filter_name in lka_filter_endMartijn van Duren
From gilles@ OK millert@ eric@
2020-11-29Sync bsnprintf() with ldapd/util.c r1.13Theo Buehler
Pointed out by jmatthew and requested by florian.
2020-11-20partially revert revision 1.423 which went a bit too farJoerg Jung
slightly relax the ORCPT check by not enforcing that a domain is required, allowing e.g.: ORCPT=rfc822;root originally reported via github issue #1084 by Leo Gaspard with input from gilles ok kn
2020-09-23Revert agentx support for now, we're too close to release.Martijn van Duren
requested by deraadt@
2020-09-23Add support for agentx to smtpd.Martijn van Duren
This is based around NETWORK-SERVICES-MIB from RFC2788 and MTA-MIB from RFC2789, but does not export the full spec. Hopefully this will expand in the future. People who want to use this against net-snmp (currently the only option known to me at the time of writing) may want to add -I -mta_sendmail to the flags, so net-snmp doesn't throw garbage into the mib-2.28 subtree.
2020-09-22Allow handling long lines in an aliases table.Martijn van Duren
Pointed out by AIsha Tammy (openbsd <dot> bugs <at> aisha <dot> cc) Original diff by Edgar Pettijohn (edgar <at> pettijohn-web <dot> com) OK tb@
2020-09-16Add the admd keyword. This can be used by filters interested in theMartijn van Duren
Authentication-Results header. OK giovanni@
2020-09-14Fix handling of user names containing '@' symbols.Todd C. Miller
It is possible to have a user name of the form foo@bar in the URL. When splitting user name from host name, split at the last '@', not the first one. From Josh Rickmar
2020-09-14Document "pki" option for relay delivery too; from Nick GassonTodd C. Miller
OK jmc@ martijn@
2020-09-14All buffers are in rw-memory, but lookup_record has it defined asMartijn van Duren
const char *. Remove the const so things compile a little cleaner. Pointer out by Mark Patruck <mark <at> wrapped <dot> cx>. Thanks
2020-09-14Make "spf walk" report if an spf-record has macro's and can't be resolved.Martijn van Duren
Originally reported by and OK on earlier version giovanni@ Looks good to deraadt@ feedback and OK jmc@ feedback semarie@ OK sthen@
2020-08-27add missing "regex" keyword; from heddi nabbisenJason McIntyre
ok martijn
2020-06-09set TLS SNI when relaying to hostSebastien Marie
ok beck@ "looks reasonable" millert@
2020-06-01Run lmtp deliveries as SMTPD_USER instead of the recipient user.Christopher Zimmermann
ok millert@
2020-05-21Correct getsockname(2)/getpeername(2) usage.Todd C. Miller
Fixes an uninitialized variable and a potential stack overflow with IPv6 connections. From Leah Neukirchen; OK eric@ deraadt@
2020-05-06Only allow forkmda() to be called from a local action dispatcher.Todd C. Miller
From gilles@, OK deraadt@ jung@
2020-04-28In virtual alias context, do not try to match catchall entries forEric Faurot
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@
2020-04-25update filter documentation after protocol changeEric Faurot
from Gilles Chehade
2020-04-25point out that the "junk" filter decision adds the X-Spam headerEric Faurot
from Ryan Kavanagh
2020-04-24strip trailing CRs at smtp level rather than io levelEric Faurot
ok millert@
2020-04-23 ce examples of "Ar arg Ar arg" with "Ar arg arg" and stop the spread;Jason McIntyre
2020-04-22Check for the dispatcher name in the envelope validation function.Eric Faurot
Fixes a possible crash and caching issue when manually moving an envelope to the queue with smtpctl discover. ok millert@
2020-04-17switch email and result fields in mail-from/rcpt-to event reportsEric Faurot
and bump protocol version. discussed with jung@, martijn@ and Gilles. ok jung@
2020-04-10When failing to validate a peer TLS certificate in the MTA due to theBob Beck
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@
2020-04-08bump smtpd versionEric Faurot
2020-03-18use CRLF line-ending during the SMTP dialog in the local enqueuerEric Faurot
ok millert@
2020-03-17Exit when m_get_string() returns NULL to prevent nullptr dereference intobhe
strlen(). ok millert@
2020-03-16Initialize session.rcptto to NULL before parsing command line optinos.Todd C. Miller
Otherwise, if neither -r nor -u is specified, it will be used uninitialized. Found by tobhe@; OK tobhe@ deraadt@
2020-03-15Add missing casts to unsigned char when using ctype(3).Todd C. Miller
From Hiltjo Posthuma
2020-03-08Rewrite qp_encoded_write.Martijn van Duren
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@
2020-02-25fsqueue_envelope_dump() returns 0 on temporary failure, not -1.Todd C. Miller
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.
2020-02-24Cast argument of ctype(3) macros to unsigned char, not int.Todd C. Miller
Similar to a diff from Hiltjo Posthum. OK jung@ deraadt@
2020-02-24Bump version to 6.6.4 for errata and to match -portable.Todd C. Miller
2020-02-24Fix two security vulnerabilities discovered by Qualys.Todd C. Miller
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.
2020-02-12Standardize argument naming for "sourceaddr" and unify the wording a bit,Ingo Schwarze
similar to what deraadt@ recently did in other manual pages.
2020-02-03ORCPT addresses are prefixed with an address type, the stricter check causeGilles Chehade
the prefix to be rejected as it contains a character not allowed in address reported by Scott Vanderbilt