How to Read mail in a UNIX server?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to Read mail in a UNIX server?
# 1  
Old 04-17-2015
How to Read mail in a UNIX server?

My unix server is somehow configured to send mail to any id in my network. However, how do I read the mails in my inbox.

I can send mails using
Code:
mailx -s

However, when I try to check whether there is mail using
Code:
mailx -e

it shows invalid option.
# 2  
Old 04-17-2015
You can try just mail, which is usually a link to a mail client. When I check on a Red Hat Linux box, I get this:
Code:
$ mail
No mail for myuser
$ which mail
/bin/mail
$ ls -la /bin/mail
lrwxrwxrwx. 1 root root 22 Mar  5 10:20 /bin/mail -> /etc/alternatives/mail
$ file /etc/alternatives/mail
/etc/alternatives/mail: symbolic link to `/bin/mailx'

Also you can check what your mailx offers as command switches when checking the man page.
Just calling it without any switch should work too.

Last edited by zaxxon; 04-17-2015 at 08:58 AM.. Reason: altered while trying out ;)
# 3  
Old 04-17-2015
The thing you use to send mail in UNIX is not generally also a mail client. In a UNIX server you see things from the perspective of the mail transport agent, whose job is to keep mail moving in and out and deliver it to you as application-independent files. In other words the email is already there, somewhere, and just need a program which knows where to look and how to read it.

You have your choice of mail clients, it depends on what your system has installed.

Last edited by Corona688; 04-17-2015 at 12:36 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Accessing mail server from UNIX

Hi all, I need to access the mails sent to me in a mail server(IMAP mail server), and download the attachment sent in the mail to the unix environment. Please help me to acheive the same. I am not able to install python , PHP modules in my unix box due to installation restriction in my work... (3 Replies)
Discussion started by: arun1377
3 Replies

2. UNIX for Advanced & Expert Users

How can I send a mail from my outlook or other mail accounts to UNIX server?

Hi all, I want to send a mail for my business needs from outlook account to an unix server (HP-UX) but I don't send any mail. While I can send from the unix server to my outlook account, I can't send from outlook to unix. How can I achieve this ? How can I send a mail from my outlook or other... (2 Replies)
Discussion started by: igelegin
2 Replies

3. Cybersecurity

Mail server to Unix Server Virus threat

I want to connect a SunOS Generic_142900-03 sun4v sparc SUNW,Netra-T2000 server carrying live traffic to my mail server so that i can forward the email on root on the server to my corporate email address. I am not too sure about the virus threat that could arise. I want a unidirectional transfer... (2 Replies)
Discussion started by: thinktank
2 Replies

4. HP-UX

[Solved] How do I configure Unix Mail Server to use another Mail Exchange Server

We have configured our mail unix server and can send out emails automatically from applications running on unix to different people in our company as well as outside our company. However there is an outside client who is not receiving these emails because the settings on their mail server cannot... (4 Replies)
Discussion started by: Tenyhwa
4 Replies

5. UNIX for Advanced & Expert Users

How to relay mail to mail server from Unix ?

Hi, I need to send email notifications from Unix/Linux box to users using mailx. In these Unix/Linux boxes mail is not configured however we are having mail server configured in our LAN. Could you please provide instructions to configure relay in these boxes so that we can relay our mails... (3 Replies)
Discussion started by: sourabhsharma
3 Replies

6. Shell Programming and Scripting

script to read mail on a mail server

Hi All, Is there any way Unix shell script can directly read a mail on a mail server (for eg. abc@xyz.com) and save it as a text file in a unix directory ? Thanks PRKS ---------- Post updated at 08:37 AM ---------- Previous update was at 08:36 AM ---------- I am using ksh (1 Reply)
Discussion started by: PRKS
1 Replies

7. Programming

Sending mail in C/C++ in unix server

Hi Frnds, I have a task in my project wherein i have to send out a mail from my C++ code.With some file attachements.Please help me in this. At a higher level wat i can tell is my code generated 3 csv file and i have to send these files as attachement. My code is executed in unix... (6 Replies)
Discussion started by: electroon
6 Replies

8. Shell Programming and Scripting

How to send a mail in unix--Please read the description

Hi frnds, I want to send 3 csv files as attachement in unix server how do i do this. Following is the steps which i need to follow: 1.Shell script sets the environment variables 2.Shell script calls a C++ executable NOTE:This executable will generate 3 csv files 3.After the... (2 Replies)
Discussion started by: electroon
2 Replies

9. UNIX for Dummies Questions & Answers

can not send mail from unix server to company/yahoo mail

hi, Gurus, I need some help with sending mail out from my UNIX server: It is running Solaris 2.6 and the sendmail version is 8.8. Output of :/usr/lib/sendmail -d0.1 -bt < /dev/null Version 8.8.8+Sun Compiled with: LOG MATCHGECOS MIME7TO8 MIME8TO7 NAMED_BIND NDBM NETINET ... (5 Replies)
Discussion started by: b5fnpct
5 Replies

10. UNIX for Dummies Questions & Answers

setup mail server on my unix machine

hi, i just finished installation solaris 8 on my unix machine. i want to setup a mail server on it ( i assume it has not had one yet). so, what is my first step? where can i find out step by step configuration procedure on web ? so any expert is willing to teach me? pls help me. ... (1 Reply)
Discussion started by: champion
1 Replies
Login or Register to Ask a Question