*** clamav-0.60/clamav-milter/clamav-milter.c.new	Fri Jul 18 21:38:59 2003
--- clamav-0.60/clamav-milter/clamav-milter.c	Mon May 29 19:17:00 2000
***************
*** 105,111 ****
   *			Thanks to Krzysztof Olędzki <ole@ans.pl>
   */
  
! #define	CM_VERSION	"0.56"
  
  /*#define	CONFDIR	"/usr/local/etc"*/
  
--- 105,111 ----
   *			Thanks to Krzysztof Olędzki <ole@ans.pl>
   */
  
! #define	CM_VERSION	"0.55"
  
  /*#define	CONFDIR	"/usr/local/etc"*/
  
***************
*** 150,155 ****
--- 150,156 ----
   * TODO: check security - which UID will this run under?
   * TODO: bounce message should optionally be read from a file
   * TODO: optionally add a signature that the message has been scanned with ClamAV
+  * TODO: Use MaxThreads from the conf file rather than max-children
   * TODO: Support ThreadTimeout, LogTime and Logfile from the conf
   *	 file
   * TODO: Allow more than one clamdscan server to be given
***************
*** 184,190 ****
  static	char		*strrcpy(char *dest, const char *source);
  
  static	char	clamav_version[64];
- static	int	always_scan = 0;	/* scan messages no matter what? */
  static	int	oflag = 0;	/* scan messages from our machine? */
  static	int	lflag = 0;	/* scan messages from our site? */
  static	int	bflag = 0;	/*
--- 185,190 ----
***************
*** 219,225 ****
  	puts("\t--help\t\t\t-h\tThis message.");
  	puts("\t--local\t\t\t-l\tScan messages sent from machines on our LAN.");
  	puts("\t--outgoing\t\t-o\tScan outgoing messages from this machine.");
- 	puts("\t--always\t\t-a\tScan all messages (overrides -o and -l).");
  	puts("\t--server=ADDRESS\t-s ADDRESS\tIP address of server running clamd (when using TCPsocket).");
  	puts("\t--version\t\t-V\tPrint the version number of this software.");
  #ifdef	CL_DEBUG
--- 219,224 ----
***************
*** 255,269 ****
  	for(;;) {
  		int opt_index = 0;
  #ifdef	CL_DEBUG
! 		const char *args = "abc:lodhs:Vx:";
  #else
! 		const char *args = "abc:lodhs:V";
  #endif
  		static struct option long_options[] = {
  			{
- 				"always", 0, NULL, 'a'
- 			},
- 			{
  				"bounce", 0, NULL, 'b'
  			},
  			{
--- 254,265 ----
  	for(;;) {
  		int opt_index = 0;
  #ifdef	CL_DEBUG
! 		const char *args = "bc:lodhs:Vx:";
  #else
! 		const char *args = "bc:lodhs:V";
  #endif
  		static struct option long_options[] = {
  			{
  				"bounce", 0, NULL, 'b'
  			},
  			{
***************
*** 279,284 ****
--- 275,283 ----
  				"outgoing", 0, NULL, 'o'
  			},
  			{
+ 				"max-children", 1, NULL, 'm'
+ 			},
+ 			{
  				"server", 1, NULL, 's'
  			},
  			{
***************
*** 302,310 ****
  			ret = long_options[opt_index].val;
  
  		switch(ret) {
- 			case 'a':	/* always scan */
- 				always_scan++;
- 				break;
  			case 'b':	/* bounce worms/viruses */
  				bflag++;
  				break;
--- 301,306 ----
***************
*** 320,325 ****
--- 316,324 ----
  			case 'o':	/* scan outgoing mail */
  				oflag++;
  				break;
+ 			case 'm':	/* maximum number of children */
+ 				max_children = atoi(optarg);
+ 				break;
  			case 's':	/* server running clamd */
  				serverIP = optarg;
  				break;
***************
*** 369,380 ****
  	}
  
  	/*
- 	 * Get the value for max_children from the config file's MaxThreads parameter
- 	 */
- 	if((cpt = cfgopt(copt, "MaxThreads")) != NULL)
- 		max_children = atoi(cpt->strarg);
- 
- 	/*
  	 * Get the outgoing socket details - the way to talk to clamd
  	 * TODO: support TCP sockets
  	 */
--- 368,373 ----
***************
*** 529,538 ****
  {
  	char buf[INET_ADDRSTRLEN];	/* IPv4 only */
  	const char *remoteIP = inet_ntop(AF_INET, &((struct sockaddr_in *)(hostaddr))->sin_addr, buf, sizeof(buf));
- 
- 	/* if we always want to scan, don't bother with the checks below */
- 	if (always_scan)
- 		return SMFIS_CONTINUE;
  
  #ifdef	CL_DEBUG
  	assert(remoteIP != NULL);
--- 522,527 ----
