I'm going through the same gyrations right now. My script is going to
ask for some comments to be emailed to the administrator. I was going to
simply pipe everything into qmail-inject, but then once I got into
untainting the data, this could pose some problems. If I understand all
this correctly, would simply piping text into qmail-inject open one up
as a relay?? The malicious user could put valid SMTP headers right in
the comments and qmail-inject would take it. I'm not all that detailed
in the internals of qmail, but am reading the docs right now to get a
handle on it all. My thoughts are it's best to use Net::SMTP
instead..... Looks much safer on the surface....

.mark

>----------
>From:  Greg White[SMTP:[EMAIL PROTECTED]]
>Sent:  Friday, August 10, 2001 8:44 AM
>To:    [EMAIL PROTECTED]
>Subject:       Re: Perl and Qmail
>
>On Fri, Aug 10, 2001 at 01:45:35PM -0000, Frederik Van Herterijck wrote:
>> I'm having some problems sending e-mail from within a perl program 
>> using qmail.
>> 
>> Can someone tell me how I can easily send and receive mails in perl 
>> using qmail. I'm trying and trying but nothing works. 
>> Qmail works perfectly.
>
>This isn't really a qmail question. Reply-to set appropriately.
>
>Perl has nearly any way you can imagine to send mail.
>
>1. Net::SMTP -- this is the one I prefer
>2. using a pipe to qmail-inject (mentioned elsewhere in this thread)
>3. using a pipe to the sendmail wrapper
>
>are the best three, in order, IMHO.
>
>I'm not aware of any _reason_ you'd want to recieve mail in a Perl
>program -- that's what your MTA is there for.
>
>-- 
>Greg White
>
>
>

Reply via email to