Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
mail -s “Hello world” you@youremailid.com < textToSend.txt
the command line returns back, which means that the line is executed. but I do not receive any mails.
I am not sure what is causing that . perhaps send mail is not installed . Please try to help me with the next steps but it should be a solution that will not interfere with my normal mails or make my system vulnerable to the outside world. I just need the mail for sending mails to my account.
Well, if you got no error or msgs, it probably sent it to your mail server service on the same box.
What is your MTA/SMTP server; probably sendmail or postfix I'd guess.
Check /var/log/maillog; also try
mailq -AC
postqueue: fatal: Queue report unavailable - mail system is down
user@host:~> mailq -Lq
postqueue: fatal: Queue report unavailable - mail system is down
The 'mailutils' is installed successfully or not?
Try on terminal
"$ echo "mail-body" | mail -s "mail-subject" "receivers.address@linuxmail.com"" If it is sent and received successfully then you can try above command mentioned by shivaa
Wrong. The mailutils are obviously installed, since the command RUNS, and the OP mentioned he was getting output in the log files. Mailx will ALSO fail, since it appears that a mail system hasn't be set up.
Quote:
If you still get this error. Uninstall and install postfix and try again.
Wrong. Postfix is only ONE mail system, and it may or may not even be in use, so giving advice before knowing what the OP has is counterproductive.
OP, in order for your system to send mail anywhere, you have to configure the mail system, and start it. It appears you haven't, or that the mail system you have is down. Are you using postfix or sendmail?? You can start them with either "/etc/init.d/postfix restart" or "/etc/init.d/sendmail restart". That will stop any running processes for those services, and start them back up again, and may correct your "mail system is down" problem.
Mailx *CAN* work without either of those, but it also needs configuration, in order to know which other mail server to send your message TO. If you're in a company environment, chances are you already have a mail server. So, configure your mail system to use it as a smart host...there are MANY guides to do this for both postfix or sendmail. http://www.cyberciti.biz/faq/configu...-a-smart-host/ http://gopalthorve.com/install-postf...ure-smarthost/
The man page on the mailx command will tell you how to use either another IMAP or POP3 server to send your mail through: http://linux.die.net/man/1/mailx
Sorry but no intention to put wrong information.
Once I got the same error.I kept the solution in my linux notes. I did following process and it was solved.
I was getting
Code:
mail postfix/postqueue[20397]: fatal: Queue report unavailable - mail system is down
When I installed the mailutils,the postfix was installed automatically. I did not install it.
I was not able to send mails using terminal or apache (php mail function)
I found it on one site to detect the error, it asked first what is the out put of
Code:
mailq -AC
same command (asked by chrism01)
It gave me
Code:
mail postfix/postqueue[20397]: fatal: Queue report unavailable - mail system is down
The solution was there, Uninstall and install postfix. I did the same and then I type
Code:
mailq -AC
Now this time it gave me
Code:
Mail queue is empty
and I was able to send mail using
Code:
$ echo "mail-body" | mail -s "mail-subject" "receivers.address@linuxmail.com"
It looks like the error is same so I gave this solution, i didn't mean any harm (to OP's system).
Hi it was fixed by starting postfix. could you please let me know if I have to apply any specific security settings?
There's no way we can answer that, since we don't know what the security requirements are of your organization, where the server is located (facing the internet? Internal only?), or what you're trying to do.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.