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 Code:
(host mx4.hotmail.com [65.55.92.168] refuse to talk to me: 421 cannot conect to SMTP server. I don't want only de answer.. I want a help to know what I need to study first. :-) Thanks in advanced |
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 Here are more details for Postfix: http://www.postfix.org/BASIC_CONFIGURATION_README.html |
Quote:
|
Quote:
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 |
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 |
All times are GMT -5. The time now is 06:07 PM. |