Hello All,
I was thinking about to delete the user database after delete user from postfixadmin.
So, I create users by postfixadmin. Its works fine. The user is inserted in the mail database. When I logging in the webmail, the user and others informations is inserted in the webmail database, right?
So, when I remove a user from postfixadmin, its removed from mail database, but in the webmail database doesn´t. I understand that, but I would like that the user will be deleted from the webmail database too.
Can anyone knows how can I do this?
Thanks,
Diego
one way would be to run a cron job every night and delete anything in the rc users table which doesnt exist in the postfix one. as long as the rc tables are linked properly the delete will cascade and delete all the user's stuff from the other tables automatically.
Hi John,
Thanks again for you help.
So, let me see if I understood.
OK, I know what users I want to delete.
I make a script to delete the user diego in the USERS RC tables, like this: delete from USERS where USERNAME='diego'; ?
So, the rest of info about the user, in anothers RC tables will be deleted automatically?
Thanks,
Diego
thats the idea, though I think it might depend on your particular implementation. take a look at the rc sql file mysql.initial.sql in trunk/roundcubemail/SQL (http://trac.roundcube.net/browser/trunk/roundcubemail/SQL/mysql.initial.sql) see all the "ON DELETE CASCADE" bits? thats what does it.
Nice thread!
The ideas and infos help a lot...
Rgds.
hey John,
Here my feedback.
It´s works.
I did:
delete from users where username='
[email protected]';
and all of infos in the tables are deleted.
I will make a script to do this auto to me.
Thanks again.
Diego