Thursday, May 08, 2008

How to - Remove Leopard Wiki Mailing List Spam

If you have group mailing lists set up in Leopard Server, these conveniently link to the Leopard Wiki page for the group. However, spam can sully the look of your page, so you may need to perform some routine maintenance at some point. Here's how you can do this.

SSH to your Leopard Server as admin, then "sudo bash" to log in as root. Navigate to group mailing list folder:

bash-3.2# cd /Library/Collaboration/Groups/itsystems/mailinglist

Use grep to find the mailing list pages with spam. In our example, let's say we have a lot of "spam" messages coming from the FileMaker server - announcement-type messages that have a limited usefulness by nature. These all have, say, the string "FMServer" in them, so we grep this way:

bash-3.2# grep -R "FMServer" *

cb90d083b749806821e589295fa79609.page/page.plist: FMServer Information...
...

Copy the results to the clipboard, then search and replace in a text editor to remove the "/page.plist: " bit. Put "rm -rf" in front of each line, with no double quotes of course, then copy this block of commands to the CLI to execute. Grep again to confirm that the result is nothing:

bash-3.2# grep -R "FMServer" *

Remove the index.db file then restart:

bash-3.2# rm -rf /Library/Collaboration/Groups/itsystems/index.db
bash-3.2# serveradmin stop teams
bash-3.2# serveradmin start teams

You can also do "sudo serveradmin stop teams" if you are not logged in as root. The index.db is created after a few seconds, which you can confirm.

bash-3.2# pwd
/Library/Collaboration/Groups/itsystems
bash-3.2# ls -la
total 6704
drwxr-x--- 12 _teamsserver _teamsserver 408 May 8 12:37 .
drwxr-x--- 6 _teamsserver _teamsserver 204 Apr 1 12:47 ..
-rw------- 1 _teamsserver _teamsserver 3040287 May 8 10:55 backup.mbox
drwxr-x--- 25 _teamsserver _teamsserver 850 May 8 06:42 discussion
-rw-r----- 1 _teamsserver _teamsserver 2074 May 8 08:53 extrainfo
-rw-r----- 1 _teamsserver _teamsserver 377856 May 8 12:37 index.db
drwxr-x--- 18 _teamsserver _teamsserver 612 May 8 12:30 mailinglist
-rw-r----- 1 _teamsserver _teamsserver 1278 May 8 12:37 metadata.plist
drwxr-x--- 2 _teamsserver _teamsserver 68 Apr 1 12:47 public
drwxr-x--- 2 _teamsserver _teamsserver 68 Apr 1 12:47 resources
drwxr-x--- 3 _teamsserver _teamsserver 102 May 8 06:25 weblog
drwxr-x--- 23 _teamsserver _teamsserver 782 May 8 06:42 wiki

Hope this how-to is helpful to someone.

3 comments:

Guido said...

Thankyou so much, your post was really really usefull to me

G

Inge said...

Thank you man, you are great!

Rick Cogley said...

Glad to be of help. -- RIck