Manage Mail


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Manage Mail
# 1  
Old 11-14-2006
Question Manage Mail

I have recently taken over a UNIX system from another programmer and am just beginning to learn UNIX.

When I enter the MAIL command, the data scrolls off the screen for five minutes. Some of it is several years old.

Can I tell the MAIL command to give me the last few items or the last few days only?

I would like to delete some of the older material? Must it be done one item at a time or can I do it by date or contents?

thank you for your help
# 2  
Old 11-14-2006
mail displays one message at a time, so if it is scrolling for a while after you type mail, the first mail must have a binary attachment. type d after it stops to remove that message.

man is your friend
Code:
  Reading Mail
     The following command-line arguments affect reading mail:

     -e    Mail is not printed. An exit status of 0  is  returned
           if  the  user has mail; otherwise, an exit status of 1
           is returned.

     -h    A window of headers  are  initially  displayed  rather
           than  the  latest message.  The display is followed by
           the ? prompt.

     -p    All messages are printed without prompting for  dispo-
           sition.

     -P    All  messages  are  printed  with  all  header   lines
           displayed,  rather  than  the default selective header
           line display.

     -q    mail terminates after interrupts. Normally  an  inter-
           rupt  causes only the termination of the message being
           printed.

     -r    Messages are printed in first-in, first-out order.

Once in the mail program here are a few commands
Code:
     d, or dp
           Delete the current message and print the next message.

     d n   Delete message number n. Do not go on to next message.

     dq    Delete message and quit mail.

     h     Display a window of headers around current message.

     h n   Display a window of headers around message number n.

     h a   Display headers of all messages in  the  user's  mail-
           file.

     h d   Display headers of messages scheduled for deletion.

     u [ n ]
           Undelete message number n (default is last read).

     ?     Print a command summary.

Tornado
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Client was not authenticated to send anonymous mail during MAIL FROM (in reply to MAIL FROM comm

I am having trouble getting mail to work on a red hat server. At first I was getting this message. Diagnostic-Code: X-Postfix; delivery temporarily suspended: connect to :25: Connection refused Then added the port to my firewall. Then I temporarily turned off selinux. I then copied this file... (1 Reply)
Discussion started by: cokedude
1 Replies

2. UNIX for Beginners Questions & Answers

How to manage parameter in alias?

I make alias in bashrc file and typed it on prompt, alias tes='echo "$1"xx"$2"xxx"$3"xxxx' $ tes a b c xxxxxxxxx a b c what's happened to the shell here ?, and also, alias tes='echo "$3"xx"$2"xxx"$1"xxxx $ tes a b c xxxxxxxxx a b c anyone sincerely is to help me.. (2 Replies)
Discussion started by: abdulbadii
2 Replies

3. UNIX for Dummies Questions & Answers

How do You manage different program versions?

Hallo, I have an general question which happens when installing software by compiling them self. I'm using FreeBSD system 10.0 and the ports. for info, see: http--en.wikipedia.org/wiki/FreeBSD_Ports. As I installed BSD for some years there was (i.e.) perl-14 installed. Now, when doing some... (1 Reply)
Discussion started by: HL1234
1 Replies

4. OS X (Apple)

Read and manage mail under Terminal

When opening Terminal window under Mac OS Lion, I have a message saying I've got mail . It seems to be somewhere close to ~/Library/Server/Mail/Data/spool/ but I ignore what command to be typed in order to read it and suppress it later once read. (1 Reply)
Discussion started by: shub22
1 Replies

5. UNIX for Advanced & Expert Users

need to configure mail setting to send mail to outlook mail server

i have sun machines having solaris 9 & 10 OS . Now i need to send mail from the machines to my outlook account . I have the ip adress of OUTLOOK mail server. Now what are the setting i need to do in solaris machines so that i can use mailx or sendmail. actually i am trying to automate the high... (2 Replies)
Discussion started by: amitranjansahu
2 Replies

6. Shell Programming and Scripting

manage function's output

Hi all, how i can get an calculated value from a function for exemple my function is like function getMyPseudo { .. .. echo "Rambler" } i need to put the printed string into a variable sommeting like : MYPSEUDO=getMyPseudo print $MYPSEUDO in that case, the out put i... (3 Replies)
Discussion started by: rambler
3 Replies

7. Solaris

how to forward mail in /var/mail/username to external mail

Dear All, Now I use solaris 10 and I try to forward mail from /var/mail/username to their external mail so what should I do? thank u in advance (2 Replies)
Discussion started by: unitipon
2 Replies

8. UNIX for Dummies Questions & Answers

manage the wtmp file

Here's a usefull perl script to trim the wtmp file, in case it got too big, which happens sometimes, or got curropted (which also happens often). You could learn from here how to parse the wtmp file... but of course for just reading its content always simply use "last" like Neo said.... ... (0 Replies)
Discussion started by: me2unix
0 Replies
Login or Register to Ask a Question