-/* $Cambridge: exim/src/src/moan.c,v 1.11 2009/11/16 19:50:37 nm4 Exp $ */
-
/*************************************************
* Exim - an Internet mail transport agent *
*************************************************/
fprintf(f, "\n");
break;
+#ifdef EXPERIMENTAL_DMARC
+ case ERRMESS_DMARC_FORENSIC:
+ bounce_return_message = TRUE;
+ bounce_return_body = FALSE;
+ fprintf(f,
+ "Subject: DMARC Forensic Report for %s from IP %s\n\n",
+ ((eblock == NULL) ? US"Unknown" : eblock->text2),
+ sender_host_address);
+ fprintf(f,
+ "A message claiming to be from you has failed the published DMARC\n"
+ "policy for your domain.\n\n");
+ while (eblock != NULL)
+ {
+ fprintf(f, " %s: %s\n", eblock->text1, eblock->text2);
+ count++;
+ eblock = eblock->next;
+ }
+ break;
+#endif
+
default:
fprintf(f, "Subject: Mail failure\n\n");
fprintf(f,
}
}
}
+#ifdef EXPERIMENTAL_DMARC
+ /* Overkill, but use exact test in case future code gets inserted */
+ else if (bounce_return_body && message_file == NULL)
+ {
+ /* This doesn't print newlines, disable until can parse and fix
+ * output to be legible. */
+ fprintf(f, "%s", expand_string(US"$message_body"));
+ }
+#endif
}
-
/* Close the file, which should send an EOF to the child process
that is receiving the message. Wait for it to finish, without a timeout. */
*/
void
-moan_tell_someone(uschar *who, address_item *addr, uschar *subject,
- char *format, ...)
+moan_tell_someone(uschar *who, address_item *addr,
+ const uschar *subject, const char *format, ...)
{
FILE *f;
va_list ap;
*/
void
-moan_smtp_batch(uschar *cmd_buffer, char *format, ...)
+moan_smtp_batch(uschar *cmd_buffer, const char *format, ...)
{
va_list ap;
int yield = (receive_messagecount > 0)? 1 : 2;