/* Copyright (c) 2013-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "str.h"
#include "safe-mkstemp.h"
#include "mail-user.h"
#include "mail-storage-private.h"
#include "istream.h"
#include "istream-seekable.h"
#include "istream-ext-filter.h"
#include "ostream-ext-filter.h"
#include "mail-filter-plugin.h"
/* After buffer grows larger than this, create a temporary file to /tmp
where to read the mail. */
struct mail_filter_user {
};
static int
{
return -1;
return 0;
}
{
int fd;
if (fd == -1) {
return -1;
}
/* we just want the fd, unlink it */
/* shouldn't happen.. */
i_close_fd(&fd);
return -1;
}
return fd;
}
static int
{
i_stream_unref(&inputs[0]);
}
{
if ((class_flags & MAIL_STORAGE_CLASS_FLAG_OPEN_STREAMS) == 0 &&
(class_flags & MAIL_STORAGE_CLASS_FLAG_BINARY_DATA) != 0 &&
}
{
}
static void
const char **socket_path_r, const char **args_r)
{
const char *value, *p;
return;
if (p == NULL) {
*args_r = "";
} else {
}
if (**socket_path_r != '/') {
/* relative to base_dir */
}
if (user->mail_debug) {
i_debug("mail_filter: Filtering %s via socket %s",
name, *socket_path_r);
}
}
{
i_debug("mail_filter and mail_filter_out settings missing, "
"ignoring mail_filter plugin");
}
}
};
{
}
void mail_filter_plugin_deinit(void)
{
}