summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd
AgeCommit message (Collapse)Author
2019-07-10obfuscate auth parameters in smtp reportingGilles Chehade
2019-07-09rework link-connect output so that messages enqueued over the unix socketGilles Chehade
no longer display "local:0" as their source and dest addresses, but "unix:/var/run/smtpd.sock" currently we only support enqueueing over the control socket but that may not always be the case.
2019-07-03snprintf/vsnprintf return < 0 on error, rather than -1.Theo de Raadt
2019-07-02Replace mkstemp/fdopen/unlink dances with tmpfile.Martijn van Duren
No functional change. OK gilles@
2019-07-01The proceed reply doesn't have a parameter, resulting in subsequent filtersMartijn van Duren
in a chain to receive a "(null)" parameter. Fix this by storing the current parameter in the session. Found the hard way and fix tested by Mischa Peters. OK gilles@
2019-06-28When system calls indicate an error they return -1, not some arbitraryTheo de Raadt
value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
2019-06-28switch timestamps to use timevals in filters like we do in reportingGilles Chehade
2019-06-28mkstemp() returns -1 on failureTheo de Raadt
2019-06-27Move the check wether line is NULL above further accesses of it.Matthias Kilian
ok gilles@
2019-06-27Allow filters to log information through stderr. This simplifies andMartijn van Duren
unifies the way filters need to get their logging to the right location. Log-messages are read line by line and are logged at LOG_ERR level via the lookup process. OK gilles@
2019-06-26reject DATA containing <CR> that's not part of <CRLF> line terminatorsGilles Chehade
as they are not allowed by RFC, have never been generated by a regular MUA/MTA and can cause issues with some filters if we let them through. ok jung@ on an earlier version of the diff, eric@ suggested the new diff
2019-06-24rename wait queuesGilles Chehade
2019-06-14simplify the runq interface:Eric Faurot
- remove (unused) per-job callback - rename runq_schedule() to runq_schedule_at() and runq_delay() to runq_schedule() - remove unused runq_next() ok sunil@ gilles@
2019-06-13extend the resolver interface to delegate res_query() calls to the lka.Eric Faurot
ok gilles@ sunil@
2019-06-12change "ssl" to "tls" in various identifiers.Eric Faurot
no functional change. ok gilles@
2019-06-05assume RSA_METHOD is opaque and only access members through setters/gettersGilles Chehade
2019-06-05a long long time ago, in a galaxy quite close actually, reyk@ introduced anGilles Chehade
RSA privsep engine to isolate private keys in the ca process. ECDSA support in smtpd is become a frequent request so here's an ECDSA privsep engine and the code required for smtpd to load ECDSA certificates and use them.
2019-05-24switch from having automatic EVP_CIPHER_CTX variables to allocating themGilles Chehade
with EVP_CIPHER_CTX_new() and releasing them with EVP_CIPHER_CTX_free(). ok sunil@ and millert@
2019-05-24ERR_R_SSL_LIB is defined to ERR_LIB_SSL which works for both LibreSSL andGilles Chehade
OpenSSL, so use that one instead to reduce delta in portable branch
2019-05-24assume X509_STORE_CTX is opaque, don't access ->error but use theGilles Chehade
X509_STORE_CTX_get_error() function instead
2019-05-24mechanical change to dynamically allocate rsae_methodGilles Chehade
2019-05-24fix typo in fatal message to -> tooGilles Chehade
2019-05-24remove useless check, it's never been and will never be hitGilles Chehade
2019-05-21Use malloc_ and calloc_conceal() to allocate memory for sensitive,Otto Moerbeek
private key data. We leave the corresponding freezero() calls since the code might be ported to a system not having the conceal functions. This also makes sure the stdio bufer is concealed. And zap a redundant free(buf); ok gilles@
2019-05-20rev 1.219 of the file was a fix to an LMTP issue that was misunderstood. weGilles Chehade
fixed the root cause in mda_variables.c months ago independantely but we're still carrying this diff which is not only unnecessary now, but is also the cause of a bug with mailer-daemons going through an LMTP mda. issue reported by otto@
2019-05-15do not use CRLF when passing data lines to filters.Eric Faurot
ok gilles@
2019-05-15normalize newlines when reading the messageEric Faurot
spotted by martijn@ ok martijn@ gilles@
2019-05-14fix typos in log messagesEric Faurot
2019-05-02Give filter programmers a more friendlier error message when returning aMartijn van Duren
filter-dataline in non-dataline phases and vice versa instead of crashing with "smtpd: tree_xpop(0x1e1a6b180b40, 0xc77804c6ba110977)" OK gilles@
2019-04-08remove unused declarationsEric Faurot
ok gilles@
2019-04-08fix parsing of datalines before passing them to filters, the | splitting isGilles Chehade
done a bit too early diff from Martijn van Duren <openbsd+tech@list.imperialat.at>
2019-03-31Avoid calling dup2(oldd, newd) when oldd == newd. In that case theYASUOKA Masahiko
descriptor keeps CLOEXEC flag then it will be closed unexpectedly by exec(). ok tedu florian
2019-02-28bump smtpd versionEric Faurot
on behalf of gilles@
2019-02-20fix a regression in the 'hostnames' mapping to select hostname based on theGilles Chehade
IP address of a listener, it should use the listener address not the client address as a selector, otherwise it will always display the default name if you don't connect from the local host.
2019-02-13(unsigned) means (unsigned int) which on ptrdiff_t or size_t or otherTheo de Raadt
larger types really is a range reduction... Almost any cast to (unsigned) is a bug. ok millert tb benno
2019-02-06in SMTP status, display rcpt address in errors happening at RCPT levelGilles Chehade
ok millert@, sunil@
2019-01-30missed in previous revert, function not called anymoreGilles Chehade
2019-01-30revert previous commit, i wasn't happy with it and it probably came from aGilles Chehade
misunderstanding.
2019-01-30don't be too strict with .forward permissions, it's ok to process it if theGilles Chehade
group has write access, it's not ok if the world has write access. ok eric@
2019-01-30Check ferror(3) on the right stream.Sunil Nimmagadda
Ok gilles@
2019-01-29strip \r from lmtp responsesGilles Chehade
ok sunil@
2019-01-21While using buffered stdio over a socket, fflush(3) command beforeSunil Nimmagadda
reading the response. Ok eric@ jung@
2019-01-15Swap 'token' and 'id' place in filter protocol.Sunil Nimmagadda
This allows to consistently extract 'id' from both 'report' and 'filter' lines. Ok gilles@ jung@
2019-01-14correctly retrieve envelope strings. fixes mailq output.Eric Faurot
ok gilles@
2019-01-10report errno in debug logs and other minor cleanups.Eric Faurot
ok gilles@
2019-01-05we assumed that there was no such thing as an "mda session" so the logsGilles Chehade
displayed 0000000000000000 as the session id for mda deliveries, but we were wrong. there's actually an identifier that's associated to a batch of envelopes to be delivered to the same user, and this most definitely is a session id for that user.
2019-01-05revert this change, it was committed by accidentGilles Chehade
2019-01-05introduce smtp 'timeout' reporting event to notify filters that a timeoutGilles Chehade
occured during the smtp session
2019-01-05move the DATA bytes accounting a bit earlier so that we don't have to dealGilles Chehade
with it using special cases for when filters are enabled or not.
2019-01-03be less verbose on resolver "errors", only log_warnx() real errors and notGilles Chehade
EAI_NODATA / EAI_NONAME in cases where these are expected and already part of a log line. ok eric@