Using user-variables in external commands? II 
Author Message
 Using user-variables in external commands? II

Thank you for your answers!

The question is not if $recipient and
$body can contain any character in:

...
To: $recipient

$body
end
...

The question is can contain $body any
character?
Im already checking $recipient for


For example if you send an empty line
containing only a dot sendmail quits and
maybe there ore some other similar things.

So is it safe to allow any character in
$body and only check $recipient?

Thank you, Mike!

.



Sat, 02 Nov 2002 03:00:00 GMT  
 Using user-variables in external commands? II

Quote:

> The question is can contain $body any character?

If you're asking what I think you're asking, you're asking about sendmail
(or whatever program you're sending this to). You should probably search
for the docs, FAQs, and newsgroups about sendmail, if that's it.

But I'll point out that a line containing a single dot is significant to
some mail-handling programs, and lines matching /^from /i may matter to
others. Of course, perl doesn't care about those things. :-)

Quote:
> Im already checking $recipient for



I'm not sure what you mean by that. But I hope you're not using a simple
pattern to check for a valid e-mail address. For example, if you don't
parse it correctly, you could get the wrong idea about the address for my
friends, Fred and Barney:


That's a valid e-mail address which doesn't belong to the leader of the
free world; write to Fred and Barney to check!

--
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



Sat, 02 Nov 2002 03:00:00 GMT  
 Using user-variables in external commands? II


Quote:

}
} > The question is can contain $body any character?
}
} But I'll point out that a line containing a single dot is significant to
} some mail-handling programs,...

Actually, the SMTP spec *forbids* a line with a single-period other
than to terminate a DATA command.  The spec requires that any line in
the body of the message that begins with a dot must have the dot
doubled [and the doubled-dot will be changed back to a single-dot by
the receiving SMTP server].

  /Bernie\



Sun, 03 Nov 2002 03:00:00 GMT  
 Using user-variables in external commands? II

Quote:




> }
> } > The question is can contain $body any character?
> }
> } But I'll point out that a line containing a single dot is significant to
> } some mail-handling programs,...

> Actually, the SMTP spec *forbids* a line with a single-period other
> than to terminate a DATA command.

But relatively few users of email talk raw SMTP protocol directly to a
server!  Any mail client or module should be taking care of such
details, so that the sender need not concern themselves with the
minutiae of the raw protocol.

So we would need to know more about the context of the original
question.  And, as Tom already rightly said (but has been unhelpfully
expunged from the f'up), this isn't a Perl programming issue (at least
not until the questioner comes up with a question about some specific
Perl module, in which case it's presumably ontopic on the
c.l.p.modules group).

  The spec requires that any line in

Quote:
> the body of the message that begins with a dot must have the dot
> doubled [and the doubled-dot will be changed back to a single-dot by
> the receiving SMTP server].

All of which should be transparent to the end-user.  So, again, it's a
question of context.  From where did the questioner expect to get
$body, and to what software package are they intending to feed it?
It's only if they intend to feed it raw to the SMTP protocol that the
SMTP protocol specification sets the rules of play.

ttfn



Tue, 05 Nov 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Summary: How to keep DB changes from being lost .. includes code.

2. Using user-variables in external commands? II

3. Using user-variables in external commands?

4. Using user-variables in external commands?

5. Storing Sets and Enums in a Table ???..can this be done?

6. TDateTime Problem w/Access thru ODBC

7. piping a variable to an external command

8. using double quote for long argument when calling external commands

9. Using Perl OPEN to Execute External Command Line Programs

10. YUV Color Space.

11. command line II

12. Diablo II site -> Diablo II Exchange

 

 
Powered by phpBB® Forum Software