root alerts

General support questions
cornish
Posts: 67
Joined: 2013/12/05 19:30:11

Re: root alerts

Post by cornish » 2015/07/21 18:38:12

aks wrote:Those are mail messages and occupy space - delete them.
I think by default on modern terminal typesm mailx will display the first 20 messages - but this depends on the terminal type (and dimensions).
Not sure where you read them or how to remove them all. Need this working so i get root alert emails.

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: root alerts

Post by gerald_clark » 2015/07/21 19:32:25

man mailx

cornish
Posts: 67
Joined: 2013/12/05 19:30:11

Re: root alerts

Post by cornish » 2015/07/21 21:45:28

gerald_clark wrote:man mailx
Not sure what that's meant to do but can't see any delete option.

I will leave it now because this is taking to long, and looks like some people who know don't want to help anyone who knows nothing much. But that's the world we live in no one wants to help anyone, but i love helping people and really glad i am not the same.

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: root alerts

Post by gerald_clark » 2015/07/21 21:57:37

The problem is some people don't want to read the manuals, but expect other people to read them for them.
run "man mailx" and read the "Disposing of Mail" section and the following "Specifying messages".

cornish
Posts: 67
Joined: 2013/12/05 19:30:11

Re: root alerts

Post by cornish » 2015/07/21 22:02:42

gerald_clark wrote:The problem is some people don't want to read the manuals, but expect other people to read them for them.
run "man mailx" and read the "Disposing of Mail" section and the following "Specifying messages".
I can't see anything that says Disposing of Mail" section or i would.

Yes your right not many read the manuals and i have customers ask me questions everyday but i still help them all.

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: root alerts

Post by gerald_clark » 2015/07/21 23:05:56

I attempted to help you.
I gave you the mailx command which is the standard Linux mail reader.
I told you where in the manual to find your answer.

Code: Select all


   Disposing of mail
       After examining a message the user can delete ‘d’) the message or reply ‘r’) to it.  Deletion causes the mailx program  to  forget  about  the  message.
       This  is  not irreversible; the message can be undeleted ‘u’) by giving its number, or the mailx session can be aborted by giving the exit ‘x’) command.
       Deleted messages will, however, usually disappear never to be seen again.

       Commands such as print and delete can be given a list of message numbers as arguments to apply to a number of messages  at  once.   Thus  ‘delete  1  2’
       deletes  messages 1 and 2, while ‘delete 1-5’ deletes messages 1 through 5.  In sorted or threaded mode (see the sort and thread commands), ‘delete 1-5’
       deletes the messages that are located between (and including) messages 1 through 5 in the sorted/threaded order, as shown in the  header  summary.   The
       following special message names exist:

       :n     All new messages.

       :o     All old messages (any not in state read or new).

       :u     All unread messages.

       :d     All deleted messages (for the undelete command).

       :r     All read messages.

       :f     All ‘flagged’ messages.

       :a     All answered messages (cf. the markanswered variable).

       :t     All messages marked as draft.

       :k     All ‘killed’ messages.

       :j     All messages classified as junk.

       .      The current message.

       ;      The message that was previously the current message.

       ,      The  parent  message  of  the current message, that is the message with the Message-ID given in the ‘In-Reply-To:’ field or the last entry of the
              ‘References:’ field of the current message.

       -      The next previous undeleted message, or the next previous deleted message for the undelete command.  In sorted/threaded mode, the  next  previous
              such message in the sorted/threaded order.

       +      The  next  undeleted  message,  or  the  next  deleted  message  for the undelete command.  In sorted/threaded mode, the next such message in the
              sorted/threaded order.

       ^      The first undeleted message, or the first deleted message for the undelete command.  In sorted/threaded mode,  the  first  such  message  in  the
              sorted/threaded order.

       $      The last message.  In sorted/threaded mode, the last message in the sorted/threaded order.

       &x     In  threaded mode, selects the message addressed with x, where x is any other message specification, and all messages from the thread that begins
              at it.  Otherwise, it is identical to x.  If x is omitted, the thread beginning with the current message is selected.
:
       *      All messages.

       ‘      All messages that were included in the message list for the previous command.


cornish
Posts: 67
Joined: 2013/12/05 19:30:11

Re: root alerts

Post by cornish » 2015/07/21 23:31:03

cornish wrote:
gerald_clark wrote:Run mailx.
mailx just give me a list like this below from 1 to 20 and then stopped

16698 messages 16698 new
>N 1 Mail Delivery System Fri Sep 12 14:12 80/3157 "Undelivered Mail Retu"
N 2 Mail Delivery System Fri Sep 12 14:18 80/3157 "Undelivered Mail Retu"
N 3 Mail Delivery System Fri Sep 12 19:32 80/3157 "Undelivered Mail Retu"
N 4 Mail Delivery System Fri Sep 12 22:25 80/3157 "Undelivered Mail Retu"
N 5 Mail Delivery System Fri Sep 12 22:38 80/3157 "Undelivered Mail Retu"
N 6 Mail Delivery System Sat Sep 13 08:16 80/3157 "Undelivered Mail Retu"
Yes i know you tried to help but all i wanted was the command to remove all of the 50Mb emails

User avatar
AlanBartlett
Forum Moderator
Posts: 9345
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: root alerts

Post by AlanBartlett » 2015/07/22 00:06:37

As root, please try the following --
  • cd /var/spool/mail/
  • ls -l
Do you see a directory named root?

If yes --
  • rm root/*
  • ls -l root
All those unread mail messages should now have been deleted.
Image 100% Linux and, previously, Unix. Co-founder of the ELRepo Project.

drk
Posts: 405
Joined: 2014/01/30 20:38:28

Re: root alerts

Post by drk » 2015/07/22 06:27:52

cornish wrote:I will leave it now because this is taking to long, and looks like some people who know don't want to help anyone who knows nothing much. But that's the world we live in no one wants to help anyone, but i love helping people and really glad i am not the same.
Really? He's helping you and you are responding like this? Nice work :shock:

Post Reply