Re: [exim-dev] Using log_create() from src/src/log.c

Top Page
Delete this message
Reply to this message
Author: Todd Lyons
Date:  
To: exim-dev
Subject: Re: [exim-dev] Using log_create() from src/src/log.c
On Thu, Feb 7, 2013 at 6:32 PM, Phil Pennock <pdp@???> wrote:
> On 2013-02-07 at 13:46 -0800, Todd Lyons wrote:
>> I ended up going a different route. I don't like making this function
>> global. I don't know enough of the history of the logging subsystem
>> (or exim for that matter) and I don't want to reduce security in some
>> esoteric way.
>
> Just remove the static.


Exim has another function that I think does exactly what I need for
generating response messages in the moan.c file, but it's declared as
static. Using the moan_send_message() function, I can stuff messages
into an error_block pointer that will allow me to put whatever text is
necessary plus the headers and original message.

So do you think that this is an acceptable method for generating a
DMARC forensic message? I also plan to log failures sending, but
won't halt flow because I consider it a non-fatal failure.

[exim-build@todd-latitude-d620 ~/projects/exim/src
(odk_build_forensic_reports)]$ git diff src/moan.c
diff --git a/src/src/moan.c b/src/src/moan.c
index 6c04f7a..d9fb40b 100644
--- a/src/src/moan.c
+++ b/src/src/moan.c
@@ -61,7 +61,7 @@ Arguments:
 Returns:         TRUE if message successfully sent
 */


-static BOOL
+BOOL
moan_send_message(uschar *recipient, int ident, error_block *eblock,
header_line *headers, FILE *message_file, uschar *firstline)
{
@@ -202,6 +202,11 @@ switch(ident)
fprintf(f, "\n");
break;

+#ifdef EXPERIMENTAL_DMARC
+ case ERRMESS_DMARC_FORENSIC:
+ break;
+#endif
+
default:
fprintf(f, "Subject: Mail failure\n\n");
fprintf(f,

...Todd

--
The total budget at all receivers for solving senders' problems is $0.
If you want them to accept your mail and manage it the way you want,
send it the way the spec says to. --John Levine