Upon a future run of dbmail-util -p, these messages would purged. It occurs to me that dbmail-export would be very useful for dumping all spam folders to mbox for further processing if we supported a mailbox spec without a user spec -- dumping a folder of a particular name for every user on the system.
We currently require that a username be specified to dbmail-export, but it is fairly trivial to loop over all users. Aaron On Wed, 2007-07-11 at 12:24 -0400, Michael Luich wrote: > try this: > > > UPDATE dbmail_messages SET status = 2 WHERE physmessage_id IN (select id > from dbmail_physmessage, dbmail_mailboxes WHERE > dbmail_physmessage.internal_date < 'NOW - 30 days' AND > dbmail_mailboxes.name="spam";) > > > Michael Luich > Aleksander Kamenik wrote: > > Hi, > > > > This is actually more of a SQL question than dbmail. I'm not really > > familiar with SQL, so I'm asking for help here, as this might interest > > some other dbmail admins. > > > > In my setup every user has a mailbox named "spam" which contains as > > you've guessed it -- spam. > > > > Some users don't clean up their spam boxes at all, some don't do it > > frequently. > > > > So I need to construct some wild JOIN which would do something like this: > > > > UPDATE dbmail_messages SET status="2" > > WHERE dbmail_physmessage.internal_date < 'NOW - 30 days' > > AND dbmail_mailboxes.name="spam" > > > > Please help with creating this query. > > > > Using mysql 5.0.x. > > > > Kind regards, > > > > > > This email and any files transmitted with it are confidential and intended > solely for the individual(s) or entity to whom they are addressed. > > If you have received this email in error please notify the originator of the > message. > > Any views expressed in this message are those of the individual sender. > > This message has been scanned for Content, viruses and spam by GlobalCerts > RiskFilter - E-mail. > www.GlobalCerts.net > > > > This email and any files transmitted with it are confidential and intended > solely for the individual(s) or entity to whom they are addressed. > > If you have received this email in error please notify the originator of the > message. > > Any views expressed in this message are those of the individual sender. > > This message has been scanned for Content, viruses and spam by GlobalCerts > RiskFilter - E-mail. > www.GlobalCerts.net > > _______________________________________________ > DBmail mailing list > [email protected] > https://mailman.fastxs.nl/mailman/listinfo/dbmail _______________________________________________ DBmail mailing list [email protected] https://mailman.fastxs.nl/mailman/listinfo/dbmail
