posted: May 4th, 2008
Cleaning time at the ol' Depeche Mode Forum.
Over the years, many people have registered free accounts on the board. Sadly, when people move / die / quit their job / change ISP's / et cetera, they usually forget to take the time to correct the details on their various forum accounts. As a board mod, I am personally bugged by this.
As we use our board (again, as of May 2nd, 2008) to send out email blasts to fans, I generate the emails, hit "send", and then when the board hits a dead address, my Mail email box is flooded with "Delivery Status Notification" emails. UGH!
AppleScript to the rescue.
For those mods (who smartly use OS X) who face the same problems, do this. You will need Mail, BBEdit, Safari, Script Editor, experience in AppleScript, and a few minutes of time.
First, select all the emails that you have gathered up in the bounced emails folder (you were smart enough to have all bounced emails get filtered to a special folder, right?). Copy, then paste the result to BBEdit. Do a "Find" for the line "(Final-Recipient: RFC822; .*)(\r)" (using GREP). Copy the result to a new window, do some more GREP massaging and sort filtering, and you will end up with the email addresses of the dead accounts. Result!
Next, fire up AppleScript, and create a script that gets an individual line from BBEdit, copies the email address, pastes it into the vBulletin User Manager, and finds that account. Move that account to a special new UserGroup that you have created (mine is "bye_bye"), and you are good.
Now, repeat that as many times as you need to (5554 times, in my case).
I've been running this script for over a day already, and am barely halfway done. But, if I had been doing this manually, I would have surely either grabbed a gun and pointed it at my head, or searched out the street addresses of all of these people who were too lazy to change a simple email address in a forum profile, and gone to each person's house (Jay & Silent Bob style). Considering that I have a nasty cold right now (I have many choice words of Coachella right now, but they are getting lost in my Zithromax / Halls / TheraFlu / Benadryl / Nasonex / Nyquil mental fog), there is no way I could do all of this manually. Between the 15 minutes of code scripting, email address filtering, and blog writing, I am already dead.
I need a nap...