On Tue, Oct 12, 2004 at 08:00:19AM -0500, Keith Patton wrote:
> Hello all,
> 
> I am getting junk in and it is distinguished by some bogus as the 
> display name followed by a correct email address..
> 
> Does mimedefang-filter have the display name available in a variable, 
> for filter_recipient?
> 
> ie  ( bogus name < [EMAIL PROTECTED] >

Nope, as that is not part of the SMTP conversation. In filter_recipient,
you _only_ know the [EMAIL PROTECTED] The rest of the information (like
"display name") is in the header, and you don't receive the header until
later, in the DATA phase. Maybe you want to check rfc 2821 or a primer on
SMTP in general, google should be able to find one.

You can have that information by parsing the To: header line in
filter_begin, something like this:

    use Mail::Address;
    open(H, "HEADERS");
    while ( <H> ) {
        if ( /^To:\s*(.*)/i ) {
            @x = Mail::Address->parse($1);
            last;
        }
    }
    close H;
    print "name of first recipient: ", $x[0]->name(), "\n";

(untested!).

-- 
#!perl -wpl # mmfppfmpmmpp mmpffm <[EMAIL PROTECTED]>
$p=3-2*/[^\W\dmpf_]/i;s.[a-z]{$p}.vec($f=join('',$p-1?chr(sub{$_[0]*9+$_[1]*3+
$_[2]}->(map{/p|f/i+/f/i}split//,$&)+97):qw(m p f)[map{((ord$&)%32-1)/$_%3}(9,
3,1)]),5,1)='`'lt$&;$f.eig;                                # Jan-Pieter Cornet
_______________________________________________
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to