Problem with the logging patch of the other day

Brian Kendig <[email protected]>
Newsgroups gmane.mail.exim.spamassassin
Message-ID <[email protected]>
Marc -- there's a slight problem with the patch you did the other day 
to avoid writing that 'savemail condition expand returned false' line 
to the log every time.  The problem is that, now, all incoming mail 
gets logged, even when it's not supposed to be.

Here's your code at line 158 of sa-exim.c:

if (SAEximDebug > 1 && ( expand[0] == 0 || (expand[0] == '0' && 
expand[1] == 0)))
{
     log_write(0, LOG_MAIN, "SA: savemail condition expanded to false, 
not saving message to disk");
     return 0;
}

I think you want something like this instead:

if (expand[0] == 0 || (expand[0] == '0' && expand[1] == 0))
{
     if (SAEximDebug > 1)
     {
         log_write(0, LOG_MAIN, "SA: savemail condition expanded to 
false, not saving message to disk");
     }
     return 0;
}


  ____    |\/|                 Brian Kendig   Set your priorities right.
  \  /\   / ..__.    brian at enchanter net   No one ever said on his
   \/  \__\   _/   http://www.enchanter.net/  death bed, "Gee, if I'd
    \__   __  \_      Be insatiably curious.  only spent more time at
       \____\___\           Ask "why" a lot.  the office."
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.