Browse code

Add the virus name into the 550 rejection if sent

git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@505 77e5149b-7576-45b1-b177-96237e5ba77b

Nigel Horne authored on 2004/04/18 05:41:18
Showing 3 changed files
... ...
@@ -1,3 +1,8 @@
1
+Sat Apr 17 21:40:19 BST 2004 (njh)
2
+----------------------------------
3
+  * clamav-milter:	Include the virus name in the 550 rejection if
4
+  	appropriate
5
+
1 6
 Sat Apr 17 15:19:41 BST 2004 (njh)
2 7
 ----------------------------------
3 8
   * libclamav/blob.c:	Filenames with high byte characters were not
... ...
@@ -318,6 +318,7 @@ Changes
318 318
 0.70h	8/4/04	Cleanup StreamMaxLength code
319 319
 0.70i	9/4/04	Handle clamd giving up on StreamMaxLength before clamav-milter
320 320
 0.70j	15/4/04	Handle systems without inet_ntop
321
+0.70k	17/4/04	Put the virus message in the 550 rejection
321 322
 
322 323
 BUG REPORTS
323 324
 
... ...
@@ -318,9 +318,13 @@
318 318
  *	0.70i	9/4/04	Handle clamd giving up on StreamMaxLength before
319 319
  *			clamav-milter
320 320
  *	0.70j	15/4/04	Handle systems without inet_ntop
321
+ *	0.70k	17/4/04	Put the virus message in the 550 rejection
321 322
  *
322 323
  * Change History:
323 324
  * $Log: clamav-milter.c,v $
325
+ * Revision 1.74  2004/04/17 20:39:04  nigelhorne
326
+ * Add the virus name into the 550 rejection if sent
327
+ *
324 328
  * Revision 1.73  2004/04/15 09:53:25  nigelhorne
325 329
  * Handle systems without inet_ntop
326 330
  *
... ...
@@ -525,9 +529,9 @@
525 525
  * Revision 1.6  2003/09/28 16:37:23  nigelhorne
526 526
  * Added -f flag use MaxThreads if --max-children not set
527 527
  */
528
-static	char	const	rcsid[] = "$Id: clamav-milter.c,v 1.73 2004/04/15 09:53:25 nigelhorne Exp $";
528
+static	char	const	rcsid[] = "$Id: clamav-milter.c,v 1.74 2004/04/17 20:39:04 nigelhorne Exp $";
529 529
 
530
-#define	CM_VERSION	"0.70j"
530
+#define	CM_VERSION	"0.70k"
531 531
 
532 532
 /*#define	CONFDIR	"/usr/local/etc"*/
533 533
 
... ...
@@ -2034,6 +2038,7 @@ clamfi_eom(SMFICTX *ctx)
2034 2034
 	} else {
2035 2035
 		int i;
2036 2036
 		char **to, *err;
2037
+		char reject[1024];
2037 2038
 
2038 2039
 		/*
2039 2040
 		 * Setup err as a list of recipients
... ...
@@ -2186,7 +2191,8 @@ clamfi_eom(SMFICTX *ctx)
2186 2186
 		else
2187 2187
 			rc = SMFIS_DISCARD;
2188 2188
 
2189
-		smfi_setreply(ctx, "550", "5.7.1", "Virus detected by ClamAV - http://www.clamav.net");
2189
+		snprintf(reject, sizeof(reject) - 1, "Virus detected by ClamAV - http://www.clamav.net - %s", mess);
2190
+		smfi_setreply(ctx, "550", "5.7.1", reject);
2190 2191
 	}
2191 2192
 	clamfi_cleanup(ctx);
2192 2193