INN-current (20090414) and some log messages
Julien ÉLIE
julien at trigofacile.com
Tue Apr 28 18:11:20 UTC 2009
Hi again Petr,
> JL> > Apr 27 15:10:01.245 - ? (null) 439 Bad "Message-ID" header
> JL> >
> JL> > It is possible to log peer name?
> JL>
> JL> Well, as innd did not log it, I believe it is because there was no Path:
> JL> header in the article. It takes the peer name from the Path: header
> JL> except when logipaddr is set to true in inn.conf.
>
> Oh! Are you confident in that?
No, not any more :)
It was a misunderstanding when I looked at the code.
> No "news-out.glorb.com" in "Path" header, but in incoming.conf:
> hostname: "news-out.glorb.com"
>
> My "logipaddr: true" in all our INN installations, and this is default
> (according to the documentation) for INN.
Yes, you're totally right.
> JL> Could you please try that patch and tell me how your logs now look like?
>
> Now I will try it.
The peer was not logged by the patch (only the message-ID).
This one will work better:
Index: innd/art.c
===================================================================
--- innd/art.c (révision 8434)
+++ innd/art.c (copie de travail)
@@ -1947,6 +1958,14 @@
article = &cp->In;
artclean = ARTclean(data, cp->Error, ihave);
+ /* We have not parsed the Path: header yet. We do not check for logipaddr
+ * right now (it will be done afterwards and change data->Feedsite
+ * in consequence). We assign a feed site for the next call to ARTlog(). */
+ data->Feedsite = RChostname(cp);
+ if (data->Feedsite == NULL)
+ data->Feedsite = CHANname(cp);
+ data->FeedsiteLength = strlen(data->Feedsite);
+
/* If we don't have Path or Message-ID, we can't continue. */
if (!artclean && (!HDR_FOUND(HDR__PATH) || !HDR_FOUND(HDR__MESSAGE_ID))) {
/* cp->Error is set since Path: and Message-ID: are required headers and one
@@ -1969,9 +1988,6 @@
hops = data->Path.List;
if (innconf->logipaddr) {
- data->Feedsite = RChostname(cp);
- if (data->Feedsite == NULL)
- data->Feedsite = CHANname(cp);
if (strcmp("0.0.0.0", data->Feedsite) == 0 || data->Feedsite[0] == '\0')
data->Feedsite = hops && hops[0] ? hops[0] : CHANname(cp);
} else {
Before:
Apr 28 20:10:00.628 - ? (null) 439 Bad "Message-ID" header (<ab cd>)
After:
Apr 28 20:11:09.172 - localhost (null) 439 Bad "Message-ID" header (<ab cd>)
I hope it is what you wanted.
--
Julien ÉLIE
« Constitutiones tempore posteriores potiores prioribus. »
More information about the inn-workers
mailing list