I'm guessing that your are using MySQL and cascade delete is not an option?
With mine, I just delete from the dbmail_user table and everything else goes with it. One simple query. -- David A. Niblett | email: [EMAIL PROTECTED] Network Administrator | Phone: (352) 334-3400 Gainesville Regional Utilities | Web: http://www.gru.net/ -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jorge Bastos Sent: Monday, July 10, 2006 5:05 AM To: DBMail mailinglist Subject: Re: [Dbmail] Delete accounts Great idea Paul, But i'll also take a look to what you said Alex. Jorge ----- Original Message ----- From: "Paul J Stevens" <[EMAIL PROTECTED]> To: "DBMail mailinglist" <[email protected]> Sent: Monday, July 10, 2006 9:44 AM Subject: Re: [Dbmail] Delete accounts > > > Jorge Bastos wrote: >> Jaques and DK, >> >> Thanks but i cannot use dbmail-user :P >> dbmail is'nt running on the same machine, if it was i would use >> system() to usecute that but it's not :( > > Idea: add a field to dbmail_users like 'clobber int(1)' or use a > seperate database. On the machine running dbmail use a cronjob to > purge all users marked for deletion every hour or so; > > for user in `get_deleted_users`; do > dbmail-users -e $user > dbmail-users -d $user > done > > that way you don't have to maintain your own set of queries. > > > >> >> >> >> ----- Original Message ----- From: "Jacques Beaudoin" >> <[EMAIL PROTECTED]> >> To: "DBMail mailinglist" <[email protected]> >> Sent: Monday, July 10, 2006 3:48 AM >> Subject: Re: [Dbmail] Delete accounts >> >> >>> Hi, >>> >>> You can also use dbmail-user via webmin costum command >>> >>> I administer my mail server via webmin costum command >>> >>> Jacques >>> >>> >>> Selon DK <[EMAIL PROTECTED]>: >>> >>>> On 7/9/06, Jorge Bastos <[EMAIL PROTECTED]> wrote: >>>> > >>>> > >>>> > Hi, >>>> > >>>> > Paul or somebody else, i need to create and delete accounts via >>>> SQL, to >>>> > create i have all tables i need to create and it's values, but >>>> > for delete, i'd like to delete not just the user account but it's >>>> > alias and >>>> emails > if >>>> > any exists, can you help? >>>> > >>>> > [DELETE FROM dbmail_aliases WHERE deliver_to='246' AND >>>> > lower(alias) = lower('[EMAIL PROTECTED]')] [DELETE FROM >>>> > dbmail_users WHERE userid = '[EMAIL PROTECTED]'] >>>> > >>>> > [DELETE FROM dbmail_mailboxes WHERE owner_idnr='246'] >>>> > >>>> > >>>> > There 3 i know i have to, wich more ? >>>> > >>>> > Jorge >>>> > >>>> >>>> May I ask why you have to do that via sql? >>>> I mean if you like to do that from a website you can execute >>>> dbmail-user via php >>>> >>>> -- >>>> >>>> Demi >>>> _______________________________________________ >>>> Dbmail mailing list >>>> [email protected] https://mailman.fastxs.nl/mailman/listinfo/dbmail >>>> >>> _______________________________________________ >>> Dbmail mailing list >>> [email protected] https://mailman.fastxs.nl/mailman/listinfo/dbmail >>> >> >> _______________________________________________ >> Dbmail mailing list >> [email protected] https://mailman.fastxs.nl/mailman/listinfo/dbmail >> > > -- > ________________________________________________________________ > Paul Stevens paul at nfg.nl > NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31 > The Netherlands________________________________http://www.nfg.nl > _______________________________________________ > Dbmail mailing list > [email protected] > https://mailman.fastxs.nl/mailman/listinfo/dbmail > _______________________________________________ Dbmail mailing list [email protected] https://mailman.fastxs.nl/mailman/listinfo/dbmail
