[Mimedefang] Adding envelope values to header

Jim McCullars jim at info.uah.edu
Thu Oct 23 14:37:18 EDT 2003



On Thu, 23 Oct 2003, Jonas Eckerman wrote:

> --8<--
> #**********************
> # Global variables.
> #************************
> $smtp_info_sender = "";
> --8<--
> sub filter_sender ($$$$) {
>     my($sender, $ip, $hostname, $helo) = @_;
>     $smtp_info_sender = "$sender $hostname [$ip] ($helo)";
>     return ('CONTINUE', "Ok, go ahead.");
> }
> --8<--
> sub filter_end ($) {
>     my($entity) = @_;
>     if (defined($smtp_info_sender) && $smtp_info_sender ne "") {
> 	    action_add_header("X-SMTP-From", "$smtp_info_sender");
>     }
> }

   Unless something has changed very recently, I don't think you are
guaranteed that something you set in filter_sender (or filter_relay or
filter_recipient) will be there (or the same) in other filter routines.

Jim




More information about the MIMEDefang mailing list