From: ++imanshu on
On Nov 11, 4:14 am, Ben Morrow <b...(a)morrow.me.uk> wrote:
> Quoth "Peter J. Holzer" <hjp-usen...(a)hjp.at>:
>
>
>
> > On 2009-11-09 09:45, ++imanshu <himanshu.g...(a)gmail.com> wrote:
> > > On Nov 8, 11:03 pm, smallpond <smallp...(a)juno.com> wrote:
> > >> Installation instructions for Mail::Sendmail:
>
> > >> "At the top of Sendmail.pm, set your default SMTP server(s),
> > >> unless you specify it with each message, or want to use the
> > >> default (localhost)."
>
> > > yes I wrongly assumed smtp to be so simple that the module alone could
> > > handle it without another server.
>
> > That doesn't make sense. A protocol specifies how two (or more) entities
> > talk to each other. In the case of a client/server protocol like SMTP,
> > how a client talks to a server. Since Mail::Sendmail implements an SMTP
> > client (it is used to send mail, not to receive it), it needs an SMTP
> > server to talk to.
>
> It's not a priori obvious that Mail::Sendmail can't (and shouldn't)
> perform MX lookups and deliver the mail directly to the appropriate
> mailhost. OTOH, I would say anyone who *doesn't* know this (and why)
> should not be writing programs which send mail...
>
> Ben

Thanks for the replies. The beating is well deserved :D

I understand that I need to go back to the books for this.

Thank You,
++imanshu
From: Peter J. Holzer on
On 2009-11-11 09:42, ++imanshu <himanshu.garg(a)gmail.com> wrote:
> On Nov 11, 4:14�am, Ben Morrow <b...(a)morrow.me.uk> wrote:
>> Quoth "Peter J. Holzer" <hjp-usen...(a)hjp.at>:
>> > On 2009-11-09 09:45, ++imanshu <himanshu.g...(a)gmail.com> wrote:
>> > > On Nov 8, 11:03�pm, smallpond <smallp...(a)juno.com> wrote:
>> > >> Installation instructions for Mail::Sendmail:
>>
>> > >> "At the top of Sendmail.pm, set your default SMTP server(s),
>> > >> unless you specify it with each message, or want to use the
>> > >> default (localhost)."
>>
>> > > yes I wrongly assumed smtp to be so simple that the module alone could
>> > > handle it without another server.
>>
>> > That doesn't make sense. A protocol specifies how two (or more) entities
>> > talk to each other. In the case of a client/server protocol like SMTP,
>> > how a client talks to a server. Since Mail::Sendmail implements an SMTP
>> > client (it is used to send mail, not to receive it), it needs an SMTP
>> > server to talk to.
>>
>> It's not a priori obvious that Mail::Sendmail can't (and shouldn't)
>> perform MX lookups and deliver the mail directly to the appropriate
>> mailhost.

I could answer that in that case it still needs a server, it just
determines the server from the recipient domain via DNS instead of from
local configuration. But that would be nitpicking.

Mail::Sendmail should be able to talk to an MX if you can configure that
locally (which might make sense if you just want to send mail to a fixed
address), but in general this isn't useful. It wants a local submission
server which can then handle all the hard parts of mail transport,
especially queueing and retries after temporary failures.

>> OTOH, I would say anyone who *doesn't* know this (and why)
>> should not be writing programs which send mail...
>
> Thanks for the replies. The beating is well deserved :D

It wasn't meant as a beating. I was just puzzled how somebody who
obviously knows enough about SMTP to recognize SMTP keywords could fail
to recognize that Mail::Sendmail implements an SMTP client (or, more
specifically, a SUBMISSION client) and therefore needs an SMTP server to
talk to.

hp