Showing posts with label content. Show all posts
Showing posts with label content. Show all posts

Thursday, December 20, 2007

Indexing Office 2007 Documents Using Windows SharePoint Services 3.0

I've been very impressed with Windows SharePoint Services 3.0 ever since I had access to it as a Beta, especially with the included Blog and Wiki capability, then with the release of the Application Templates.

The only annoying thing I've found with it is the lack of search support for Office 2007 document formats, without consuming an Office 2007 license on the server, as suggested in Knowledge Base article 944433.

Well, no more! Microsoft have finally released the Microsoft Filter Pack - a set of standalone IFilters for the following file formats: .docx, .docm, .pptx, .pptm, .xlsx, .xlsm, .xlsb, .zip, .one, .vdx, .vsd, .vss, .vst, .vdx, .vsx, and .vtx.

There is a slight catch however. You have to munge with the registry as per Knowledge Base article 946338. I needed to roll this out over a number of servers, so the manual process didn't suit me. I sat down and whipped up the following script:

@echo off
setlocal enabledelayedexpansion
set mv=0
net stop spsearch
for /f "skip=3 delims==" %%i in ('reg query "HKLM\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Search\Applications"') do set rk=%%i
for /f %%k in ('reg query "%rk%\Gather\Search\Extensions\ExtensionList" ^| findstr /b /v HKEY') do if !mv! lss %%k set mv=%%k
reg query "%rk%\Gather\Search\Extensions\ExtensionList" /f "docm" /d /e >nul
if errorlevel 1 (
set /a mv+=1
reg add "%rk%\Gather\Search\Extensions\ExtensionList" /v !mv! /t REG_SZ /d docm
)
reg query "%rk%\Gather\Search\Extensions\ExtensionList" /f "docx" /d /e >nul
if errorlevel 1 (
set /a mv+=1
reg add "%rk%\Gather\Search\Extensions\ExtensionList" /v !mv! /t REG_SZ /d docx
)
reg query "%rk%\Gather\Search\Extensions\ExtensionList" /f "one" /d /e >nul
if errorlevel 1 (
set /a mv+=1
reg add "%rk%\Gather\Search\Extensions\ExtensionList" /v !mv! /t REG_SZ /d one
)
reg query "%rk%\Gather\Search\Extensions\ExtensionList" /f "pptm" /d /e >nul
if errorlevel 1 (
set /a mv+=1
reg add "%rk%\Gather\Search\Extensions\ExtensionList" /v !mv! /t REG_SZ /d pptm
)
reg query "%rk%\Gather\Search\Extensions\ExtensionList" /f "pptx" /d /e >nul
if errorlevel 1 (
set /a mv+=1
reg add "%rk%\Gather\Search\Extensions\ExtensionList" /v !mv! /t REG_SZ /d pptx
)
reg query "%rk%\Gather\Search\Extensions\ExtensionList" /f "vdx" /d /e >nul
if errorlevel 1 (
set /a mv+=1
reg add "%rk%\Gather\Search\Extensions\ExtensionList" /v !mv! /t REG_SZ /d vdx
)
reg query "%rk%\Gather\Search\Extensions\ExtensionList" /f "vsd" /d /e >nul
if errorlevel 1 (
set /a mv+=1
reg add "%rk%\Gather\Search\Extensions\ExtensionList" /v !mv! /t REG_SZ /d vsd
)
reg query "%rk%\Gather\Search\Extensions\ExtensionList" /f "vss" /d /e >nul
if errorlevel 1 (
set /a mv+=1
reg add "%rk%\Gather\Search\Extensions\ExtensionList" /v !mv! /t REG_SZ /d vss
)
reg query "%rk%\Gather\Search\Extensions\ExtensionList" /f "vst" /d /e >nul
if errorlevel 1 (
set /a mv+=1
reg add "%rk%\Gather\Search\Extensions\ExtensionList" /v !mv! /t REG_SZ /d vst
)
reg query "%rk%\Gather\Search\Extensions\ExtensionList" /f "vsx" /d /e >nul
if errorlevel 1 (
set /a mv+=1
reg add "%rk%\Gather\Search\Extensions\ExtensionList" /v !mv! /t REG_SZ /d vsx
)
reg query "%rk%\Gather\Search\Extensions\ExtensionList" /f "vtx" /d /e >nul
if errorlevel 1 (
set /a mv+=1
reg add "%rk%\Gather\Search\Extensions\ExtensionList" /v !mv! /t REG_SZ /d vtx
)
reg query "%rk%\Gather\Search\Extensions\ExtensionList" /f "xlsb" /d /e >nul
if errorlevel 1 (
set /a mv+=1
reg add "%rk%\Gather\Search\Extensions\ExtensionList" /v !mv! /t REG_SZ /d xlsb
)
reg query "%rk%\Gather\Search\Extensions\ExtensionList" /f "xlsm" /d /e >nul
if errorlevel 1 (
set /a mv+=1
reg add "%rk%\Gather\Search\Extensions\ExtensionList" /v !mv! /t REG_SZ /d xlsm
)
reg query "%rk%\Gather\Search\Extensions\ExtensionList" /f "xlsx" /d /e >nul
if errorlevel 1 (
set /a mv+=1
reg add "%rk%\Gather\Search\Extensions\ExtensionList" /v !mv! /t REG_SZ /d xlsx
)
reg query "%rk%\Gather\Search\Extensions\ExtensionList" /f "zip" /d /e >nul
if errorlevel 1 (
set /a mv+=1
reg add "%rk%\Gather\Search\Extensions\ExtensionList" /v !mv! /t REG_SZ /d zip
)
reg add "HKLM\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Search\Setup\ContentIndexCommon\Filters\Extension\.docm" /ve /t REG_MULTI_SZ /d "{5A98B233-3C59-4B31-944C-0E560D85E6C3}" /f
reg add "HKLM\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Search\Setup\ContentIndexCommon\Filters\Extension\.docx" /ve /t REG_MULTI_SZ /d "{5A98B233-3C59-4B31-944C-0E560D85E6C3}" /f
reg add "HKLM\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Search\Setup\ContentIndexCommon\Filters\Extension\.one" /ve /t REG_MULTI_SZ /d "{89BCB740-6119-101A-BCB7-00DD010655AF}" /f
reg add "HKLM\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Search\Setup\ContentIndexCommon\Filters\Extension\.pptm" /ve /t REG_MULTI_SZ /d "{DDFE337F-4987-4EC8-BDE3-133FA63D5D85}" /f
reg add "HKLM\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Search\Setup\ContentIndexCommon\Filters\Extension\.pptx" /ve /t REG_MULTI_SZ /d "{DDFE337F-4987-4EC8-BDE3-133FA63D5D85}" /f
reg add "HKLM\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Search\Setup\ContentIndexCommon\Filters\Extension\.vdx" /ve /t REG_MULTI_SZ /d "{FAEA5B46-761B-400E-B53E-E805A97A543E}" /f
reg add "HKLM\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Search\Setup\ContentIndexCommon\Filters\Extension\.vsd" /ve /t REG_MULTI_SZ /d "{FAEA5B46-761B-400E-B53E-E805A97A543E}" /f
reg add "HKLM\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Search\Setup\ContentIndexCommon\Filters\Extension\.vss" /ve /t REG_MULTI_SZ /d "{FAEA5B46-761B-400E-B53E-E805A97A543E}" /f
reg add "HKLM\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Search\Setup\ContentIndexCommon\Filters\Extension\.vst" /ve /t REG_MULTI_SZ /d "{FAEA5B46-761B-400E-B53E-E805A97A543E}" /f
reg add "HKLM\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Search\Setup\ContentIndexCommon\Filters\Extension\.vsx" /ve /t REG_MULTI_SZ /d "{FAEA5B46-761B-400E-B53E-E805A97A543E}" /f
reg add "HKLM\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Search\Setup\ContentIndexCommon\Filters\Extension\.vtx" /ve /t REG_MULTI_SZ /d "{FAEA5B46-761B-400E-B53E-E805A97A543E}" /f
reg add "HKLM\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Search\Setup\ContentIndexCommon\Filters\Extension\.xlsb" /ve /t REG_MULTI_SZ /d "{312AB530-ECC9-496E-AE0E-C9E6C5392499}" /f
reg add "HKLM\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Search\Setup\ContentIndexCommon\Filters\Extension\.xlsm" /ve /t REG_MULTI_SZ /d "{F90DFE0C-CBDF-41FF-8598-EDD8F222A2C8}" /f
reg add "HKLM\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Search\Setup\ContentIndexCommon\Filters\Extension\.xlsx" /ve /t REG_MULTI_SZ /d "{F90DFE0C-CBDF-41FF-8598-EDD8F222A2C8}" /f
reg add "HKLM\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Search\Setup\ContentIndexCommon\Filters\Extension\.zip" /ve /t REG_MULTI_SZ /d "{20E823C2-62F3-4638-96BD-90F4F6784EBC}" /f
net start spsearch
stsadm -o spsearch -action fullcrawlstart


I put this into a file called register-ifilters.cmd and ran it after installing the Filter Pack on my WSS 3.0 boxes. It's not a fantastic script, but it does the job.



Please note that if you've got a lot of documents in your WSS 3.0 content databases, then you may want to schedule the fullcrawlstart command at a later stage, rather than run it as part of the IFilter registration.

Friday, September 28, 2007

Stopping Sophos PureMessage 3.0 from Generating an NDR Storm

I upgraded to the latest version of Sophos PureMessage (v2.6.1 upgrade to v3.0) on an SBS 2003 server.

The upgrade went smoothly as per usual. Hats off to Sophos for providing good quality products and excellent documentation.

This version now includes AD integration and allows for recipient validation. I enabled this, as well as verifying the upgraded settings. I kept an eye on progress for about 90 minutes as I was performing other administrative tasks.

When I came back to it the next morning, the server was being sluggish. Investigation showed that the were several thousand NDRs queued up, and further investigation revealed that the Exchange journal mailbox was bouncing Read Receipts with a Permission Denied error back to PureMessage. Unfortunately, the Read Receipts had no From header, so PureMessage was generating an NDR and trying to send it to an address of '<', which is a completely invalid address. This was then escalating an alert message to the Alert address, which had filled up the resulting mailbox. The mail bounce that was occuring was also generating an unscannable error due to too many nested attachments, which also queued up an alert message.

The remedial action was to remove the administrator alert address. This stopped the queuing. I then turned off administrator alerts for the On Unscannable action for the Exchange Store scanning and the Transport scanning. This helped stopped further NDR flooding.

The final action I performed that finally killed the NDR storm was to fire up the Exchange System Manager, go into the SmallBusiness SMTP Connector properties, go into Content Restrictions and turn off System Messages.

I also opened up the Delivery Restrictions placed on the mailbox that I'm using for Exchange Journalling until I can verify what the appropriate restrictions should be on the mailbox such that it works with PureMessage 3.0, seeing as the previous settings worked fine with PureMessage 2.6.1 (which was only accept messages from the Exchange Journalling mailbox).

Thursday, April 13, 2006

DHCPServer 1010 1014 1016 Errors

I've recently installed a server at home and installed SBS 2003 SP1 Premium Edition on it. Everything went smoothly and I eventaully set up the Monitoring to send me daily reports. I started to get concerned with the DHCPServer 1010, 1014 and 1016 errors that were occurring daily. Backing up and restoring the DHCP database didn't work, chkdsk /f /r didn't show any errors, and hard drive diagnostics were fine. Memory testing was also fine. I removed Anti-spyware and Anti-virus software. Still no difference.

With much grinding of teeth, the occasional expletive and the desire to smash something out of the way, I continued the Googling to find an answer. Lo and behold, there was a thread in the newsgroup microsoft.public.windows.server.sbs which talked about turning off indexing on the %WINDIR%\System32\DHCP folder. I decided to give this a go by going into the folder properties, clicking Advanced on the General tab and disabling "For fast searching, allow Indexing Service to index this folder". Clicked OK twice and waited a couple of days to see if the critical error count dropped in the Monitoring report. Yes! Victory! The 1010, 1014 and 1016 errors stopped occurring! Sanity has been restored! The cat no longer cringes when I'm around!