Quantcast
Channel: iRedMail
Viewing all articles
Browse latest Browse all 47834

Re: MYSQL Remove mailbox from file system upon delete.

$
0
0

Hi maxie_ro,

I read the clearupdirs.pl, it should work with PostfixAdmin, but you have to modify it for iRedMail.

It queries SQL db to get existing user maildirs, then scans the whole directory under /home/vmail (or /var/vmail on iRedMail server) to get existing mailboxes, compares them and delete/print maildirs which will be deleted.

IMO, it's much better and easier to log maildir path (and other related info) while deleting user account, it works for different formats of maildir path (domain/username/, domain/u/s/e/username-timestamp/, domain/u/s/e/username/, etc).

iRedMail appends a timestamp in maildir path while creating mail user, so it won't be wrong if you choose this format of maildir path. The worry is maildir path without timestamp...


Viewing all articles
Browse latest Browse all 47834

Trending Articles