procmail
[Top] [All Lists]

Re: newline in procmail.log file

1997-12-26 08:34:45
At 01:08 AM 12/26/97 CST, Don Hawkinson wrote:

I have set the LOG variable in my procmailrc script so that I can
tell what part of my procmail filter has rejected an email message.

The LOG variable is put into the procmail.log file, but a newline is not
appended to the entry.  In the folowing example the LOG varable is set to
LOG=" crap in subject line: $MATCH  ".   How do I get a newline appended to
the line entered in the procmail.log file so that the next entey in the
logfile is put on a new line?

Assuming the trailing blanks aren't really wanted:
    LOG=" crap in subject line: $MATCH
    "
Or (makes for better readability when you indent and helps avoid
weird error messages if you goof not matching up quote marks):
    #put these two lines near the top of your .procmailrc:
    NL="
    "
    ...
    LOG=" crap in subject line: $MATCH$NL"
    ...
    LOG="Something else I want to log$NL"
etc.

Hope that helps,
Stan

<Prev in Thread] Current Thread [Next in Thread>