summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/smtpd.c
diff options
context:
space:
mode:
authorCharles Longeau <chl@cvs.openbsd.org>2012-08-25 23:35:10 +0000
committerCharles Longeau <chl@cvs.openbsd.org>2012-08-25 23:35:10 +0000
commit04b0d16fcd5086e7220b1bcb4d14c77855a23238 (patch)
tree9b78accae290b06eb1abb504924b363bd0a6d4e3 /usr.sbin/smtpd/smtpd.c
parentf306d139dbf080f0221fe7bae15fed27738ebd01 (diff)
Add compress_backend, allowing compression of messages and envelopes in the 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@
Diffstat (limited to 'usr.sbin/smtpd/smtpd.c')
-rw-r--r--usr.sbin/smtpd/smtpd.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/smtpd.c b/usr.sbin/smtpd/smtpd.c
index 6ff6dd273b5..ac2e94d4d9d 100644
--- a/usr.sbin/smtpd/smtpd.c
+++ b/usr.sbin/smtpd/smtpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpd.c,v 1.163 2012/08/25 15:39:11 gilles Exp $ */
+/* $OpenBSD: smtpd.c,v 1.164 2012/08/25 23:35:09 chl Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -575,6 +575,14 @@ main(int argc, char *argv[])
if (env->sc_stat == NULL)
errx(1, "could not find stat backend \"%s\"", backend_stat);
+ if (env->sc_queue_compress_algo) {
+ env->sc_compress =
+ compress_backend_lookup(env->sc_queue_compress_algo);
+ if (env->sc_queue == NULL)
+ errx(1, "could not find queue compress backend \"%s\"",
+ env->sc_queue_compress_algo);
+ }
+
log_init(debug);
log_verbose(verbose);