On 23-01-14 13:42, DIXLOR wrote:
> In our mailing list, for 1500 users leaked too much information. :)
> How do I delete the message from all mailboxes?
You can find the messages involved using some header, say the subject
select physmessage_id from dbmail_subjectfield where subjectfield='<SOME
SUBJECT>';
this gives you a list of physmessages involved.
Next find the messages
select message_idnr from dbmail_messages where physmessage_id in
(select physmessage_id from dbmail_subjectfield
where subjectfield='<SOME SUBJECT>');
If you're on MySQL you'll have to use a temporary table:
create table temporary (
message_idnr bigint
);
now store all found message_idnrs into that table:
INSERT INTO temporary
select message_idnr from dbmail_messages where physmessage_id in
(select physmessage_id from dbmail_subjectfield
where subjectfield='<SOME SUBJECT>');
now make all those messages invisible:
UPDATE dbmail_messages SET status=2 WHERE message_idnr IN (
SELECT message_idnr FROM temporary
)
Dont delete anything from dbmail_messages so you can roll back.
--
________________________________________________________________
Paul J Stevens pjstevns @ gmail, twitter, github, linkedin
* Premium Hosting Services and Web Application Consultancy *
www.nfg.nl/[email protected]/+31.85.877.99.97
________________________________________________________________
_______________________________________________
DBmail mailing list
[email protected]
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail