Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have an email system (using modified round cube) on a web server running CentOS and want to disable deleting of any emails.

I have done this within the round cube software however this will not stop someone accidentally deleting an email from their phone.

would it be possible to make it so all files in the email folder could never be deleted, even from a phone or another email client.

share|improve this question

2 Answers 2

You could use file system attributes on the files to stop the actual files from being deleted but that could cause unpredictable results with your imap/pop3 software.

if you really have to you can stop a file from being deleted even by the root user by setting the immutable attribute.

chattr +i file_name
share|improve this answer
    
+1 ... just don't run chattr on the emails' parent directory ... –  danlefree Oct 14 '10 at 12:14

There are... a number of issues involved in doing this, making it a poor solution. Better would be to configure the mail server to prevent deletion of email altogether, moving to a different mail server if need be.

share|improve this answer
    
to accomplish this, which mail server would you recommend using on CentOS? –  James Oct 14 '10 at 12:21
    
Not a clue. I've never had to do anything like this before. –  Ignacio Vazquez-Abrams Oct 14 '10 at 12:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.