[Mimedefang] Variable Initialization for mimedefang-filter

David F. Skoll dfs at roaringpenguin.com
Wed Apr 10 12:26:09 EDT 2002


On Wed, 10 Apr 2002, Albert E. Whale wrote:

> Here's My Filter File.  Hope that makes more sense.

Yes, it does; there's a comment which reads:

# $FromAddress above here is obtained from the HEADERS file

except there's nothing which sets FromAddress.  If you really need it,
you have to put this in filter_begin:

$FromAddress = "Unknown";
if (open(HDR, "<HEADERS")) {
    while(<HDR>) {
        chomp;
        if (/^From:\s*(.*)$/i) {
            $FromAddress = $1;
            last;
        }
    }
    close(HDR);
}

--
David.




More information about the MIMEDefang mailing list