Browse code

Include the ID of the message when warnings are sent to the postmaster-only

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

Nigel Horne authored on 2004/02/02 22:46:26
Showing 4 changed files
... ...
@@ -1,3 +1,8 @@
1
+Mon Feb  2 13:46:51 GMT 2004 (njh)
2
+----------------------------------
3
+  * clamav-milter: Include the ID of the message when warnings are sent to
4
+  	postmaster-only
5
+
1 6
 Mon Feb  2 12:43:55 GMT 2004 (trog)
2 7
 -----------------------------------
3 8
   * libclamav: ole2_extract.c: Add checks for compiler packed struct
... ...
@@ -213,6 +213,11 @@ Changes
213 213
 0.66i	28/1/04	Fixed compilation error with --enable-debug
214 214
 0.66j	29/1/03	Added --noreject flag, based on a patch by
215 215
 		"Vijay Sarvepalli" <vssarvep@office.uncg.edu>
216
+0.66k	2/2/04	When --postmaster-only is given, include the system
217
+		ID of the message in the warning e-mail, since that
218
+		will help the administrator when sifting through the
219
+		mail logs. Based on an idea by Jim Allen,
220
+		<Jim.Allen@Heartsine.co.uk>
216 221
 
217 222
 BUG REPORTS
218 223
 
... ...
@@ -216,9 +216,17 @@
216 216
  *	0.66i	28/1/04	Fixed compilation error with --enable-debug
217 217
  *	0.66j	29/1/03	Added --noreject flag, based on a patch by
218 218
  *			"Vijay Sarvepalli" <vssarvep@office.uncg.edu>
219
+ *	0.66k	2/2/04	When --postmaster-only is given, include the system
220
+ *			ID of the message in the warning e-mail, since that
221
+ *			will help the administrator when sifting through the
222
+ *			mail logs. Based on an idea by Jim Allen,
223
+ *			<Jim.Allen@Heartsine.co.uk>
219 224
  *
220 225
  * Change History:
221 226
  * $Log: clamav-milter.c,v $
227
+ * Revision 1.42  2004/02/02 13:44:31  nigelhorne
228
+ * Include the ID of the message when warnings are sent to the postmaster-only
229
+ *
222 230
  * Revision 1.41  2004/01/29 12:52:35  nigelhorne
223 231
  * Added --noreject flag
224 232
  *
... ...
@@ -327,9 +335,9 @@
327 327
  * Revision 1.6  2003/09/28 16:37:23  nigelhorne
328 328
  * Added -f flag use MaxThreads if --max-children not set
329 329
  */
330
-static	char	const	rcsid[] = "$Id: clamav-milter.c,v 1.41 2004/01/29 12:52:35 nigelhorne Exp $";
330
+static	char	const	rcsid[] = "$Id: clamav-milter.c,v 1.42 2004/02/02 13:44:31 nigelhorne Exp $";
331 331
 
332
-#define	CM_VERSION	"0.66j"
332
+#define	CM_VERSION	"0.66k"
333 333
 
334 334
 /*#define	CONFDIR	"/usr/local/etc"*/
335 335
 
... ...
@@ -1868,7 +1876,17 @@ clamfi_eom(SMFICTX *ctx)
1868 1868
 
1869 1869
 				if(bflag)
1870 1870
 					fputs("A message you sent to\n\t", sendmail);
1871
+				else if(pflag)
1872
+					/*
1873
+					 * The message is only going to the
1874
+					 * postmaster, so include some useful
1875
+					 * information
1876
+					 */
1877
+					fprintf(sendmail, "The message %s sent from %s to\n\t",
1878
+						smfi_getsymval(ctx, "i"),
1879
+						privdata->from);
1871 1880
 				else
1881
+
1872 1882
 					fprintf(sendmail, "A message sent from %s to\n\t", privdata->from);
1873 1883
 
1874 1884
 				for(to = privdata->to; *to; to++)
... ...
@@ -37,7 +37,8 @@ suite.
37 37
 \fB\-b, \-\-bounce\fR
38 38
 Send a failure message to the sender, and to the postmaster.
39 39
 [ \fBWarning\fR: most viruses and worms
40
-fake their source address, so this option is not recommended ]
40
+fake their source address, so this option is not recommended ].
41
+See also \-\-noreject.
41 42
 .TP
42 43
 \fB-d, \-\-dont-scan-on-error\fR
43 44
 If a system error occurs pass messages through unscanned,
... ...
@@ -54,17 +55,26 @@ Also scan messages sent from LAN.
54 54
 Usually clamav\-milter adds a heading to messages that are scanned.
55 55
 The header is of the form "X-Virus-Scanned: version", this option instructs
56 56
 clamav\-milter to refrain from adding this heading.
57
+.TP
58
+\fB-N, \-\-noreject\R
59
+When clamav\-milter processes an e-mail which contains a virus it rejects
60
+the e-mail by using the SMTP code 550. This option causes clamav\-milter to
61
+silently discard such messages. It is recommended that systems administrators
62
+use this option when NOT using the \-\-bounce option.
57 63
 .TP 
58 64
 \fB-o, \-\-outgoing\fR
59 65
 Scan outgoing messages from this machine.
60 66
 .TP
61 67
 \fB-p, \-\-postmaster=EMAILADDRESS\fR
62
-Sets the e-mail address to send notifications to when the \-\-bounce or
63
-\-\-postmaster-only option is given [ Default: postmaster ]
68
+Sets the e-mail address to send notifications to when the \-\-quiet option
69
+is not given.
64 70
 .TP
65 71
 \fB-P, \-\-postmaster-only\fR
66 72
 When the \-\-bounce option is given, only send a notification to the postmaster,
67 73
 not the sender.
74
+Setting this flag will include the ID of the message which can ease searching
75
+through system logs if the administrator believes it is a locally sourced
76
+virus.
68 77
 .TP
69 78
 \fB-q, \-\-quiet\fR
70 79
 Don't send any warning messages when a virus or worm or is detected.