Have a question about CiviCRM? Get it answered quickly at the new CiviCRM Stack Exchange Q+A siteThis forum was archived on 25 November 2017. Learn more.How to get involved.What to do if you think you've found a bug.
We seem to be on the strategy of running the civicrm system until it drops.
wget --delete-after 'http://[site]/cron.php' >/dev/null 2>&1
wget --delete-after -O - -q -t 1 --post-data='name=[username]&pass=[password]&key=[site_key]' http://[site]/sites/all/modules/civicrm/bin/civimail.cronjob.php >/dev/null 2>&1
wget --delete-after 'http://[site]/sites/all/modules/civicrm/bin/EmailProcessor.php?name=[username]&pass=[password]&key=[site_key]' >/dev/null 2>&1
find /home/[site_account]/public_html/sites/default/files/civicrm/custom/CiviMail.processed -mtime +3 -exec rm -f {} \;
mysql -u [site_account]_trunk -p[password - from host, not your password] [civicrm_database] -e "DELETE FROM civicrm_mailing_event_bounce WHERE time_stamp < '`date --date='3 days ago' --rfc-3339=date`'"
1. IMO, using words like "toxic" does not really help anyone involved.
3. High priority items are best implemented with patches and/or someone taking the lead and helping harness and directing the energy of the involved participants. This is the best course of action to get a "proper" solution in place. It does not happen magically.
4. The wiki / docs are community creatable/editable. Please do start a "best practices" document for managing a CiviMail install. Other folks will chime in with tips etc over a period of time.
there will be millions of event_queue_id's and just thousands of job id's, so a more efficient approach might be to do a set of mass deletions using the job_id, which you can retrieve from the civicrm_mailing_job table
use <database_name>;create temporary table temp_mail_job_ids select id as job_id, mailing_idfrom civicrm_mailing_jobwhere year( start_date ) < 2009 ;create index temp_job_id on temp_mail_job_ids ( job_id ) ;create index temp_mailing_id on temp_mail_job_ids ( mailing_id ) ;delete from civicrm_mailing_trackable_url where mailing_id in ( select mailing_id from temp_mail_job_ids ) ;delete from civicrm_mailing_group where mailing_id in ( select mailing_id from temp_mail_job_ids ) ;delete from civicrm_mailing_event_unsubscribewhere year( time_stamp ) < 2009 ;delete from civicrm_mailing_event_trackable_url_openwhere year( time_stamp ) < 2009 ;delete from civicrm_mailing_event_replywhere year( time_stamp ) < 2009 ;delete from civicrm_mailing_event_queuewhere job_id in ( select job_id from temp_mail_job_ids ) ;delete from civicrm_mailing_event_openedwhere year( time_stamp ) < 2009 ;delete from civicrm_mailing_event_deliveredwhere year( time_stamp ) < 2009 ;delete from civicrm_mailing_event_bouncewhere year( time_stamp ) < 2009 ;delete from civicrm_mailingwhere id in ( select mailing_id from temp_mail_job_ids ) ;delete from civicrm_activity_history where activity_type = 'Email sent' and activity_id in ( select mailing_id from temp_mail_job_ids ) ;delete from civicrm_mailing_jobwhere id in ( select job_id from temp_mail_job_ids ) ;optimize table civicrm_activity_history ;optimize table civicrm_mailing_event_delivered ;optimize table civicrm_mailing_event_bounce ;optimize table civicrm_mailing ;optimize table civicrm_mailing_event_opened ;optimize table civicrm_mailing_event_queue ;optimize table civicrm_mailing_event_reply ;optimize table civicrm_mailing_event_trackable_url_open ;optimize table civicrm_mailing_job civicrm_mailing_trackable_url ;