Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: DBMail: users

SQL command for deleting an user?

 

 

DBMail users RSS feed   Index | Next | Previous | View Threaded


claaskaehler at yfx

Jun 23, 2012, 3:29 AM

Post #1 of 6 (767 views)
Permalink
SQL command for deleting an user?

What is the best way to delete an user from dbmail in SQL? Is there a
cascading delete for dbmail_users?
--
View this message in context: http://old.nabble.com/SQL-command-for-deleting-an-user--tp34058470p34058470.html
Sent from the dbmail users mailing list archive at Nabble.com.

_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


h.reindl at thelounge

Jun 23, 2012, 3:51 AM

Post #2 of 6 (744 views)
Permalink
Re: SQL command for deleting an user? [In reply to]

Am 23.06.2012 12:29, schrieb cl445:
>
> What is the best way to delete an user from dbmail in SQL? Is there a
> cascading delete for dbmail_users?

after remove it from "dbmail_users" all messages are orhpaned
and cleaned by dbmail-util - i am not sure if you have to
remove the records from "dbmail_aliases" manually, my backend does
Attachments: signature.asc (0.26 KB)


claaskaehler at yfx

Jun 23, 2012, 6:37 AM

Post #3 of 6 (749 views)
Permalink
Re: SQL command for deleting an user? [In reply to]

Hmm... this solution isn't really statisfing. Making a dirty delete and hope
that the command-line tool will clean it up...


Reindl Harald-2 wrote:
>
>
>
> Am 23.06.2012 12:29, schrieb cl445:
>>
>> What is the best way to delete an user from dbmail in SQL? Is there a
>> cascading delete for dbmail_users?
>
> after remove it from "dbmail_users" all messages are orhpaned
> and cleaned by dbmail-util - i am not sure if you have to
> remove the records from "dbmail_aliases" manually, my backend does
>
>
>
> _______________________________________________
> DBmail mailing list
> DBmail [at] dbmail
> http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
>
>

--
View this message in context: http://old.nabble.com/SQL-command-for-deleting-an-user--tp34058470p34058974.html
Sent from the dbmail users mailing list archive at Nabble.com.

_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


h.reindl at thelounge

Jun 23, 2012, 6:50 AM

Post #4 of 6 (748 views)
Permalink
Re: SQL command for deleting an user? [In reply to]

this has nothing to do with hope - this is simply the way dbmail works internally even if you delete a message via imap or Pop3

you remove only a reference record and the rest is done via dbmail-util called daily from crond


-------- Original-Nachricht --------
Von: cl445 <claaskaehler [at] yfx>
Gesendet: Sat Jun 23 15:37:45 MESZ 2012
An: dbmail [at] dbmail
Betreff: Re: [Dbmail] SQL command for deleting an user?


Hmm... this solution isn't really statisfing. Making a dirty delete and hope
that the command-line tool will clean it up...


Reindl Harald-2 wrote:
>
>
>
> Am 23.06.2012 12:29, schrieb cl445:
>>
>> What is the best way to delete an user from dbmail in SQL? Is there a
>> cascading delete for dbmail_users?
>
> after remove it from "dbmail_users" all messages are orhpaned
> and cleaned by dbmail-util - i am not sure if you have to
> remove the records from "dbmail_aliases" manually, my backend does
>
>
>
> _______________________________________________
> DBmail mailing list
> DBmail [at] dbmail
> http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
>
>

--
View this message in context: http://old.nabble.com/SQL-command-for-deleting-an-user--tp34058470p34058974.html
Sent from the dbmail users mailing list archive at Nabble.com.

_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


--

Reindl Harald (mobile)
the lounge interactive design GmbH
A-1060 Vienna, Hofmühlgasse 17
CTO / CISO / Software-Development
+43 (676) 40 221 40
http://www.thelounge.net
_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


h.reindl at thelounge

Jun 23, 2012, 4:58 PM

Post #5 of 6 (744 views)
Permalink
Re: SQL command for deleting an user? [In reply to]

back on my workstation....

why in the world do you think that this is a matter of hope?
dbmail will NEVER remove all records even if you remove
a message via POP3/IMAP - it will always only delete
references and the rest is the job of dbmail-util

* delete 20000 messages
* you will not notice load
* call "dbmail-util -c -t -u -b -p -d -y"
* call it 3 times
* on the last 2 times you will note HEAVY IO-LOad

and that is why dbmail-util is called via crond
on each proper setup in the night to not raise
up system-load at business time for remove
unused data

Am 23.06.2012 15:37, schrieb cl445:
>
> Hmm... this solution isn't really statisfing. Making a dirty delete and hope
> that the command-line tool will clean it up...
>
>
> Reindl Harald-2 wrote:
>>
>>
>>
>> Am 23.06.2012 12:29, schrieb cl445:
>>>
>>> What is the best way to delete an user from dbmail in SQL? Is there a
>>> cascading delete for dbmail_users?
>>
>> after remove it from "dbmail_users" all messages are orhpaned
>> and cleaned by dbmail-util - i am not sure if you have to
>> remove the records from "dbmail_aliases" manually, my backend does
>>
>>
>>
>> _______________________________________________
>> DBmail mailing list
>> DBmail [at] dbmail
>> http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
>>
>>
>

--

Reindl Harald
the lounge interactive design GmbH
A-1060 Vienna, Hofmühlgasse 17
CTO / CISO / Software-Development
p: +43 (1) 595 3999 33, m: +43 (676) 40 221 40
icq: 154546673, http://www.thelounge.net/

http://www.thelounge.net/signature.asc.what.htm
Attachments: signature.asc (0.26 KB)


paul at nfg

Jun 24, 2012, 3:43 AM

Post #6 of 6 (741 views)
Permalink
Re: SQL command for deleting an user? [In reply to]

On 06/23/2012 12:29 PM, cl445 wrote:
>
> What is the best way to delete an user from dbmail in SQL? Is there a
> cascading delete for dbmail_users?


Yes. When you delete a dbmail_users record, this will trigger a
cascading delete on

dbmail_mailboxes,
dbmail_acl,
dbmail_sievescripts,
dbmail_subscription,
dbmail_auto_notifications,
dbmail_auto_replies
dbmail_messages

However, as Harald mentions this will not clean out the actual message
blobs, only their metadata records.

dbmail-util will clean out any physmessages, partlists and mimeparts
records that are no longer connected to any email messages.




--
________________________________________________________________
Paul J Stevens pjstevns @ gmail, twitter, skype, linkedin

* Premium Hosting Services and Web Application Consultancy *

www.nfg.nl/info [at] nfg/+31.85.877.99.97
________________________________________________________________
_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail

DBMail users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.