develooper Front page | perl.qpsmtpd | Postings from April 2004

Re: Null sender and require_resolvable_fromhost

Thread Previous | Thread Next
From:
Keith C. Ivey
Date:
April 14, 2004 16:40
Subject:
Re: Null sender and require_resolvable_fromhost
Message ID:
E1BDtzM-0004qr-00@smtp03.mrf.mail.rcn.net
Joe Stewart <jstewart@lurhq.com> wrote:

> I had to change line 11 of require_resolvable_fromhost from:
> 
> $sender->format ne "<>"
> 
> to:
> 
> $sender->format ne "\"<>\""
> 
> because of the way Mail::Address adds quotation marks to an
> address.

There was some discussion of that in November in the thread 
"PATCH: <> rejected by require_resolvable_fromhost".  You can 
find messages here:

   http://www.nntp.perl.org/group/perl.qpsmtpd;max=713

I don't know whether anything was really resolved.

It seems to me that Mail::Address objects aren't what we should 
be using for addresses, since the addresses in the MAIL and 
RCPT parameters are not RFC 822 addresses (they don't have 
angle brackets and name and comments and such).  Maybe they 
should be a Qpsmtpd::Address object, and there could be a 
local() method to indicate whether the address is local.

In any case, I think if we are using Mail::Address objects the 
null address is better represented as

   Mail::Address->new('', '')

rather than

   Mail::Address->new("<>")

(which has an undefined address and a "phrase" of '<>'), and 
then the check should be 

   $sender->format ne ''

This use of Mail::Address is also related to the problem of not 
supporting addresses containing spaces, by the way.

-- 
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About