[Mailman-Developers] Fwd: Re: Fwd: [Mailman-Users] smtplib

The Dragon De Monsyne dragondm@integral.org
Fri, 4 Jun 1999 01:51:16 -0500 (CDT)


On Wed, 2 Jun 1999, Tomaz Borstnar wrote:

>> >Ok, the problem can be at how the  quoteaddr()  works, does it
> >*always* yield addresses *with* "<...>" around them, or can it
> >sometimes yield those without the wrappers ?

	it will yield a bare address with the <>'s added unless the
address cannot be parsed.
It will pass the address verbatim _IF_ and _ONLY_ if rfc822.parseaddr()
cannot parse it. this is the proper behavior, IMHO, as if the address
cannot be parsed, it is probably syntacticly invalid, and thus the SMTP
server will complain anyway. If rfc822.parseaddr()  is cronking on a
syntacticly valid address, the rfc822 module needs to be fixed.

> >
> >I would suggest it to always yield the target address *without*
> >the "<..>" angle brackets, and then always to print those explicitely.
> >That way there won't be some mystic cases where failures happen.

	Creating a syntactically valid path according to rfc821 is that
function's purpose is. According to the RFC the path includes the <>'s
if the addressis bogus to begin with, then failure is the 'correcxt' thing
to happen, because it means that something is pasing in mangled address,
or that someone needs to submit a bug report on the rfc822 module.

> >Another problem I have seen reports about are due to  putcmd()
> >function misbehaviour (belief that "all the world is Sendmail"):
> >
	No, this is a bug. It will be fixed.

> >     def putcmd(self, cmd, args=""):
> >         """Send a command to the server."""
> >         str = '%s %s%s' % (cmd, args, CRLF)
> >         self.send(str)
> >
> >That FORCES extra space in case the 'args' does not exist for some
> >command (e.g. "DATA").  It should not.
> 



> >
> >OTOH: For ZMailer there are also better ways to submit a message, than
> >       doing it thru SMTP port.  Methods that are way faster, and easily
> >       codable in Python (I have a sample in PERL, and in C, of course.)

	True, but SMTP is the most portable way.

	-The Dragon De Monsyne