Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
$ mail
No mail for lazer
$
  • I am able to send mails using mail.
  • I have unread mails in my inbox as I can see in Outlook.

Why doesn't mail show me my mails? How can I make mail fetch them?

share|improve this question
    
have you set up fetchmail (or something) to pull stuff in? mail is typically for mail on your system... for the days when your email was tied to your unix account. –  xenoterracide Sep 12 '10 at 14:22
    
@xeno: no, I havent. I'll read about fetchmail and post here. –  Lazer Sep 12 '10 at 14:25
1  
You should consider rephrasing (or deleting this and reposting) as "How do you set up local mail retrieval and delivery" -- that would be a really good question to have here –  Michael Mrozek Sep 12 '10 at 15:58
add comment

1 Answer

up vote 4 down vote accepted

Traditionally, unix mail is delivered right to your machine (because if your email address is lazer@machine.example.com, surely you have a shell account on machine.example.com). It is usually delivered in a file called /var/mail/lazer or /var/spool/mail/lazer, though a mail delivery agent may put it somewhere else. This still happens on unix mail servers, but nowadays most users don't have direct access to mail servers. Local mail (e.g. from cron jobs) is normally delivered in this way.

Nowadays, typically, the mail is delivered on a server somewhere, and your only access to this server is a mail retrieval protocol, typically POP or IMAP. Microsoft has a proprietary protocol to talk to its mail server (Exchange), and accessing Exchange with anything but Outlook can be difficult (Exchange has an optional modules for POP and IMAP, but they're not always enabled). Most ISPs and mail providers offer both POP and IMAP access; in an all-Microsoft corporate environment you might be stuck with Exchange.

To read your mail under unix, you have three choices:

  • Arrange for the mail server to forward the mail to your computer. This is reasonable only if your computer is always on and connected to the Internet: you take responsibility for any failure, and must set things up properly to handle bounces, spam attempts, virus attacks, etc. Then your mail will arrive in the traditional unix way.

  • Fetch your mail from the server at regular intervals. The usual tool for this is fetchmail. It queries a POP or IMAP server and delivers the mail either using the normal system delivery mechanism or directly to a file of your choice. What protocol to use, what server to query, what username and password to pass, and so on will be found in your Outlook settings. Depending on how you configure fetchmail, a copy of the downloaded mails may or may not remain on the server.

  • Make your mail client itself retrieve the mail from the server using POP or IMAP. Most unix mail clients that are more advanced than the ancient /bin/mail can do this. Again, the parameters to access the server will be found in your Outlook settings. Outside the unix world (e.g. with Outlook) this is typically the only possible mode of operation.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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