[Tfug] email question

Quag7 coldfront at frostwarning.com
Tue Jun 26 15:14:08 MST 2007


On Tuesday 26 June 2007 1:05 pm, Joe Blais wrote:

> I know our ISPs name, pop, smtp things (whatever I entered into winders
> outlook) but I didn't find where / how to make those settings in Linux.  I
> did set up email with Email (evolution) and there's a Kmail, but I don't
> think I'll have them on my final machine -- but perhaps I should -- that's
> part of my problem.  What MTA (?) is simple enough for me to setup.  And,
> can I just call it from my app and pass it a few parameters so it will send
> a short message?

If I'm understanding you right, you might want to try an application 
imaginatively titled "email"

http://email.cleancode.org

This is in the repositories of the distributions I use.

I call it from scripts all the time, and it can be used to send through 
POP/SMTP on a remote (say an ISP's) server pretty simply, but normally I send 
mail through Postfix.

Syntax works like:

/usr/bin/email -s "Subject" -a attachment.ext -r smtp.server.com -u 
smtp_user -i smtp_password -n "From name" -f "From email address" 
destination at address.com

And then you can add < textfileforbody.txt or just plain text quoted.  All you 
need is the man page.

There are other switches for SMTP authentication should you need it.  This 
obviates the need for running a mail server on your local system, if you want 
to avoid that business altogether.  The program can also read much of the 
configuration info from a config file if you don't want to deal with passing 
it as an argument.

Postfix and exim are fairly easy to set up, especially if you use a 
distribution that uses them by default (exim on Debian for example, prompts 
you when it installs for some info, and then installs it ready to go).  If 
you have to configure a mail server from scratch, there are many Postfix 
guides online.  I configured it via one several years ago (forget which) and 
have just copied my config and periodically updated it for different machines 
ever since.




More information about the tfug mailing list