/* Copyright (c) 2006-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "ioloop.h"
#include "array.h"
#include "str.h"
#include "istream.h"
#include "ostream.h"
#include "iostream-temp.h"
#include "iostream-ssl.h"
#include "master-service.h"
#include "program-client.h"
#include "smtp-client.h"
#include "smtp-client-connection.h"
#include "smtp-client-transaction.h"
#include "smtp-submit.h"
#include <unistd.h>
#include <sysexits.h>
#include <signal.h>
struct smtp_submit_session {
};
struct smtp_submit {
int status;
const char *error;
void *context;
};
struct smtp_submit_session *
const struct ssl_iostream_settings *ssl_set)
{
return session;
}
{
}
struct smtp_submit *
const struct smtp_address *mail_from)
{
return subm;
}
struct smtp_submit *
const struct ssl_iostream_settings *ssl_set,
const struct smtp_address *mail_from)
{
return subm;
}
{
}
const struct smtp_address *rcpt_to)
{
}
{
(t_strconcat("/tmp/dovecot.",
}
static void
const char *error)
{
}
static void
{
}
static void
const char *error)
{
}
static void
{
return;
"smtp(%s): %s",
}
static void
{
return;
}
static void
{
}
static bool
{
return (smtp_reply_is_temp_fail(reply) ||
}
static void
struct smtp_submit *subm)
{
if (!smtp_reply_is_success(reply)) {
t_strdup_printf("RCPT TO failed: %s",
smtp_reply_log(reply)));
}
}
static void
struct smtp_submit *subm)
{
if (!smtp_reply_is_success(reply)) {
t_strdup_printf("DATA failed: %s",
smtp_reply_log(reply)));
return;
}
}
static void
{
/* nothing */
}
static void
{
const char *host;
"Invalid submission_host: %s", host));
return;
}
}
}
}
static void
{
if (status < 0) {
"Failed to execute sendmail");
return;
}
if (status == 0) {
"Sendmail program returned error");
return;
}
}
static void
{
unsigned int i;
sendmail_bin = sendmail_args[0];
}
}
struct smtp_submit_run_context {
int status;
char *error;
};
static void
struct smtp_submit_run_context *rctx)
{
}
const char **error_r)
{
ioloop = io_loop_create();
if (io_loop_is_running(ioloop))
else {
}
}
{
/* the mail has been written to a file. now actually send it. */
} else {
}
}