On Wednesday 14 January 2004 01:38 CET Justin Mason wrote:
> [EMAIL PROTECTED] writes:
> > logmsg(
> > ($method eq 'PROCESS' ? "processing" : "checking") .
> >- " message $msgid for $current_user:$>."
> >+ " message $msgid" .
> >+ ($rmsgid ? " ($rmsgid)" : "" ) .
> >+ " for ${current_user}:$>."
> > );
>
> OK -- one problem here -- we shouldn't make that conditional if possible,
> as it will confuse log parsers. Is there a way we can avoid that?
Hmmm... changing the log format will probably break the log parsers anyway,
I should have thoought about that. Maybe that's why I chose to put the
stuff inside brackets intuitively ;-) But it just came into my mind that
the MID is replaced with "(unknown)" if none was given... Hm.
The "problem" is that of course not every mail has a Resent-Message-Id. The
possible solutions I could think of are:
1. The one above ;-)
2. Always write out the (square?) brackets, "unknown" if the message had no
RMID. But that will in 90% of all cases give messages like
processing message <[EMAIL PROTECTED]> [unknown] for you:42.
while only relatively rare cases will look like
processing message <[EMAIL PROTECTED]> [<[EMAIL PROTECTED]>] for you:42.
This might also occur
processing message (unknown) [<[EMAIL PROTECTED]>] for you:42.
While the following message should never happen
processing message (unknown) [unknown] for you:42.
3. Do it like sendmail, log the RMID instead of the MID if one exists. I
don't like that solution because I tend to grep for ^Message-Id: ;-)
4. Don't log the RMID (so don't change anything). But IMO the RMID is
valuable information, especially as sendmail logs only that one (as bug
2900 states.)
Cheers,
Malte
--
[SGT] Simon G. Tatham: "How to Report Bugs Effectively"
<http://www.chiark.greenend.org.uk/~sgtatham/bugs.html>
[ESR] Eric S. Raymond: "How To Ask Questions The Smart Way"
<http://www.catb.org/~esr/faqs/smart-questions.html>