| Ticket UUID: | 528287 | |||
| Title: | Explodes for 'From: <>' | |||
| Type: | Bug | Version: | None | |
| Submitter: | nobody | Created on: | 2002-03-10 23:57:37 | |
| Subsystem: | smtp | Assigned To: | mrose | |
| Priority: | 5 Medium | Severity: | ||
| Status: | Closed | Last Modified: | 2002-03-19 02:25:32 | |
| Resolution: | Invalid | Closed By: | andreas_kupries | |
| Closed on: | 2002-03-18 19:25:32 | |||
| Description: |
I have some code to replicate a pop3 box by downloading
it
and resending it to N other popboxen via SMTP.
Care is taken to pass the message thru "as is",
from headers to MIME body.
Running it against a real-world pop that had 14Mb of
email,
it blew up on the RFC valid "bounce" syntax of 'From:
<>'.
----
-header {Date {Wed, 20 Feb 2002 20:34:04 -0400 (EDT)}}
\
-header {From <>} \
-header {Subject {Home Based Employment - No Selling}}
\
-header {Bcc {}} \
-header {Message-id <805913@635096>} \
'.
error in From: expecting mailbox in local-part (found
>)
while executing
"error "error in $who: $aprops(error)""
(procedure "smtp::sendmessage" line 144)
invoked from within
"smtp::sendmessage $part -servers vpop1.superb.net
-recipients
[redacted]@orwellian.org,[redacted]@orwellian.org
-header {Return-path <>} \
-header {..."
("eval" body line 1)
invoked from within
"eval $Build_SMTP"
(procedure "Main" line 57)
invoked from within
"Main
"
(file "./Multiplier.tcl" line 130)
Exit 1
| |||
| User Comments: |
andreas_kupries added on 2002-03-19 02:25:32:
Logged In: YES user_id=75003 The original documentation (README.*) is part of the module. It is not installed however. The manpages for smtp and mime are directly derived from these documents. mrose added on 2002-03-18 22:19:16:
File Added - 19569: README.html
Logged In: YES
user_id=24077
> There is a dearth of documentation or real world
> examples associated with packages smpt, mime.
when i wrote the original mime/smtp package, there was
some documentation that went with it. i don't know why/how
the document got lost. i'll attach it.
> What is the exact output result when using
> the different options? Where is a discussion
> of header vs. envelope? Why can't some options
> be set in the header vs. envelope?
i don't understand the question...
to answer your two most important questions:
1. you use -canonical when you are supplying the raw data
for a mime body part; if -canonical isn't given, then the
input is an 822-formatted message.
2. to get the behavior you want, try:
smtp::sendmessage $mimeT -originator "" \
-header {Resent-From ...} \
-header {Resent-To ...}
> Why do these packages twiddle with the upper/lower
> case of some of the header params submitted by the user?
in the early days, some software didn't format messages
when it displayed for the user. people who used that
software would complain if the headers didn't look
"right"... so, those of us who were writing some mail
software in those days decided to make the headers look
pretty.
mrose added on 2002-03-15 13:26:27: Logged In: YES
user_id=24077
the packages work just fine. they handled hundreds of
messages a day for me.
put the original message in a mimeToken and use -header
{Resent-From ...} -header {Resent-To ...}
if you think it is still broken, then reply with a tcl
script that demonstrates the problem.
/mtr
ps: "<>" is not a valid address. it is used in SMTP to
indicate an empty return address.
andreas_kupries added on 2002-03-15 09:17:07: Logged In: YES user_id=75003 Reopened and given to original author of the two packages. nobody added on 2002-03-15 05:59:20: Logged In: NO George@Orwellian.Org replies... Maybe it's me, or maybe there are almost zero examples of how to do non-trivial things with these two packages, smtp and mime, but I still don't know how to accomplish what I said I was doing using the reply just given. I said I was replicating popboxen, headers and body, when remailing them. I am now not only getting four extra "Resent" headers using this method, I still can't get the SMTP FROM <> equivalent which would set "Return-Path: <>". That's when I pass the whole msg in the mime part, and set the Resent-From to the address of the originating popboxen. Then I tried: Resent-From seems to set the Return-Path, but when I tried to set that to <> for replication purposes, it blew up with the same error msg as originally reported: error in Resent-From: expecting mailbox in local-part (found >) Failure to replicate. Any other ideas, or can't these packages do it? andreas_kupries added on 2002-03-13 14:59:54: Logged In: YES
user_id=75003
I talked to Marshall Rose, the creator of
the "mime" and "smtp" packages and he explains
that there is a difference between the *envelope*
SMTP stuffs a mail with, and the headers in
the mail itself. In the envelope the "MAIL FROM"
command/directive may contain the bounce syntax,
i.e. <>. The headers of the mail may not.
The following is an excerpt of Marshall's mail to
me. Given this I am closing the report now.
~~~~~~~~~~~~~~~~~~~~~~~
In SMTP, you can do
MAIL FROM:<>
which indicates that the *envelope* has no return address.
in 822, if a header requires an address, you can do one of
fred@example.com
Fred Flintstone <fred@example.com>
<fred@example.com>
the last case isn't legal according to 822, but an early
sendmail
generated addresses like that, so everyone updated their
parsers to
deal with it. the mega-revision to 822, RFC 2822, explicitly
allows
the third case.
Regardless, what the submitter is trying to do is fine, but
they're
doing it the wrong way. here's the right way to do it
# put the ENTIRE message into $mimeT
smtp::sendmessage $mimeT \
-header {Resent-From fred@example.com} \
-header {Resent-To addr1@example.com} \
-header {Resent-To addr2@example.com} ...
which says to resend the entire message using the envelope
presented
in the arguments.
| |||
Attachments:
- README.html [download] added by mrose on 2002-03-18 22:19:16. [details]
