Mail as Root?
For some reason I can't understand how this works or how to rid of this from my system.
My Linux server gets mail as root (seems to be system generated). The location is shows from is /var/spool/mail/root": 112 messages 112 new My question is how do I remove the email and how do I stop the email from coming? Code:
>N 1 root@server.carlwill Sat Feb 12 15:10 41/1325 "Invalid File Contexts" Code:
Mail Commands |
Several of those messages are being generated by LogWatch, which is probably running from your cron.daily. Just go into /etc/cron.daily and move that Logwatch script to another place... maybe /root. I actually recommend having these emails delivered to a remote address.. maybe your regular mailbox. Just go into /etc/crontab and right near the top, you should see MAIL=root or something similar. Just change it to MAIL=you@yourdomain.com and these emails will be sent to an external mailbox. These logwatch reports are actually very good for seeing whats' happening on your system in a nice daily format. I don't recommend shutting these off completely. They could possibly alert you to hack attempts.
|
I haven't read to much on mail but you can delete mail like this.
? d 1 2 3 4 5 ?q Some distros save it in $HOME/mail after its read I dont know how to set that up right now. |
So I will need to press
d 1 2 3 4 5 .... all the way to 120??? Is there a fast and quick way to delete them all or a bulk amount of them? |
Try d 1-120
|
I suggest typing
Code:
rm /var/spool/mail/root Groetjes, Kees-Jan |
All times are GMT -5. The time now is 07:30 PM. |