LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 09-12-2010, 04:19 PM   #1
professorgenival
LQ Newbie
 
Registered: Aug 2010
Posts: 20

Rep: Reputation: 1
How to send an e-mail with the command line?


Hello everybody :-)

I'm new with mail servers and I want to send a simple mail from my terminal and I need some help...

I'm using opensuse and a Know that I have postfix installed...

I don't know what I need configure first...

I know that I need a SMTP server to send e-mails write?

When I try send e-mail with the command mail I received this message :

Code:
mail -s "meeting reminder" -c professorgenival@hotmail.com micromerces@gmail.com
mailq:

Code:
(host mx4.hotmail.com [65.55.92.168] refuse to talk to me: 421 cannot conect to SMTP server.
I was reading about fetchmail But I can't understand....

I don't want only de answer.. I want a help to know what I need to study first. :-)

Thanks in advanced
 
Old 09-12-2010, 05:53 PM   #2
14moose
Member
 
Registered: May 2010
Posts: 83

Rep: Reputation: Disabled
Short answer:

If your local mail server is Postfix, then you should be able to configure it to forward mail to a remote SMTP server by editing main.cf, like this:
Code:
 /etc/postfix/main.cf

	relayhost = smtp.yourisp.com
If you're using sendmail, the file would be "/etc/mail/relay-domains"

Here are more details for Postfix:
http://www.postfix.org/BASIC_CONFIGURATION_README.html
 
Old 09-12-2010, 05:57 PM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,987
Blog Entries: 54

Rep: Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742
Quote:
Originally Posted by 14moose View Post
Short answer
...the long answer being that Hotmail forces SenderID, a mcrsft-assimilated derivative of SPF.
 
Old 09-12-2010, 10:19 PM   #4
14moose
Member
 
Registered: May 2010
Posts: 83

Rep: Reputation: Disabled
Quote:
...the long answer being
Actually, the "long answer" can get VERY long

I just wanted to make sure the OP covered the "basics" before delving into more detail. There are a LOT of things that can go wrong.

Here are two good links:

Controlling E-Mail Spam

You Might Be an Anti-Spam Kook If...

professorgenival -

1. Your "mail -s" syntax should work fine

2. The main issue is that you need to find a good "relay server", and configure Postfix (and, possibly other stuff) appropriately.

'Hope that helps
 
Old 09-13-2010, 02:05 AM   #5
nsb58
LQ Newbie
 
Registered: Sep 2010
Posts: 5

Rep: Reputation: 0
you can use mutt also with your sendmail or postfix MTA.

You can configure your postfix in /etc/postfix/main.cf in RHEL 5

Three main configurations are to be done in the file.

Outbound
Inbound
authentication (who can send email)

Note: you can also use mutt for pop and imap service with SSL

mutt -f pop://username@servername
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Debian etch - Unable to send mail from command line or from php mail command lqforumuser Linux - Newbie 1 03-01-2009 06:56 AM
command line email client to send mail to remote mail server dhanju Linux - Software 1 03-07-2008 06:37 AM
How to send mail from command line buskmann Linux - Newbie 7 07-23-2006 10:18 PM
can i send mail from command line? iflorea Linux - Software 6 11-02-2005 07:08 AM
Command Line Send Mail nutthick Linux - Newbie 10 01-24-2005 07:52 PM


All times are GMT -5. The time now is 12:08 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration