Joe Maimon wrote:
<snip>
I can probably send a patch if you would like.
Joe
_______________________________________________
http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users
This patch still works...can someone tell me whether this is up for
consideration?
#! /bin/sh /usr/share/dpatch/dpatch-run
## 100_clamav-milter.smrcv.patch.dpatch by <[EMAIL PROTECTED]>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.
@DPATCH@
diff -urNad clamav-0.85.1-0-JM/clamav-milter/clamav-milter.c
/tmp/dpep.qdUNc5/clamav-0.85.1-0-JM/clamav-milter/clamav-milter.c
--- clamav-0.85.1-0-JM/clamav-milter/clamav-milter.c 2005-05-12
17:10:27.000000000 -0400
+++ /tmp/dpep.qdUNc5/clamav-0.85.1-0-JM/clamav-milter/clamav-milter.c
2005-05-20 10:50:03.670473065 -0400
@@ -2267,8 +2267,44 @@
privdata->from = strdup(mailaddr);
- if(hflag)
+ if(hflag) {
+ /* craft a sendmail like header for notifications */
+ char *macro_b, *macro_s, *macro_j, *macro__;
+ char *p;
+ int plen = 0;
+ char *fmt = "from %s (%s) by %s";
+
+
privdata->headers = header_list_new();
+ macro_s = smfi_getsymval(ctx, "s");
+ macro_j = smfi_getsymval(ctx, "j");
+ macro__ = smfi_getsymval(ctx, "_");
+
+ plen += (macro_s) ? strlen(macro_s) : sizeof("unknown");
+ plen += (macro_j) ? strlen(macro_j) : sizeof("localhost");
+ plen += (macro__) ? strlen(macro__) : 0;
+ plen += strlen(fmt);
+
+ p = cli_malloc(plen);
+ if(p) {
+ sprintf(p, fmt,
+ (macro_s) ? macro_s : "unknown",
+ (macro__) ? macro__ : "",
+ (macro_j) ? macro_j : "localhost"
+ );
+#ifdef CL_DEBUG
+ if(debug_level > 5) {
+ char *msg_p = "clamfi_header: created Recieved
header alloclen=%d, len=%d,\"%s\"\n";
+ if(use_syslog)
+ syslog(LOG_NOTICE, msg_p, plen,
strlen(p), p);
+ cli_dbgmsg(msg_p,plen, strlen(p), p);
+ }
+#endif
+
+ header_list_add(privdata->headers, "Received", p);
+ free(p);
+ }
+ }
if(smfi_setpriv(ctx, privdata) == MI_SUCCESS)
return SMFIS_CONTINUE;
_______________________________________________
http://lurker.clamav.net/list/clamav-users.html