1 (edited by hannes.pichler 2013-01-17 18:09:59)

Topic: Remove old disabled or removed maildirs (again)

==== Required information ====
- iRedMail version:  iRedMail-0.8.3 / iRedAdmin-Pro-MySQL-1.5.1
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: Centos 6.3
- Related log if you're reporting an issue:
====

Hi guys,

somone have a crontab script that cleans deleted or disabled HASHED maildirs after for example 30 days?
I have searched the forum for a long time and didnt find anything.

Are there other regular maintenance to do on database or filesystem rather than take backups?

Thank you!

2

Re: Remove old disabled or removed maildirs (again)

Sorry, i don't get this kind of script.
iRedAdmin-Pro should log maildir path of deleted mail accounts, but it's not yet implemented. Will try to achieve it.

3

Re: Remove old disabled or removed maildirs (again)

thank you for the fast answer.

If I may be permitted a proposal.
Write the full path to maildir with delation date along with the log entry in a database table.
Then the delete script should be easy smile

Have a nice day!

4

Re: Remove old disabled or removed maildirs (again)

hannes.pichler wrote:

If I may be permitted a proposal.

Feature requests, feedback, suggestions are always welcome. smile

My plan is, store maildir path in SQL database while deleting a user.

5

Re: Remove old disabled or removed maildirs (again)

smile

and the deletion date please, for delayed directory cleanup

6

Re: Remove old disabled or removed maildirs (again)

Currently i am working on a different approach. I want to make a trigger "BEFORE DELETE" of the mailbox table and log the data i need into another table.
A cron job, a database view and little shell script does the rest an deletes the directories.

What do you think about this?

7

Re: Remove old disabled or removed maildirs (again)

Well, then we're thinking about the same approach.

Logging maildir path before or after deleting user, then delete the mailbox with 'rm' with a cron job.