Sending mail from command line

Silver-0-surfer

Well-Known Member
Joined
Jan 5, 2008
Messages
317
Reaction score
7
Location
CPT
How in HECK!!!! do you do it:twisted:
lol, but seriously it just doesn'y work.

Running Centos and I type

mail [email protected]
subject: Test
Test
.
CC:none

....

and then I wait and wait and wait
(I get no mail)
I see this pop up

You have new mail in /var/spool/mail/root

and its like the email got sent to me. Do I need to set and smtp server or something anywhere? I'm really stuck here.

EDIT: buy "the email got sent to me" I mean to the server and not the client

Thanks to any1 that can help
 
Dunno about cli but from my early Unix days I remember Elm which can be launched from the cli.
 
I installed Postfix (but you can also use CentOS sendmail) and used Dovecot (what a retarded named for mail agent!) to configure my IMAP and POP services.

Then it was : yum install thunderbird & my emails were flying off the server. :)
 
wow haven't done this since school days and shell acounts :)
 
Well all I know is the smtp commands when you telnet into a smtp server and they go like

MAIL FROM:
RCPT TO:
DATA:
bla bla
.

Not sure if this will help you, maybe you're forgetting the new line with the full stop :)
 
Install Exim,

and issue the following command:

$ echo "This is a test." | mail -s Testsubject [email protected]

See if that works for you.

Err um EXIM is hardcore for a beginner the echo "This is a test." | mail -s Testsubject would work no matter with MTA you are using.

use postfix its lighting fast and way easier, just set your smarthost to a public smtp like smtp.saix.net if you are using saix for you local. check out /var/log/maillog for any strange signs. i assume dns is setup correct.
 
Top
Sign up to the MyBroadband newsletter
X