I reinstalled Postfix, reconfigured it, and yet I'm getting this message when I use the mail program to start sending a new email.

admin@mail:~$ mail
No mail for admin

Any tip what I should look for?

Thanks!

link|improve this question

feedback

1 Answer

up vote 1 down vote accepted

To send mail via the commandline, use mail:

$ mail -s "Some Subject" admin
Type some stuff
.

The dot tells mail the message is finished. You can also redirect program output to mail, or send a file's contents.

$ cat /etc/motd | mail -s "Message of the day" admin
$ mail -s "Message of the day" admin < /etc/motd

Will both send the contents of /etc/motd to the admin user on the local system. You can send mail out to the internet as well.

$ tail -10 /var/log/mail.info | mail -s "Some mail logs for you" admin@example.com
link|improve this answer
Dang that was fast, you really like to earn points dont cha? ;) Anyway, i'll check it and give you my feedback. – Gabriel A. Zorrilla Aug 26 '09 at 16:55
My superuser bookmark goes to the "Questions -> Newest", I happened to open it to check something else and saw this question :-). – jtimberman Aug 26 '09 at 16:59
Sorry, perhaps I misguided you. I don't want to check for mail, just SEND mail. With the mail command a send mail CLI interface should emerge, backed by postfix. – Gabriel A. Zorrilla Aug 26 '09 at 17:00
Sorry, forgot to write the mail, n00b mistake, my bad. – Gabriel A. Zorrilla Aug 26 '09 at 17:01
So, SOLUTION: If you want to write some mail in the CLI, do this: mail destination@address.com Just typing mail checks your mail. :) – Gabriel A. Zorrilla Aug 26 '09 at 17:02
show 2 more comments
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.