Allow --from with no e-mail address

git-svn: trunk@953
remotes/push_mirror/metadata
Nigel Horne 21 years ago
parent 381b67a757
commit 7ea21452ea
  1. 4
      clamav-devel/ChangeLog
  2. 2
      clamav-devel/clamav-milter/INSTALL
  3. 19
      clamav-devel/clamav-milter/clamav-milter.c
  4. 5
      clamav-devel/docs/man/clamav-milter.8

@ -1,3 +1,7 @@
Thu Sep 30 20:19:46 BST 2004 (njh)
----------------------------------
* clamav-milter: Allow --from with no e-mail address
Thu Sep 30 10:01:25 BST 2004 (njh)
----------------------------------
* libclamav: Further small speed and size optimisations with MIME

@ -509,6 +509,8 @@ Changes
stops/starts
Error gracefully if the iface option is set to --broadcast on
an operating system that doesn't support it
0.80e 30/9/04 If you say --from with no arguments, the from address is now
set to the orginator's address
INTERNATIONALISATION

@ -26,6 +26,9 @@
*
* Change History:
* $Log: clamav-milter.c,v $
* Revision 1.136 2004/09/30 19:18:30 nigelhorne
* Allow --from with no e-mail address
*
* Revision 1.135 2004/09/28 14:44:35 nigelhorne
* Handle operating systems that don't support SO_BINDTODEVICE
*
@ -416,9 +419,9 @@
* Revision 1.6 2003/09/28 16:37:23 nigelhorne
* Added -f flag use MaxThreads if --max-children not set
*/
static char const rcsid[] = "$Id: clamav-milter.c,v 1.135 2004/09/28 14:44:35 nigelhorne Exp $";
static char const rcsid[] = "$Id: clamav-milter.c,v 1.136 2004/09/30 19:18:30 nigelhorne Exp $";
#define CM_VERSION "0.80d"
#define CM_VERSION "0.80e"
/*#define CONFDIR "/usr/local/etc"*/
@ -875,7 +878,7 @@ main(int argc, char **argv)
static struct option long_options[] = {
{
"from", 1, NULL, 'a'
"from", 2, NULL, 'a'
},
{
"advisory", 0, NULL, 'A'
@ -980,6 +983,11 @@ main(int argc, char **argv)
switch(ret) {
case 'a': /* e-mail errors from here */
/*
* optarg is optional - if you give --from
* then the --from is set to the orginal,
* probably forged, email address
*/
from = optarg;
break;
case 'A':
@ -2616,7 +2624,10 @@ clamfi_eom(SMFICTX *ctx)
sendmail = popen(cmd, "w");
if(sendmail) {
fprintf(sendmail, "From: %s\n", from);
if(from && from[0])
fprintf(sendmail, "From: %s\n", from);
else
fprintf(sendmail, "From: %s\n", privdata->from);
if(bflag) {
/*
* Handle privdata->from not set,

@ -27,8 +27,11 @@ then that user must have the rights to create the file.
.LP
.TP
\fB-a FROM, \-\-from=EMAIL\fR
\fB-a FROM, \-\-from<=EMAIL>\fR
Source email address of notices. The default is MAILER-DAEMON.
If \fI=EMAIL\fR is not given, thus \-\-from, then the from address is set
to the originating email address, however since it is likely that address is
forged it must not be relied upon.
\fB\-h, \-\-help\fR
Output the help information and exit.
.TP

Loading…
Cancel
Save