[Mimedefang] md_graphdefang_log called outside of message context

Paul Murphy pjm at ousekjarr.org
Wed Dec 28 07:12:00 EST 2005



> [snip]
>         md_syslog("warning", "SPOOFING : IP: $ip, Sender: $sender");
>         md_graphdefang_log('SPOOFING', $sender, $RelayAddr);
>         return ('REJECT', 'Sorry, but address spoofing is blocked.');
>     }
>     return ('CONTINUE', "ok");
> }
> [end-quote]
> The problem is that only the mail.log is updated and not the 
> mimedefang.log!
> and the next line in mail.log is:
> md_graphdefang_log called outside of message context

md_graphdefang_log requires the Subject to be available, so cannot be used in
filter_sender, filter_recipient, etc, as these are called before the message
exists - only the envelope is available at this time.  

Instead, do the same thing manually using md_syslog:

 	md_syslog('info', "MDLOG,$MsgID,SPOOFING,0,$hostip,$sender,?,?");

Paul.

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.8/215 - Release Date: 27/12/2005
 




More information about the MIMEDefang mailing list