diff -urN ../exim-4.92.3.orig/src/deliver.c ./src/deliver.c --- ../exim-4.92.3.orig/src/deliver.c 2019-09-29 01:04:24.000000000 +0300 +++ ./src/deliver.c 2019-12-15 12:43:25.403707000 +0200 @@ -2645,7 +2645,10 @@ FILE *f = fdopen(fd, "wb"); if (errors_reply_to && !contains_header(US"Reply-To", warn_message)) fprintf(f, "Reply-To: %s\n", errors_reply_to); - fprintf(f, "Auto-Submitted: auto-replied\n"); + fprintf(f, "Auto-Submitted: auto-replied\n" + "X-Reporting-MTA: dns; %s\n", + smtp_active_hostname + ); if (!contains_header(US"From", warn_message)) moan_write_from(f); fprintf(f, "%s", CS warn_message); @@ -7366,8 +7369,11 @@ fprintf(f, "Reply-To: %s\n", errors_reply_to); fprintf(f, "Auto-Submitted: auto-generated\n" - "From: Mail Delivery System \n" - "To: %s\n" + "X-Reporting-MTA: dns; %s\n", + smtp_active_hostname + ); + moan_write_from(f); + fprintf(f, "To: %s\n" "Subject: Delivery Status Notification\n" "Content-Type: multipart/report; report-type=delivery-status; boundary=%s\n" "MIME-Version: 1.0\n\n" @@ -7377,7 +7383,7 @@ "This message was created automatically by mail delivery software.\n" " ----- The following addresses had successful delivery notifications -----\n", - qualify_domain_sender, sender_address, bound, bound); + sender_address, bound, bound); for (addr_dsntmp = addr_senddsn; addr_dsntmp; addr_dsntmp = addr_dsntmp->next) @@ -7607,7 +7613,10 @@ if (errors_reply_to) fprintf(fp, "Reply-To: %s\n", errors_reply_to); - fprintf(fp, "Auto-Submitted: auto-replied\n"); + fprintf(fp, "Auto-Submitted: auto-replied\n" + "X-Reporting-MTA: dns; %s\n", + smtp_active_hostname + ); moan_write_from(fp); fprintf(fp, "To: %s\n", bounce_recipient); @@ -8232,7 +8241,10 @@ if (errors_reply_to) fprintf(f, "Reply-To: %s\n", errors_reply_to); - fprintf(f, "Auto-Submitted: auto-replied\n"); + fprintf(f, "Auto-Submitted: auto-replied\n" + "X-Reporting-MTA: dns; %s\n", + smtp_active_hostname + ); moan_write_from(f); fprintf(f, "To: %s\n", recipients); diff -urN ../exim-4.92.3.orig/src/moan.c ./src/moan.c --- ../exim-4.92.3.orig/src/moan.c 2019-09-29 01:04:24.000000000 +0300 +++ ./src/moan.c 2019-12-15 12:50:46.356148000 +0200 @@ -109,7 +109,10 @@ fp = fdopen(fd, "wb"); if (errors_reply_to) fprintf(fp, "Reply-To: %s\n", errors_reply_to); -fprintf(fp, "Auto-Submitted: auto-replied\n"); +fprintf(fp, "Auto-Submitted: auto-replied\n" + "X-Reporting-MTA: dns; %s\n", + smtp_active_hostname +); #ifdef EXPERIMENTAL_DMARC if (s)