#include "hostpid.h"
#include "net.h"
#include "iostream.h"
+#include "iostream-rawlog.h"
#include "istream.h"
#include "ostream.h"
#include "time-util.h"
client->notify_count_changes = TRUE;
client->notify_flag_changes = TRUE;
+ if (set->rawlog_dir[0] != '\0') {
+ (void)iostream_rawlog_create(set->rawlog_dir, &client->input,
+ &client->output);
+ }
+
mail_namespaces_set_storage_callbacks(user->namespaces,
&mail_storage_callbacks, client);
static const struct setting_define imap_setting_defines[] = {
DEF(SET_BOOL, verbose_proctitle),
+ DEF(SET_STR_VARS, rawlog_dir),
DEF(SET_SIZE, imap_max_line_length),
DEF(SET_TIME, imap_idle_notify_interval),
static const struct imap_settings imap_default_settings = {
.verbose_proctitle = FALSE,
+ .rawlog_dir = "",
/* RFC-2683 recommends at least 8000 bytes. Some clients however don't
break large message sets to multiple commands, so we're pretty
struct imap_settings {
bool verbose_proctitle;
+ const char *rawlog_dir;
/* imap: */
uoff_t imap_max_line_length;
#include "iostream.h"
#include "istream.h"
#include "ostream.h"
+#include "iostream-rawlog.h"
#include "crc32.h"
#include "str.h"
#include "llist.h"
o_stream_set_no_error_handling(client->output, TRUE);
o_stream_set_flush_callback(client->output, client_output, client);
+ if (set->rawlog_dir[0] != '\0') {
+ (void)iostream_rawlog_create(set->rawlog_dir, &client->input,
+ &client->output);
+ }
+
p_array_init(&client->module_contexts, client->pool, 5);
client->io = io_add_istream(client->input, client_input, client);
client->last_input = ioloop_time;
static const struct setting_define pop3_setting_defines[] = {
DEF(SET_BOOL, verbose_proctitle),
+ DEF(SET_STR_VARS, rawlog_dir),
DEF(SET_BOOL, pop3_no_flag_updates),
DEF(SET_BOOL, pop3_enable_last),
static const struct pop3_settings pop3_default_settings = {
.verbose_proctitle = FALSE,
+ .rawlog_dir = "",
.pop3_no_flag_updates = FALSE,
.pop3_enable_last = FALSE,
struct pop3_settings {
bool verbose_proctitle;
+ const char *rawlog_dir;
/* pop3: */
bool pop3_no_flag_updates;