dovecot-2.0: lda: Don't send rejects to any messages that have A...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Sep 2 06:13:11 EEST 2009
details: http://hg.dovecot.org/dovecot-2.0/rev/1bb29c3fad82
changeset: 9852:1bb29c3fad82
user: Timo Sirainen <tss at iki.fi>
date: Tue Sep 01 23:13:04 2009 -0400
description:
lda: Don't send rejects to any messages that have Auto-Submitted header.
diffstat:
1 file changed, 9 insertions(+), 1 deletion(-)
src/lib-lda/mail-send.c | 10 +++++++++-
diffs (23 lines):
diff -r 27fc3665b4dd -r 1bb29c3fad82 src/lib-lda/mail-send.c
--- a/src/lib-lda/mail-send.c Tue Sep 01 12:22:46 2009 -0400
+++ b/src/lib-lda/mail-send.c Tue Sep 01 23:13:04 2009 -0400
@@ -59,10 +59,18 @@ int mail_send_rejection(struct mail_deli
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