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.
Ok,first of,let me say that I'm a newbie and need things explained in a clear simple manner. Also,let me say that I have done #man mail and read it and still don't understand it.
What I want to know about 'mail' is:
1. is the' mail' command some sort of quick way of sending mail to other users on your machine rather than via proper email (Evolution etc)?
2.Do you need to set anything up for this,or do users automatically have inboxes for incoming mail?
3,From what I've read, I can send ' user1' a message simply by typing
# mail user1
and then writing in my message.
IS that right?
4.What I don't understand is where do the messages get sent to on the system? If I send a message to myself,what file does it go to?
5. How do I read a message if I send it to myself?
You can use the mail command to send mail to anyone. So if you have a yahoo account you could say:
Code:
mail -s 'did this work?' jow_blow@yahoo.com <enter>
Type you message here
.
If you don't supply the subject, it will prompt you. The period on the last line signifies the end of the message. Or as you mentioned you can send it to a user ie:
mail user1
just as you mentioned.
The mail to users will go to /var/spool/mail/user1 where it waits to be fetched by you. The /var/spool/mail/username holding area is created automagically when you create a new user. You can use evolution or any other email client to pick up this mail, just read the docs to set up your local account...
btw your full address will be user@hostname, so if you have a FQDN you can send mail to your computer from anywhere, else you can only recieve from your box.
run uname -n, that's your hostname. If you haven't set it it is almost certainly 'localhost' You can set your own using the hostname command ie:
hostname myCrazyComputer
This will not persist between reboots however. If you want to set your hostname permanently search this site for a million explanations how...
As I was saying though, you need a FQDN for this to work with the mail command. I got a free one from no-ip, so in my /etc/hosts file looks like:
One other quick question while I'm on the subject of mail:
when I do
#mail
I get quite a few old mails in there.
I read that to delete them you just type
#delete N
where N is the number of the email you want to delete.
However,when I do that ,exit and do #mail again, the mail that i deleted is still there. Why is that,do you think?
Well, this one has me stumped....I'm sure I don't know. Usually the /var/spool/mail/ directories are holding tanks right? That's where the mail stays until you use a mail reader to get it, then it gets moved to your personal mail folder (typically ~/Mail) where you can do what you wish with it.
I may be wrong but I don't think you are supposed to directly read/delete mail from the /var/spool/mail area, rather, set up a client to fetch it for you.
actually,I found a way to do it
What I did was I set up evolution to read the local mail and then deleted it from Evolution.
Dont know why it didn't work before.Maybe you are right,you need to do it from a client.
Anyway,thanks very mch for your help.
I really appreciate it .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.