Make IT Complete

Technical Ramblings From an IT Professional

Increase the Number of Connection for Courier-IMAP in Plesk

By default, UNIX-based servers running Plesk and the Courier-IMAP e-mail server drastically limit the number of inbound connections to prevent users from opening up too many concurrent sessions. Unfortunately, this artificially-low restriction can impact legitimate users who have multiple computers connecting to the Courier-IMAP server from behind a firewall or a single computer that runs an IMAP client that takes advantage of mailbox caching.

Plesk comes configured with a limit of 4 connections per IP address and a limit of 40 connections total. Modern IMAP clients such as Mozilla Thunderbird use mailbox caching to open up multiple connections to increase performance. In the case of Thunderbird, it opens up 5 connections by default which is already 1 connection more than Courier-IMAP’s default restriction. Add another few family or corporate computers behind a firewall and those additional users won’t be able to connect at all since a single Thunderbird client is already utilizing all 4 connections.

To increase this restriction, modify the /etc/courier-imap/imapd configuration file and change MAXDAEMONS and MAXPERIP to a more sane number. In the case of my configuration, I changed MAXDAEMONS from 40 to 80 and MAXPERIP from 4 to 40. This allows all the machines behind my home firewall to connect to multiple accounts on the e-mail server with mailbox caching enabled.

But even those numbers may be too low for a corporate colocated server that services an entire company. Tweak those numbers based on your employee base; if 50 employees are connecting to the e-mail server from behind the same firewall then MAXPERIPcould need to go as high as 250 (50 employees times 5 cached mailbox connections). Add e-mail clients of people working from home and MAXDAEMONS could go as high as 300 or 400.

Obviously, the connection limits are to prevent the Courier-IMAP server from using too many memory and CPU resources on the machine. Tweak the numbers based on the memory footprint of each daemon process and how much memory you have.

Picked up a used Macbook Pro 15 2.0 Ghz

I picked up a used Macbook for my wife.  She loved my new one so much that she needed to have one.  The new Macbook is much faster then the old but right now I think that I like to old keyboard better.

I have the new Macbook Pro 15

All I can say is that I love this machine.  The lappy will be replacing my Dual G5 Power Mac.  This machine is faster, has a better graphics card, larger hard drive and can be taken anywhere.  Only complaint is that this machine was really expensive.  That aside it is by far the best ‘puter I have ever used period.  Sure there are others that have more features, higher resolution, faster hard drives and more memory but no laptop has ever been assembled as well as this one.

Check back soon as I get some more time under my belt with this machine and get VMWare Fusion installed and running.

So far I just have my Adobe Creative Studio installed and then needed to get to work.

More tomorrow.

Getting a New Macbook Pro Today

OK I give!  I have decided that it is time to get a new laptop.  My final decision is to get the 15″ MacBook Pro with the 320 Gig drive and 2.54 GHz processor with 4 Gig Ram.  This machine should cover me for the next few years.

[update] Well it has not happened just yet.  Later this week when I have more time.

Not a Technical Post….

Please check out http://www.briansworld.com/2008/10/21/24-hours-of-lemons/.

We had a great time.  Read the post at the link for more info.

Moving a MS-SQL Database

The following example moves a database that is named mydb. This database contains one data file, Mydb.mdf, and one log file, Mydblog.ldf. If the database that you are moving has more data files or log files, specify the files in a comma-delimited list in the sp_attach_db stored procedure. The sp_detach_db procedure does not change regardless of how many files the database contains because the sp_detach_db procedure does not list the files.

1. Detach the database as follows:

use master
   go
   sp_detach_db 'mydb'
   go

2. Next, copy the data files and the log files from the current location (D:\Mssql7\Data) to the new location (E:\Sqldata).
3. Re-attach the database. Point to the files in the new location as follows:

use master
  go
  sp_attach_db 'mydb','E:\Sqldata\mydbdata.mdf','E:\Sqldata\mydblog.ldf'
  go

Verify the change in file locations by using the sp_helpfile stored procedure:

use mydb
   go
   sp_helpfile
   go

The filename column values should reflect the new locations.

Note Microsoft Knowledge Base article 922804 describes an issue for SQL Server 2005 databases on a network-attached storage. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

922804 (http://support.microsoft.com/kb/922804/) FIX: After you detach a Microsoft SQL Server 2005 database that resides on network-attached storage, you cannot reattach the SQL Server database

Consider this issue. Additionally, consider the permissions that are applied to a database when it is detached in SQL Server 2005.

The Windows Installler service could not be accessed

Error message when you try to add or remove a program on a computer that is running Windows XP or Windows Server 2003: “The Windows Installer service could not be accessed”

Reregister the Windows Installer To reregister the Windows Installer, verify the location of the Msiexec.exe file on your hard disk and in the Windows Registry, and then reregister the Windows Installer. To do this, follow these steps.

Note Because there are several versions of Microsoft Windows, the following steps may be different on your computer. If they are, see your product documentation to complete these steps.

1. Determine the location of the Msiexec.exe file on your hard disk. To do this, follow these steps:

a. Click Start, click Run, type %windir%\system32, and then click OK.

Note This step will open the folder where the Msiexec.exe file is located.

b. Make a note of the location of the Msiexec.exe file. The location of the Msiexec.exe file will be a combination of the value in the Address text box and the Msiexec.exe file name itself.

For example if the Address text box contains a value of C:\Windows\system32, the location of the Msiexec.exe file will be C:\Windows\system32\Msiexec.exe.

2. Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:

322756 (http://support.microsoft.com/kb/322756/) How to back up and restore the registry in Windows

Make sure that the location of the Msiexec.exe file in Registry Editor is correct. To do this, follow these steps:

a. Click Start, click Run, type regedit in the Open text box, and then click OK.
b. Expand HKEY_LOCAL_MACHINE, expand SYSTEM, expand CurrentControlSet, expand Services, and then click MSIServer.
c. In the right pane, right-click ImagePath, and then click Modify.
d. In the Value data text box, type the location of the Msiexec.exe file that you determined in step 1, followed by the value of /V, and then click OK.

For example, if the location of the Msiexec.exe file is C:\Windows\system32\Msiexec.exe, type the following text in the Value data text box:

C:\WINDOWS\System32\msiexec.exe /V
e. Click OK to close the Edit String dialog box.
f. Click the File menu, and then click Exit to close Registry Editor.
3. Start your computer in safe mode, and then register the Msiexec.exe file. To do this, follow these steps:

a. Click Start, and then click Turn off computer or Shut Down.
b. Select the Restart option, and then click OK, or click Restart.
c. Press F8 before the Windows splash screen appears.
d. On the Windows Advanced Option menu, use the arrow keys to select the Safe Mode option, and then press ENTER.
e. If you use a dual-boot or multiple-boot computer, select the appropriate operating system from the list that is displayed, and then press ENTER.
f. Log on to the computer.
g. Click Start, click Run, type msiexec /regserver in the Open text box, and then click OK.

Note For 64-bit operating systems, you also have to reregister the 64-bit MSI installer. To do this, click Start, click Run, type %windir%\Syswow64\Msiexec /regserver in the Open text box, and then click OK.

On 64-bit editions of the Windows operating system, 32-bit binaries are located in %systemroot%\SysWow64 folder. The 64-bit binaries are located in the %systemroot%\System32 folder.

h. Click Start, and then click Turn off computer or Shut Down.
i. Select the Restart option, and then click OK, or click Restart.

Install Certificate in IE7 under Vista

If you are unable to install a certificate run IE as an administrator.

If you are like me, and you have a couple of encrypted web services that use self-signed SSL certificates, you may run into problems getting Windows Vista and Internet Explorer 7 to trust a web site with a self-signed certificate even though you consider it safe. I found these instructions on the MSDN Channel9 blog and thought that I would pass this useful tip along:

To install a certificate when visiting a self-signed OWA server on Vista, you need to perform the following steps:

  1. Run IE as an administrator (Right-click the desktop icon)
  2. Visit the site.
  3. Click through the certificate error
  4. Click the “Certificate Error” button in the address bar.
  5. Click View Certificate
  6. Click Install Certificate
  7. Unlike on XP, you must click the “Place all certificates in the following store” radio button, and choose the “Trusted Root Certification Authorities” store. If you don’t do this, the certificate goes in your personal store, and it isn’t trusted by IE.

Yes, this is cumbersome, but for good reason: Self-signed certificates are quite dangerous, because unless you manually compare the thumbprint/hash via secure or out-of-band communication, you have no assurance that your connection isn’t being man-in-the-middle attacked.

Thanks to Eric Lawrence, Program Manager, IE Networking for these instructions.

Redirect default.apsx to another page

On our site we wanted to have all of our pages under version control including the root default.aspx page so that required us to do a redirect from from the root to the /pages/default.aspx.

There are a few ways to do this.

  • The easiest is to add a content web part and add a

<script> location.href = ‘/pages/default.aspx’; </script> but not the most efficient means.

  • or create a simple web part or web control that does a

Page.Response.Redirect = “/pages.default.aspx”

 

  • or what we did is add this to the page

<script language=”C#” runat=”server”>

    void Page_Load()
    {
         Response.Redirect(”/pages/default.aspx”);  // DO NOT USER Server.Transfer here as it will screw up your relative references.
   }

</script>

NOTE: for this to work you will also need an entry in the web.config file to allow compiling. Looks like this:

  <PageParserPaths>
        <PageParserPath VirtualPath=”/default.aspx” CompilationMode=”Always” AllowServerSideScript=”true” />
      </PageParserPaths>

 

I am still seeing my deleted email in Horde

The default option in the Horde email client is to display the deleted messages.  There is a link in the upper rigth corner of the page that says hide deleted.  Click it and the deleted messages will be hidden from view.

Horde has other options for treating deleted messages that include putting the deleted items in a Trash folder.  Contact you administrator if you want to have these features enabled.