dovecot-1.2: deliver: Don't send rejects to any messages that ha...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Sep 2 06:11:17 EEST 2009
details: http://hg.dovecot.org/dovecot-1.2/rev/cd48e01ff2a1
changeset: 9355:cd48e01ff2a1
user: Timo Sirainen <tss at iki.fi>
date: Tue Sep 01 23:11:06 2009 -0400
description:
deliver: Don't send rejects to any messages that have Auto-Submitted header.
diffstat:
1 file changed, 9 insertions(+), 1 deletion(-)
src/deliver/mail-send.c | 10 +++++++++-
diffs (23 lines):
diff -r 687ac828b964 -r cd48e01ff2a1 src/deliver/mail-send.c
--- a/src/deliver/mail-send.c Tue Sep 01 13:05:03 2009 -0400
+++ b/src/deliver/mail-send.c Tue Sep 01 23:11:06 2009 -0400
@@ -56,10 +56,18 @@ int mail_send_rejection(struct mail *mai
struct message_size hdr_size;
const char *return_addr, *hdr;
const unsigned char *data;
- const char *msgid, *orig_msgid, *boundary;
+ const char *value, *msgid, *orig_msgid, *boundary;
string_t *str;
size_t size;
int ret;
+
+ if (mail_get_first_header(mail, "Auto-Submitted", &value) > 0 &&
+ strcasecmp(value, "no") != 0) {
+ i_info("msgid=%s: Auto-submitted message discarded: %s",
+ orig_msgid == NULL ? "" : str_sanitize(orig_msgid, 80),
+ str_sanitize(reason, 512));
+ return 0;
+ }
if (mail_get_first_header(mail, "Message-ID", &orig_msgid) < 0)
orig_msgid = NULL;
More information about the dovecot-cvs
mailing list