minor bug in procmail 3.22

[email protected] (Ed V. Bartosh) 25 Feb 2003 22:29:43 +0200
Newsgroups gmane.mail.procmail.devel
Organization Ed @ home
Message-ID <[email protected]>
Hello,

1. I've just found minor bug in procmail.
In case of overquota it's impossible now to get appropriate
message in the log because 'unlink' on my system (RedHat 8.0)
change errno.

Here is the patch, apply it, please, if you find it useful:

--- mailfold.c.orig     2003-02-25 13:54:33.000000000 -0600
+++ mailfold.c  2003-02-25 14:00:43.000000000 -0600
@@ -295,10 +296,14 @@
         }
        if(dump(fd,type,source,len)&&!ignwerr)
         { strcpy(buf,buf2);
-failed:           unlink(buf);lasttell= -1;
+failed:           { int serrno=errno;                      /* save any error information */
+                unlink(buf);lasttell= -1;
+          
           if(linkfolder)
              free(linkfolder);
+         SETerrno(serrno); 
           goto dumpf;
+          }
         }
        strcpy(buf2,buf);
        break;

2. Small question:
Is it possible to put the message 'Quota exceeded while writing ...'
and similar to the stderr only, not to the log ?
I think the procmail logging system, as I understand it, is little inconvenient 
because it doesn't allow to get errors separate of info.

PS: Reply privately, please. I'm not subscribed to the list.

-- 
Best regards, Ed