summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/smtpctl
AgeCommit message (Collapse)Author
2012-09-01- remove crypto_backendGilles Chehade
- remove support for encrypted queue, it will be reintroduced later after pouring more thinking into it if you had it enabled, flush your queue before updating
2012-08-29Introduce the crypto_backend API and provide support for... encrypted queueGilles Chehade
using the new API. By default, OpenSMTPD does not provide queue encryption, but it can be enabled with "queue encryption [args]" and will transparently encrypt/decrypt envelopes/messages as they hit the queue. By default, it will use Blowfish in CBC mode with a different random IV for each envelope and message. User provided key is expanded using sha256 but a different cipher and digest may be specified in smtpd.conf Queue encryption is compatible with compression and if both options are set it will do them in correct order and transparently. tested by chl@, a few users and myself ok chl@ and I
2012-08-26missing DPADD ... sorryGilles Chehade
2012-08-26- use the same compression algorithm, gzip, for message file and envelopesGilles Chehade
- rename compress_zlib.c to compress_gzip.c with this commit it is possible to inspect a compressed queue with gzcat :)
2012-08-25Add compress_backend, allowing compression of messages and envelopes in the ↵Charles Longeau
queue. To use it, just add "queue compress" in smtpd.conf. For now, only zlib is used. lots of feedback from eric@ and gilles@ ok eric@ gilles@
2012-08-18- introduce stat_backend, an API for pluggable statistic backendsGilles Chehade
> statistics are no longer static structures in shared memory > statistics are only set, smtpd never uses them in its logic > each statistic is a key/value where key can be any (dynamic) string - convert all uses of the former API to use the new one - implement stat_ramstat that keeps non-persistent stats in ram structure ok eric@, ok chl@
2012-01-11implement an envelope_ascii API that's not tied to a specific queue_backendGilles Chehade
simplify queue_fsqueue
2011-12-14move show_queue() and related functions from queue_shared.cEric Faurot
to smtpctl.c ok gilles@
2011-11-02simpler implementation of smtpctl local enqueuer that does not need libevent.Eric Faurot
ok gilles@
2011-10-23fsqueue no longer stores envelopes by dumping the structure, instead use aGilles Chehade
couple of load/dump functions to convert to and from a human readable fmt. while at it kill struct delivery and merge back its fields to the envelope. this basically means we shouldn't require users to flush their queues every time we make a change to struct envelope. work is not done, but we're at a better state than the binary fsqueue so we'll improve it in-tree. has been running on my own box for the last 12 hours or so ok eric@, chl@
2011-09-01Introduce a small set of functions to manage stat counters in aEric Faurot
simpler and hopefully saner way. ok gilles@ chl@
2011-04-14fsqueue queue backend will implement a filesystem queue:Gilles Chehade
- fsqueue->setup() performs the queue initialization; - fsqueue->message() controls messages; - fsqueue->envelope() controls envelopes; This commit brings the following to fsbackend: fsqueue_setup(), fsqueue_message_delete(), fsqueue_envelope_load(), fsqueue_envelope_update(), fsqueue_envelope_delete(). It also makes smtpd use the queue_backend API for these operations.
2010-10-09backout the "new" queue code commited 4 months ago. it has many good ideas,Gilles Chehade
is way more optimized than what we had earlier and there's definitely stuff we want to keep, however it is early optimization that doesn't account for many features and makes them hard (if not impossible) to write without ugly workarounds that ruin the purpose of the optimizations. the backout goes to 30 May's right before the commit and catches up on all the non-queue related commits that happened since then. i'll work on reintroducing the ideas from this queue when the basic features we expect from a MTA are implemented. suggested on tech@ about a week ago, no objections, several "please make smtpd move forward" mails from hackers and tech readers.
2010-06-01new queue, again; gcc2 compile tested by deraadtJacek Masiulaniec
2010-06-01New queue doesn't compile on gcc2, back out. Spotted by deraadt@Jacek Masiulaniec
2010-05-31Rewrite entire queue code.Jacek Masiulaniec
Major goals: 1) Fix bad performance caused by the runner process doing full queue read in 1s intervals. My Soekris can now happily accept >50 msg/s while having multi-thousand queue; before, one hundred queue would bring the system to its knees. 2) Introduce Qmail-like scheduler that doesn't write as much to the disk so that it needs less code for servicing error conditions, which in some places can be tricky to get right. 3) Introduce separation between the scheduler and the backend; these two queue aspects shouldn't be too tied too each other. This means that eg. storing queue in SQL requires rewrite of just queue_backend.c. 4) Make on-disk queue format architecture independent, and more easily extensible, to reduce number of flag days in the future. Minor goals: ENOSPC no longer prevents delivery attempts, fixed session limiting for relayed mail, improved batching of "relay via" mails, human-readable mailq output, "show queue raw" command, clearer logging, sending of single bounce about multiple recipients, exact delay= computation, zero delay between deliveries while within session limit (currently 1s delay between re-scheduling is enforced), mta no longer requests content fd, corrected session limit for bounce submissions, tiny <100B queue files instead of multi-KB, detect loops before accepting mail, reduce traffic on imsg channels by killing enormous struct submit_status.
2010-05-26Move imsg into libutil and add a man page.Nicholas Marriott
Minor bump for libutil. Previous versions of this diff and man page looked at by various people. "you should just commit" deraadt
2009-12-23Implementation of RFC 2920 PIPELINING extension, client side only for now.Jacek Masiulaniec
This restructures the client_* API internals significantly. The code becomes pipelining in nature. All SMTP commands are put on the output queue and dequeued as quickly as possible. Once dequeued, they're moved to the receive queue so that replies can be matched with previous commands. Dequeuing commands from the output queue halts when the count of commands currently in-pipeline (``cmdi'') is equal to the command send window (``cmdw''). There are three cmdw values useful in practice: 0 clear pipeline, ie. inhibit all future sends 1 disable pipelining, ie. use old ``one-request-one-reply`` mode SIZE_T_MAX enable pipelining, ie. dequeue as many commands as possible At the beginning of session cmdw is 1. When it is found that peer supports PIPELINING, it grows to SIZE_T_MAX. After dequeing DATA it is again 1. After sending QUIT it is 0. Each command dequeued from the output queue becomes a buf in a msgbuf. The act of combining multiple commands into a single send operation did not need to be implemented: buf_write() already combines bufs using iovec and sends them at once using sendmsg(2). Tested by todd@ and oga@ "looks good" to gilles@
2009-09-15Extend SMTP client_* API to support SSL+AUTH, and use it in the mtaJacek Masiulaniec
process to relay mails. ok gilles@
2009-08-27Implement client side of the SMTP protocol in a library-like module.Jacek Masiulaniec
Make bounce code and /usr/sbin/sendmail interface use this new API. The mta process continues to use its own implementation, but eventually will be switched to use this shared module. Buffer routines are taken from buffer.c rather than from evbuffer. This is one step forward to using a single buffer API across the program. "it looks sexy" gilles@
2009-03-23repair library use. this was detected on the vax, a nice static linkingTheo de Raadt
architecture. it was silently creating broken code on other architectures.
2009-03-16smtpctl goes to usr.sbin; ok gilles@Jacek Masiulaniec
2009-01-29Common queue walking code for smtpd and smtpctl. Kills majority of showqueue.c,Jacek Masiulaniec
the remaining code was moved to queue_shared.c; ok gilles@
2009-01-27follow the naming convention of other files, discussed with jacekm@Gilles Chehade
2009-01-27first bricks of enqueue code which allows smtpctl to submit mail to queueGilles Chehade
without "talking" smtp to listeners. currently, a big part of the server side code is done (and requires a cleanup), next step is to get it usable properly from a mail user agent.
2008-12-21Add more compile time checking; fix warnings reported by gcc.Jacek Masiulaniec
From: Nicholas Marriott <nicholas.marriott@gmail.com>
2008-12-06- teach smtpctl how to inspect queue and runqueue, it supports two commandsGilles Chehade
`showqueue' which displays the content of the queue (all envelopes) `showrunqueue` which displays envelopes scheduled for delivery. The utility will be improved and extended, but for now we need at least this basic support to help debug queue-related issues. Output format is spamdb-alike: type|envelope uid|sender|recipient|last delivery date|retry count ok jacek@
2008-12-05- smtpctl utility to control the smtpd, don't expect too much yet as it isGilles Chehade
just an empty clone of relayctl with the glue needed to have it exchange imsg with smtpd correctly. code mostly by pyr@, reviewed by chl@ and I a while ago.