[SLUG] How email works (was re: sendmail)

From: Derek Glidden (dglidden@illusionary.com)
Date: Tue Jan 22 2002 - 14:57:14 EST


On Tue, 2002-01-22 at 14:16, Grantham, Patrick wrote:
> pardon my poor grammer. There is mail in the email boxes (as evident via
> webmin and pine.) Outlook clients just can seem to retrieve it. Thanks for
> the suggestion. I will look into it.

Yep, that actually sounds consistent with not having a POP server
running. mutt and webmin will both look directly at the local mail
spool, while Outlook will need to hit a POP server to retrieve the mail.

For anyone else who's monitoring this thread's benefit, here is a
50,000-foot (and acronym-ridden) overview of how mail works:

You have a "Mail User Agent", i.e. Mutt or Netscape or Outlook or
Evolution, with which you compose an email message. When you click the
"Send" button, the MUA contacts your SMTP server which is a "Mail
Transfer Agent", something like sendmail or exim or qmail.

"SMTP" stands for "Simple Mail Transfer Protocol" and is the protocol by
which mailers talk to each other. (RFC821 for those interested in that
sort of thing...) SMTP is nothing more than a few "HELO" and "MAIL" and
"QUIT" commands that allow mailers to establish a communication session
so that they can transfer email content back and forth. Some MUAs are
capable of speaking enough of the SMTP spec to deliver the mail
directly, but generally, they rely on an outside MTA to do the delivery.
Once your MUA has delivered the email to your MTA, your MTA uses DNS to
look up the hostname of the machine that accepts delivery of email for
the address to which that email is being sent. That machine is also
running an MTA that speaks SMTP. So your MTA makes an SMTP connection
to that MTA and ... err, transfers your email. Once the remote side has
the email, it needs to deliver the mail, and it does that with a "Mail
Delivery Agent."

Often the MDA is also sendmail, but things like "mailx" and procmail are
also MDAs. The MTA, once it has received an email, hands it off to the
MDA, (which might be itself, so I guess it would just move the email
from the right hand to the left hand...) which then does something with
it - either puts it directly in the local mail spool, or parses it to
decide if it's SPAM or what-have-you. Regardless, when the MDA is done
with it, the mail is considered "delivered" and all that's left is for
another MUA to read it.

That MUA, if it's running on the same box to which the mail was
delivered, can just read the mail file directly. Things like "pine" and
"mutt" are usually used in this way, since they are command-line clients
that can run on the same host as the MTA that receives the email. If
your MUA has direct access to the mail spool, then your job is done.

If your MUA is *not* on the same local box as the mail spool, then you
need one more step. And it's a step that doesn't have a generic
"M-something-A" acronym like "Mail Fetching Agent", (They're usually
considered some form of MUA or MTA even though they're actually a little
different...) but that's what you need and you get that with POP and
IMAP.

Things like POP ("Post Office Protocol" - RFC1939 for POP3) and IMAP
("Internet Message Access Protocol" - RFC2060 for IMAP4) are protocols
that allow a remote MUA to retreive mail from the spool without direct
access to the spool on that machine. POP and IMAP servers are usually
NOT the same piece of software as your MTA. To get IMAP or POP support
working, you will need to install a seperate POP or IMAP server - often
the same server supports both protocols.

Fetchmail is another way of getting your email from a remote server, but
works differently in that it tries to support every possible method of
retrieving your email from somewhere to put it somewhere else, so it
kind of wraps EVERY mail delivery method up in one place.

So the basic flow of email goes something like:

MUA -> MTA -> MTA -> MDA -> spool --> MUA
                                  \ (or)
                                   -> POP/IMAP/Fetchmail -> MUA

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#!/usr/bin/perl -w
$_='while(read+STDIN,$_,2048){$a=29;$b=73;$c=142;$t=255;@t=map
{$_%16or$t^=$c^=($m=(11,10,116,100,11,122,20,100)[$_/16%8])&110;
$t^=(72,@z=(64,72,$a^=12*($_%16-2?0:$m&17)),$b^=$_%64?12:0,@z)
[$_%8]}(16..271);if((@a=unx"C*",$_)[20]&48){$h=5;$_=unxb24,join
"",@b=map{xB8,unxb8,chr($_^$a[--$h+84])}@ARGV;s/...$/1$&/;$d=
unxV,xb25,$_;$e=256|(ord$b[4])<<9|ord$b[3];$d=$d>>8^($f=$t&($d
>>12^$d>>4^$d^$d/8))<<17,$e=$e>>8^($t&($g=($q=$e>>14&7^$e)^$q*
8^$q<<6))<<9,$_=$t[$_]^(($h>>=8)+=$f+(~$g&$t))for@a[128..$#a]}
print+x"C*",@a}';s/x/pack+/g;eval 

usage: qrpff 153 2 8 105 225 < /mnt/dvd/VOB_FILENAME \ | extract_mpeg2 | mpeg2dec -

http://www.cs.cmu.edu/~dst/DeCSS/Gallery/ http://www.eff.org/ http://www.anti-dmca.org/



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 19:25:09 EDT