Installing SendMail

Gary W. Swearingen garys at opusnet.com
Fri Jun 30 07:14:37 UTC 2006


Wade Smart <wade at wadesmart.com> writes:

> 06292006 2004 GMT-6
>
> Cameron, so i read up on esmtp, but im a little confused.
> "ESMTP does not receive mail, but can deliver mail locally via an MDA."
>
> Ok. Too many things that i do not understand. 
> This is much more complicated to do than I thought. No wonder I never
> choose to do this part. 
>
> Anyway, ESMTP - this says it delivers mail locally. But I need to sent
> it to my mail server and get it back for testing. Or am I just not
> understanding. 

I'm no expert either, but I'll try to help a bit.

(AFAIK, ESMPT means Extended Simple Mail Transport Protocal, but
it sounds like it's also a program that I'm ignorant of.)

Your apps can send mail several ways, probably using available
libraries or external programs.  Commonly, they would send a message
to some such software which then maybe adds some headers and
sends the message to some computer's port 25 using (E)SMPT.  That
computer could be the app's computer or an external one, but it's
one with an e-mail server running and listening to port 25.

Your app can (eg, with library code) talk directly with the local or
external e-mail server.  (An educational exercises is to send a
message by typing SMTP and your message directly into a telnet program
connected to your e-mail server; there's really not much to simply
sending a message.)  But in my limited experience, I've had to use
external server like sendmail (or exim on kubuntu) to get the
mail on 127.0.0.1 port 25 and use a "smart host" feature to wrap
the message with headers and send it on to my ISP (with or without
a second server to queue the messages on the way out, if needed).
This requires configuring the server with my ISP server's name,
eg in /etc/exim4/update-exim4.conf.conf (that file says how to
do it near the top).

So an app like gnus/xemacs sends mail to 127.0.0.1 port 25 using
(E)SMTP and the sendmail or exim software gets it and passes it
on to the "smart host" at the ISP.

You only need a server demon on the app's computer if you're sending
so many messages that you need to queue them out of the system (to
avoid error messages from an in-use port 25?).

To recieve mail, you'll need a program or library which grabs it from
a server using POP and/or IMAP.  I've always let gnus handle that, but
I suppose "fetchmail" and others do it too.  (Well, I suppose you
could also set up e-mail servers to talk to each other via SMTP
instead, but you sometimes are not allowed to or you just don't want
to configure another server to get mail.)

To summarise, I'd think you could just install exim, if needed,
configure with the /etc file following it's instructions, and then
have your apps send mail to 127.0.0.1 port 25 via some library
or custom SMPT code or, most easily, by using the "exim" command
(see the "-bm" option, probably).  Then use some POP/IMAP software
to have the app get mail.




More information about the ubuntu-users mailing list