Hi, I think that what you want to do is very bad. It's not a solution. It's your choice!!!
But I've quickly made a patch that will modify the clamav 0.65 sources in order to do what you want. I've add a --warning=MESSAGE or a -w argument to clamav-milter. If one of this two argument is present, then every mail will pass through the virus scanner and will be send to all recipients. If MESSAGE is set, the subject will be erase by MESSAGE, otherwise the subject will be erase by [INFECTED MAIL]. It's no so easy to just add a message in the body. Extract de clamav-0.65.tar.gz, cd to clamav-0.65 and configure it by ./configure and all the option you need Cd to clamav-milter Apply the patch by: patch -p0 < patch_clamav_milter_useless_for_bad_administrators_lol The run make and make install Here it goes!!! Good luck with your virus, and be aware: So Big is watching you !! :-p Here is the patch: **** BEGINING OF THE PATCH **** --- clamav-milter.c.orig Thu Nov 27 21:56:02 2003 +++ clamav-milter.c Thu Nov 27 23:57:12 2003 @@ -275,6 +275,7 @@ static char *strrcpy(char *dest, const char *source); static char clamav_version[128]; +static char *warning_message; static int fflag = 0; /* force a scan, whatever */ static int oflag = 0; /* scan messages from our machine? */ static int lflag = 0; /* scan messages from our site? */ @@ -306,7 +307,12 @@ * an error. Patch from * Joe Talbott <[EMAIL PROTECTED]> */ +static int wflag = 0; /* + * Send the mail even if it's infected + * Jerome Loyet <[EMAIL PROTECTED]> + */ + #ifdef CL_DEBUG static int debug_level = 0; #endif @@ -364,7 +370,7 @@ struct smfiDesc smfilter = { "ClamAv", /* filter name */ SMFI_VERSION, /* version code -- leave untouched */ - SMFIF_ADDHDRS, /* flags - we add headers */ + (SMFIF_ADDHDRS | SMFIF_CHGHDRS), /* flags - we add headers */ clamfi_connect, /* connection callback */ NULL, /* HELO filter callback */ clamfi_envfrom, /* envelope sender filter callback */ @@ -388,9 +394,9 @@ for(;;) { int opt_index = 0; #ifdef CL_DEBUG - const char *args = "bc:flnopPqdhs:Vx:"; + const char *args = "bc:flnopPqdhws:Vx:"; #else - const char *args = "bc:flnopPqdhs:V"; + const char *args = "bc:flnopPqdhws:V"; #endif static struct option long_options[] = { { @@ -435,6 +441,9 @@ { "version", 0, NULL, 'V' }, + { + "warning", 1, NULL, 'w' + }, #ifdef CL_DEBUG { "debug-level", 1, NULL, 'x' @@ -495,6 +504,10 @@ case 'V': puts(clamav_version); return EX_OK; + case 'w': + wflag++; + warning_message = optarg; + break; #ifdef CL_DEBUG case 'x': debug_level = atoi(optarg); @@ -1275,8 +1288,17 @@ } } - smfi_setreply(ctx, "550", "5.7.1", "Virus detected by ClamAV - http://clamav.elektrapro.com"); - rc = SMFIS_REJECT; + if (!wflag) { + smfi_setreply(ctx, "550", "5.7.1", "Virus detected by ClamAV - http://clamav.elektrapro.com"); + rc = SMFIS_REJECT; + } else { + if (warning_message == NULL) { + smfi_chgheader(ctx, "Subject", 1, "[INFECTED MAIL]"); + } else { + smfi_chgheader(ctx, "Subject", 1, warning_message); + } + rc = SMFIS_CONTINUE; + } free(err); } clamfi_cleanup(ctx); **** END OF THE PATCH **** -> -----Message d'origine----- -> De : [EMAIL PROTECTED] -> [mailto:[EMAIL PROTECTED] De la part -> de Michael V. Khaletsky -> Envoyé : jeudi 27 novembre 2003 20:12 -> À : [EMAIL PROTECTED] -> Objet : [Clamav-users] clamav-milter: is it possble to mark -> infected e-mail, but still deliver it to addressee ? -> -> -> Hello, -> We have installed clamav-milter -> into Debian with Sendmail. -> It works. -> Unfortunately not all our users are happy of the situation -> when they cannot get e-mails with viruses in them. -> -> Is it possible to mark infected e-mail as infected -> but do not delete it and still deliver it to addressee? -> -> Thanks -> -> M. Khaletsky -> -> -> -> ------------------------------------------------------- -> This SF.net email is sponsored by: SF.net Giveback Program. -> Does SourceForge.net help you be more productive? Does it -> help you create better code? SHARE THE LOVE, and help us help -> YOU! Click Here: http://sourceforge.net/donate/ -> _______________________________________________ -> Clamav-users mailing list -> [EMAIL PROTECTED] -> https://lists.sourceforge.net/lists/listinfo/clamav-users -> ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Clamav-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/clamav-users