LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   remove user's emails (https://www.linuxquestions.org/questions/linux-software-2/remove-users-emails-4175465539/)

umbloaded 06-11-2013 06:31 AM

remove user's emails
 
Hello, how can I remove from a user's mail box all email from Mail Delivery System ?

Thank you

TB0ne 06-11-2013 09:21 AM

Quote:

Originally Posted by umbloaded (Post 4969463)
Hello, how can I remove from a user's mail box all email from Mail Delivery System ?
Thank you

Can only guess, since you don't give us ANY details, like version/distro of Linux, what mail system you're using, etc. Chances are there is a file/directory in /var/spool/mail (or a similar directory), that has the users name on it. Delete it.

If you can't find it, post complete details, and we can try to help.

umbloaded 06-12-2013 02:01 PM

I'm using Postfix on Centos

TB0ne 06-12-2013 02:22 PM

Quote:

Originally Posted by umbloaded (Post 4970477)
I'm using Postfix on Centos

Ok...and did you read/try what I first suggested?? Could you find anything like /var/spool/mail? Perhaps /var/mail/<username>, or /var/spool/mail/<username>??? Did you try to do a find in the /var directory for things with "mail" in them, or a users name?

chrism01 06-12-2013 11:20 PM

For that combo, see /var/spool/mail/<username>

umbloaded 06-14-2013 07:42 AM

Yes there is a file in /var/mail/<username> but deleting it would delete all user's mails, I only want to delete mail of that user from Mail Delivery System

TB0ne 06-14-2013 08:38 AM

Quote:

Originally Posted by umbloaded (Post 4971698)
Yes there is a file in /var/mail/<username> but deleting it would delete all user's mails, I only want to delete mail of that user from Mail Delivery System

Right...so AGAIN, you would delete the ONE FILE, that matches the name of your user. That would then remove that ONE USERS email, which is what you asked about.

umbloaded 06-14-2013 11:36 PM

No, I didn't wanto to mean to remove ALL user's email but only emails that came from Mail Delivery System

TB0ne 06-15-2013 01:53 PM

Quote:

Originally Posted by umbloaded (Post 4972226)
No, I didn't wanto to mean to remove ALL user's email but only emails that came from Mail Delivery System

...which isn't exactly what you asked at first. Again, since you now know where the users emails are kept, and in which file, you would edit that file, and remove whatever you'd want to.


All times are GMT -5. The time now is 04:43 AM.