mail-send.c revision 3a61b68f1b3166e6f63dcd5d7d996133e6571c5b
/* Copyright (c) 2005-2014 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "ioloop.h"
#include "hostpid.h"
#include "istream.h"
#include "ostream.h"
#include "str.h"
#include "str-sanitize.h"
#include "var-expand.h"
#include "message-date.h"
#include "message-size.h"
#include "istream-header-filter.h"
#include "mail-storage.h"
#include "mail-storage-settings.h"
#include "lda-settings.h"
#include "mail-deliver.h"
#include "smtp-client.h"
#include "mail-send.h"
#include <stdlib.h>
int global_outgoing_count = 0;
static const struct var_expand_table *
const char *recipient)
{
static struct var_expand_table static_tab[] = {
};
struct var_expand_table *tab;
const char *subject;
subject = "";
return tab;
}
const char *reason)
{
struct smtp_client *smtp_client;
const char *return_addr, *hdr;
int ret;
orig_msgid = NULL;
i_info("msgid=%s: Auto-submitted message discarded: %s",
return 0;
}
if (return_addr == NULL) {
i_info("msgid=%s: Return-Path missing, rejection reason: %s",
return 0;
}
}
"\tboundary=\"%s\"\r\n",
boundary);
/* human readable status report */
/* DSN status report: For LDA rejects. currently only used when
user is out of quota */
"Content-Type: message/delivery-status\r\n\r\n",
boundary);
} else {
/* MDN status report: For Sieve "reject" */
"Content-Type: message/disposition-notification\r\n\r\n",
boundary);
if (orig_msgid != NULL)
"automatic-action/MDN-sent-automatically; deleted\r\n");
}
/* original message's headers */
/* Note: If you add more headers, they need to be sorted.
We'll drop Content-Type because we're not including the message
body, and having a multipart Content-Type may confuse some
MIME parsers when they don't see the message boundaries. */
static const char *const exclude_headers[] = {
"Content-Type"
};
*null_header_filter_callback, (void *)NULL);
}
str_truncate(str, 0);
return smtp_client_close(smtp_client);
}