Mail Command Failure driving me crazy
Hi. I am looking how to use mail command, found some pages and tried to install mailutils and after that used the option, no configuration..
sudo apt-get install mailutils whatever i did, ended up with a failure message such as: Code:
ginger@multilayer:~$ mail -s "hello world" mygmail@gmail.com < letter.txt Quote:
|
mail (aka mailx) is just the end user util; it actually needs an MTA ie mail server SW eg sendmail, postfix etc) to send mail via.
What distro & version have you got? Do you have an MTA service installed; iif so check the logs or try eg /var/log/messages. You could also try re-running with the '-v' option to get more info. |
ubuntu 14 server edition. I only installed mailutils.
http://www.binarytides.com/linux-mail-command-examples/ used this page and some others but did not work |
Like I said, you need an MTA aka mail server service.
According to a quick google, it looks like it would be postfix, so install it Code:
sudo apt-get install postfix |
yeah i know, i also installed postfix.. gives same error
Quote:
|
Like I said, use the -v switch AND check all the logfiles - check with google for the exact log to look at.
For postfix its likely /var/log/maillog |
I dont think i really understand what i should do
what is -v switch? there is no such a file /var/log/mailllog Quote:
|
http://jafty.com/blog/tag/use-linux-...ils-from-shell
This link says log file is inside /var/spool/mail/root there is a path like /var/spool/mail but inside this directory there is no such a file named root or ec2-user.. Inside this directory is empty. |
Alright. I found the log file for this problem
It is inside the /var/log/mail.err here is the log file Quote:
|
Mail Command Failure driving me crazy
Looks like you're missing the config file
Have a look here : http://www.postfix.org/BASIC_CONFIGURATION_README.html |
seriously why it is missing? Should be there by default. And do I have to manually add all of these things? No other solution for this problem?
|
ALright i just created an empty main.cf file and restarted postfix. It worked for some reason even though the main.cf is empty... Sends mails to my gmail but gmail thinks those are spam...
|
Mail Command Failure driving me crazy
That might be fixed by adding yourself in some kind of white list or in Gmail address book I think...
|
Quote:
|
All times are GMT -5. The time now is 07:50 PM. |