Delete unused SMTP servers in OS X

I had numerous unused SMTP servers in my  Apple Mail list, so I decided to tidy up and found the following steps do it (yeah!):

  1. Access the Finder menu and navigate to Go to Folder and type /Library/Scripts/Mail Scripts/.
  2. Look for Manage SMTP Servers.scpt and open it.  (This should open the Script Editor.)
  3. Hit the Run button, then select the (SMTP) servers you want removed.
  4. Hit OK and a message stating the deletion was successful should pop up.

That’s it, now when you go back to Apple Mail you’ll see a nice, pruned list.  BTW, you will only be able to delete SMTP servers that are NOT in use by any of your mail accounts.

Read a file with bash

I had to test our download servers at work right away, i.e., HTTP vs HTTPS, which required downloading a large number of files.  A file list was given to me to work with, like so:

/download/integrations/file1.exe
/download/us/update/patch/file1.exe
/download/us/cab/file1.exe

So I decided to use the bash shell to read each line and run wget quick and dirty.  Here’s the script:

cat c:\\test.txt | while read line; do wget “URL/${line}”; done

While running it I just used the Windows clock to get an approximate time difference.

That’s it!  Hope this helps. 

How to find the service pack version installed on SQL Server

Run and execute the following query; it doesn’t matter what database and/or table you’re in:

select @@VERSION

If executed successfully, you should get something like below, which shows that SP2 is installed.

Microsoft SQL Server 2005 – 9.00.3042.00 (Intel X86)   Feb  9 2007 22:47:07   Copyright (c) 1988-2005 Microsoft Corporation  Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 2)