Discussion:
Elm/MTA communication question
(too old to reply)
Conrad Eaglehill
2004-09-25 01:31:54 UTC
Permalink
Hi. I have a question concerning Elm 2.5.2's source code, though
perhaps it's not specific to this version.

I'm working on a software engineering course project, where, among
other things, we're to modify preexisting communication protocols
between an MUA and an MSA/MTA. I'm debating between sendmail and
postfix as the MTA, but in either event, I'd need to determing how Elm
opens a connection (and communicates) with the mail server to send a
message.

I think the work is done in syscall.c (syscall_())and sndmsg.c
(build_mailer_command()), but I'm not seeing anything resembling a
protocol (SMTP or otherwise) that I thought it'd follow. Am I on the
wrong track somehow?

Thanks in advance,

Conrad Eaglehill
Kari Hurtta
2004-09-26 05:46:46 UTC
Permalink
Post by Conrad Eaglehill
Hi. I have a question concerning Elm 2.5.2's source code, though
perhaps it's not specific to this version.
I'm working on a software engineering course project, where, among
other things, we're to modify preexisting communication protocols
between an MUA and an MSA/MTA. I'm debating between sendmail and
postfix as the MTA, but in either event, I'd need to determing how Elm
opens a connection (and communicates) with the mail server to send a
message.
I think the work is done in syscall.c (syscall_())and sndmsg.c
(build_mailer_command()), but I'm not seeing anything resembling a
protocol (SMTP or otherwise) that I thought it'd follow. Am I on the
wrong track somehow?
Thanks in advance,
Conrad Eaglehill
Envelope sender and recipients are given on command line of sendmail and
mail body including headers are given to standard input of sendmail.

(Well, Elm does not give envelope sender so then it defaults to
calling user of sendmail.)

Other information is also given on command line.

/ Kari Hurtta
Conrad Eaglehill
2004-09-29 18:40:01 UTC
Permalink
Post by Kari Hurtta
Envelope sender and recipients are given on command line of sendmail and
mail body including headers are given to standard input of sendmail.
(Well, Elm does not give envelope sender so then it defaults to
calling user of sendmail.)
Other information is also given on command line.
/ Kari Hurtta
So, does this mean that Elm is not a standalone program? That it
requires sendmail to operate? Is there a way to have Elm communicate
directly with the MTA, or must one have snedmail already installed? Or
am I musinderstanding what you're saying altogether?

Thanks in advance,

--Conrad Eaglehill
Bill Pemberton
2004-09-30 13:00:32 UTC
Permalink
Post by Conrad Eaglehill
So, does this mean that Elm is not a standalone program? That it
requires sendmail to operate? Is there a way to have Elm communicate
directly with the MTA, or must one have snedmail already installed? Or
am I musinderstanding what you're saying altogether?
Your understanding is correct, elm requires a MTA to actually send the email.
--
Bill
Conrad Eaglehill
2004-10-01 12:00:22 UTC
Permalink
Post by Bill Pemberton
Post by Conrad Eaglehill
So, does this mean that Elm is not a standalone program? That it
requires sendmail to operate? Is there a way to have Elm communicate
directly with the MTA, or must one have snedmail already installed? Or
am I musinderstanding what you're saying altogether?
Your understanding is correct, elm requires a MTA to actually send the email.
Oops, I think I was slightly unclear. I meant does Elm have to have an
MTA on the *same* computer as itself. My understanding was that one
would use Elm on comp A to compose a message, and then Elm would use a
protocol to communicate with comp B, which had sendmail or some other
MTA when I wanted to send my message. Elm sends its message to the
MTA, which in turn sends it to the mailbox of the person I wanted to
send it to. If one needs a mail server and a mail client on the same
machine, why have a client-server model in the first place?

Hopefully I clarified my earlier statements.

--Conrad Eaglehill
Bill Pemberton
2004-10-01 13:02:55 UTC
Permalink
Post by Conrad Eaglehill
If one needs a mail server and a mail client on the same
machine, why have a client-server model in the first place?
The flip side is that for the model your speaking of, the MUA has to
understand most of the protocol to send mail. If the client is able
to do all the work, why have the server? It's a duplication of work.
sendmail knows how to send mail, so we let it.
--
Bill
Sven Guckes
2004-10-01 13:16:22 UTC
Permalink
Post by Conrad Eaglehill
Post by Bill Pemberton
Post by Conrad Eaglehill
So, does this mean that Elm is not a standalone program? That it
requires sendmail to operate? Is there a way to have Elm communicate
directly with the MTA, or must one have snedmail already installed?
Or am I musinderstanding what you're saying altogether?
Your understanding is correct, elm requires a MTA to actually send the email.
Oops, I think I was slightly unclear. I meant
does Elm have to have an MTA on the *same* computer as itself.
no... you can print out the messages, send them to india or china,
and have them typed in again by some children who earn their
bosses' living that way. and they would know how to handly an MTA...
Post by Conrad Eaglehill
My understanding was that one would use Elm on comp A to compose a
message, and then Elm would use a protocol to communicate with comp B,
which had sendmail or some other MTA when I wanted to send my message.
such a program which communicates the messages to
another computer is called (hold breath) an MTA. duh.
Post by Conrad Eaglehill
Elm sends its message to the MTA, which in turn sends
it to the mailbox of the person I wanted to send it to.
that's basically how MTAs work.
Post by Conrad Eaglehill
If one needs a mail server and a mail client on the same
machine, why have a client-server model in the first place?
it's.. a mystery.

ps: breathe in again now..

Sven
--
Sven Guckes Quick Overview to MTAs: exim, postfix, qmail, sendmail;
courier, esmtp, masqmail, nullmailer, smail, smtppush, ssmtp, zmailer.
-> http://packages.debian.org/stable/mail/mush.html and some MUAs:
/bin/mail, elm,mutt,pine; gnus; kmail; nail; evolution; sylpheed...
Conrad Eaglehill
2004-10-01 20:21:22 UTC
Permalink
Post by Sven Guckes
Post by Conrad Eaglehill
My understanding was that one would use Elm on comp A to compose a
message, and then Elm would use a protocol to communicate with comp B,
which had sendmail or some other MTA when I wanted to send my message.
such a program which communicates the messages to
another computer is called (hold breath) an MTA. duh.
No, a program that communicates a message to another computer is (hold
breath) just a program that communicates a messafge to another
computer. An MTA, on the other hand, actually does more, but simply,
it handles sending and receiving of email to and from the system it is
based upon, in general using standard protocols like SMTP with other
servers, or POP3 and IMAP to communicate in a one-way fashion with its
clients. Duh.

Quite a difference, wouldn't you say?
Post by Sven Guckes
Post by Conrad Eaglehill
Elm sends its message to the MTA, which in turn sends
it to the mailbox of the person I wanted to send it to.
that's basically how MTAs work.
One can write a 70 line or so program that can send a message from one
computer to another and vice versa. That wouldn't be an MTA. At
school, we have one mail server, and no matter what comp we're on, we
can write a message, and our mail server sends it to where it needs to
go--all the client does (or should do) is get that message to our mail
server. If it did the actual sending, then there would be hundreds of
mail servers to keep track of. That model doesn't make any sense, and
I highly doubt it's used in practice, though it may be used with Elm,
which makes it a bad candidate for my work.
Post by Sven Guckes
Post by Conrad Eaglehill
If one needs a mail server and a mail client on the same
machine, why have a client-server model in the first place?
it's.. a mystery.
Hence my desire to learn, which grows stronger despite the sarcasm.
Post by Sven Guckes
Sven
--Conrad Eaglehill
U***@gmx.de
2004-10-01 23:00:11 UTC
Permalink
In <***@posting.google.com> ***@hotmail.com (Conrad Eaglehill) writes:

[del]
Post by Conrad Eaglehill
One can write a 70 line or so program that can send a message from one
computer to another and vice versa. That wouldn't be an MTA. At
school, we have one mail server, and no matter what comp we're on, we
can write a message, and our mail server sends it to where it needs to
go--all the client does (or should do) is get that message to our mail
server. If it did the actual sending, then there would be hundreds of
mail servers to keep track of. That model doesn't make any sense, and
I highly doubt it's used in practice, though it may be used with Elm,
which makes it a bad candidate for my work.
Then, your one and only mail server seems to be configured as a smart
host on all your other boxes (or you use "mailers" like mozilla, which
has a brain dead SMTP client build in.). Such a configuration is dead
simple, even with sendmail and once it's done you don't have to fiddle
with it ever again (security patches are handled by the distribution
and you have to apply them anyway, so one package more or less doesn't
really matter on a workstation. On a server, every package less is a
Good Thing (TM)).
These clever "mailers" usually use POP3 for ingoing mail and SMTP for
outgoing mail, but mail, mailx and elm are decades older and are using
another concept and depend on a local MTA.
Post by Conrad Eaglehill
Post by Sven Guckes
Post by Conrad Eaglehill
If one needs a mail server and a mail client on the same
machine, why have a client-server model in the first place?
it's.. a mystery.
Hence my desire to learn, which grows stronger despite the sarcasm.
Because you want a local mail delivery on a UNIX box, for a variety of
reasons (error messages, cron mails, logging reasons, etc.). That's
normally the place where elm lives, so depending on an MTA isn't a
big deal, as mail delivery, local or remote is handled best by an
MTA (yes, you can live with procmail or deliver when it's only local
mail, but this is rather limiting). If your hundreds of boxes aren't
running UNIX this may be an alien concept to you, for any UNIX
standard install it's the default.

HTH,
Uli
--
Dipl. Inf. Ulrich Teichert|e-mail: ***@gmx.de
Stormweg 24 |listening to: Noticable One (Rotten Apples)
24539 Neumuenster, Germany|Obstacle 1 (Interpol) Paranoia (N.Y. Rel-X)
Conrad Eaglehill
2004-10-02 13:25:06 UTC
Permalink
Post by U***@gmx.de
Then, your one and only mail server seems to be configured as a smart
host on all your other boxes (or you use "mailers" like mozilla, which
has a brain dead SMTP client build in.). Such a configuration is dead
simple, even with sendmail and once it's done you don't have to fiddle
with it ever again (security patches are handled by the distribution
and you have to apply them anyway, so one package more or less doesn't
really matter on a workstation. On a server, every package less is a
Good Thing (TM)).
These clever "mailers" usually use POP3 for ingoing mail and SMTP for
outgoing mail, but mail, mailx and elm are decades older and are using
another concept and depend on a local MTA.
Thank you. What you have told me makes perfect sense. I thought maybe
Elm or other mail clients would have at least support the option of
the smart host, but maybe they do indirectly, through the MTA.
Post by U***@gmx.de
Because you want a local mail delivery on a UNIX box, for a variety of
reasons (error messages, cron mails, logging reasons, etc.). That's
normally the place where elm lives, so depending on an MTA isn't a
big deal, as mail delivery, local or remote is handled best by an
MTA (yes, you can live with procmail or deliver when it's only local
mail, but this is rather limiting). If your hundreds of boxes aren't
running UNIX this may be an alien concept to you, for any UNIX
standard install it's the default.
Well, I definitely understand the usefulness of having a mail server
on any Unix box. But I also understand the usefulness in having one
server handling all the mail needs of a company or a school. With
Unix, I guess you can have both. :-)

Thank you for the response; you definitely answered practically every
question I've had, asked or unasked, about this project.
Post by U***@gmx.de
HTH,
Uli
--Conrad Eaglehill
Sven Guckes
2004-10-02 02:17:24 UTC
Permalink
Post by Sven Guckes
Post by Conrad Eaglehill
My understanding was that one would use Elm on comp A to compose a
message, and then Elm would use a protocol to communicate with comp B,
which had sendmail or some other MTA when I wanted to send my message.
such a program which communicates the messages to
another computer is called (hold breath) an MTA. duh.
No, a program that communicates a message to another computer is
just a program that communicates a message to another computer.
i think you already know the solution to your problem.
you just fail to describe the problem.
An MTA, on the other hand, actually does more, but simply, it handles
sending and receiving of email to and from the system it is based upon,
in general using standard protocols like SMTP with other servers, or
POP3 and IMAP to communicate in a one-way fashion with its clients. Duh.
so you just want to hand on the message to another host
which takes it in without question in plain text?
did you just say "smart host"?
or something like "open relay"?

you'll get better answers the more information you can provide.

Sven
Kari Hurtta
2004-10-09 06:42:06 UTC
Permalink
Post by Conrad Eaglehill
Post by Bill Pemberton
Post by Conrad Eaglehill
So, does this mean that Elm is not a standalone program? That it
requires sendmail to operate? Is there a way to have Elm communicate
directly with the MTA, or must one have snedmail already installed? Or
am I musinderstanding what you're saying altogether?
Your understanding is correct, elm requires a MTA to actually send the email.
Oops, I think I was slightly unclear. I meant does Elm have to have an
MTA on the *same* computer as itself. My understanding was that one
would use Elm on comp A to compose a message, and then Elm would use a
protocol to communicate with comp B, which had sendmail or some other
MTA when I wanted to send my message. Elm sends its message to the
MTA, which in turn sends it to the mailbox of the person I wanted to
send it to. If one needs a mail server and a mail client on the same
machine, why have a client-server model in the first place?
Well, every unix (or linux) machine needs anyway some programs
with name 'sendmail' to which programs can submit mail via
standard input.

That is normal submission mechanism. It is required for system
function. For example 'cron' requires that.

In practice you can not install system without some program
with name 'sendmail' is installed. Package management on
installation prevents that.

/ Kari Hurtta

Kari Hurtta
2004-10-09 06:36:17 UTC
Permalink
Post by Conrad Eaglehill
Post by Kari Hurtta
Envelope sender and recipients are given on command line of sendmail and
mail body including headers are given to standard input of sendmail.
(Well, Elm does not give envelope sender so then it defaults to
calling user of sendmail.)
Other information is also given on command line.
/ Kari Hurtta
So, does this mean that Elm is not a standalone program? That it
requires sendmail to operate? Is there a way to have Elm communicate
directly with the MTA, or must one have snedmail already installed? Or
am I musinderstanding what you're saying altogether?
Thanks in advance,
On my version on Elm it is possible also use on global elm.rc
with settings

# This tells type of mailer, value can be one of
# unknown, sendmail, submitmail, execmail
# After these parameters there can be following additional options
# path= gives path of mailer
# add-from=dont, add-from=yes,
# use-domain=no, use-domain=yes,
# supported-bodytype=7bit, supported-bodytype=8bit,
# supported-bodytype=binary
# supports-dsn=no, supports-dsn=yes
# verify=no, verify=yes
# allow-set-sender=no, allow-set-sender=yes
# See also: add-sender
mailer = submission; server="localhost"

# Specify tags for shared libraries, which should be loaded.
use-connect-library = smtp



On that case code from libelmme-smtp.so is used which
uses SMTP to submission port.


However that is not normally used.


/ Kari Hurtta
Loading...