Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to read email from command line in linux?

I have a server with roundcube installed in it. I tried sending email into it from external email with my username@servername. It turns out that I was not able to read emails (no email pops up in inbox) but when I send email to some external email address from roundcube then it works fine. I was wondering if there is any command-line code to read any emails that any user @server receives.

like image 308
Dinesh Devkota Avatar asked Mar 10 '14 22:03

Dinesh Devkota


People also ask

How do I search mail in Linux?

Usually the local mailbox is either /var/spool/mail/$USER or /var/mail/$USER . If the mailbox is in a non-standard location, the system administrator may have configured the system to set the MAIL environment variable to the location of your mailbox.

What is the mail command in Linux?

In Linux, the mail command is a command-line utility that is used to send and manage the emails from the command line. The mail command is not used to send emails only but also to view and receive emails from the recipients.


1 Answers

Yes. There is a nearly 30 yrs old 'mail' command. But an

apt-get install alpine

helped a lot as well.

like image 104
peterh Avatar answered Sep 22 '22 09:09

peterh