Outlook autocomplete address book – nk2 file

Most of you have probably noticed that when you start typing an email address on the “To” field of Microsoft Outlook, you get an autocomplete list of email addresses you have used sometime in the past. Outlook uses a file with the nk2 extension to store these email addresses and present them to you while you start typing. This file has the name of your outlook profile and based on the OS and the Outlook version used, is stored in the following locations.

  • For Outlook 2003/2007 with Windows 2000, Windows XP, or Windows Server 2003:
    The location of the nk2 file is C:\Documents and Settings\[User Profile]\Application Data\Microsoft\Outlook
    The name of the NK2 file is identical to the Outlook profile name, with .nk2 extension.
  • For Outlook 2010/2013 with Windows Vista, Windows 7, or Windows server 2008:
    The nk2 file is located in C:\Users\[User Profile]\AppData\Local\Microsoft\Outlook\RoamCache
    The name of the NK2 file is in the following format: Stream_Autocomplete_X_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.dat The X is the file index (usually 0) and AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA is a random 16-byte key in hexadecimal format.
  • For Outlook 2010/2013 with Windows XP:
    The nk2 file is located in C:\Documents and Settings\[User Profile]\Local Settings\Application Data\Microsoft\Outlook\RoamCache
    The name of the NK2 file is in the following format: Stream_Autocomplete_X_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.dat The X is the file index (usually 0) and AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA is a random 16-byte key in hexadecimal format.

So every time you change your PC or even change your profile in Outlook and you realize that you have lost all your email addresses from the autocomplete list , it’s because Outlook doesn’t anymore have a link to your old nk2 file. So in order to use your old nk2 file with your new installation of Outlook, you have to follow the below instructions based on the Outlook version you are using.

  • For outlook XP,2003 and 2007
    When you are currently using Outlook 2002, 2003 or 2007 and you’ll also be using that on your new computer, then all you have to do is copy the nk2-file to the correct location on the new computer. Sometimes you’ll need to rename the file in order to match the name of your new mail profile.
Posted in Windows | Leave a comment

Delete failed domain controller from Active Directory

In the case you have a failed domain controller where there is no option to delete him using dcpromo utility, yau have to follow the above prcedure:
Login to an active domain cotroller and open a command prompt.

C:\
C:\ntdsutil
C:\metadata cleanup
C:\connections
C:\connect to server servername
C:\q
C:\select operation target
C:\list domains
C:\select domain 0
C:\list sites
C:\select site 0
C:\list servers in site
C:\select server 0
C:\q
C:\remove selected server

After removing the server with ntdsutil we have to remove him from the Active Directory Sites and Services snap-in and from the Active Directory Users and Computers.

Posted in Windows | Comments Off on Delete failed domain controller from Active Directory

Find duplicate entries in excel 2003 column

I am using Excel 2010 and the process of finding duplicates is really straightforward:
Select your column –> From Home tab –> Styles group –> Conditional Formating –> Highlight Cells Rules –> Duplicate Values.
But in excel 2003 things are different – there is no built-in formula to find duplicates. So again we have to select our column (let’s suppose it’s column A) go to Format–>Conditional Formating–> Formula is insert the following formula =IF(COUNTIF($A1:$A$1;$A1)-1>0;TRUE;FALSE) go to Format and choose a background color for the duplicate records.

Posted in Windows | Comments Off on Find duplicate entries in excel 2003 column

Allow remote connection to Mysql db

Usually there is no need to access a Mysql db from a remote machine as the locahost access is usually enough. But there might be occasions when you want to have remote access, for example in the case you want to query your db from excel. For that you have to create a user for remote access:

#mysql -u root -p
password:
GRANT ALL PRIVILEGES ON *.* TO  'USERNAME'@'IP'  IDENTIFIED  BY  'PASSWORD';
FLUSH PRIVILEGES
Posted in Web | Leave a comment

PGmail recalculate mailbox quota

There are some occasions where you might want to recalculate the quota and the total number of messages existing in a mailbox, for a single user or maybe for all your users. This can be accomplished with deleting the record/s in the table used_quota.

mysql> USE vmail;
mysql> DELETE FROM used_quota WHERE username='[email protected]';

OR

mysql> USE vmail;
mysql> DELETE FROM used_quota ;
Posted in Linux | Leave a comment

Outlook 2003 with IMAP

In the company that I work we are using three Email Servers. Two Exchange 2003 and a Linux box configured with postfix and dovecot for the mobile users. Those accounts configured with postfix are getting their emails through POP3 (using Outlook-2003-2007-2010 or Mozilla Thunderbird). What I want is to switch from POP3 to IMAP. In order to do this I have to give the users the same user experience when working in Outlook with IMAP as when working with POP3. Below are the things I did in order to accomplish this.

— Subscribe to all IMAP folders and download full messages (not only headers). I had to do this because users where used to wait for all the messages to download-the default behavior with IMAP folders is to download only headers and only when opening the message or the attachment to download the rest of it. So in Outlook 2003 I have to go to Tools->Options->Mail Setup->Send/Receive   and there after pressing Edit check all the IMAP folders for synchronization and for every folder check the “Download complete items including attachments”.

Start Outlook in the Inbox folder of IMAP. Go to Tools–>Options–>Other–>Advanced Options and in “Start up in this folder” choose your IMAP Inbox  folder.

Hide deleted items. If you “delete” a message in an IMAP email account accessed through Outlook, neither is it deleted immediately nor does Outlook move it to the Deleted Items folder but instead is “marked for deletion” until you purge the folder. In order to purge the deleted items, you have to go to Edit–>Purge Deleted Messages. For Outlook to purge deleted items automatically you have to select the folder (you have to do this for every folder) and go to ????. In the default view used by Outlook for IMAP accounts,”deleted” messages are displayed grayed out and with a strike-through line but they are still visible. To hide messages already marked for deletion go to View–>Arrange by–>Current View–>Hide messages marked for deletion.

Move Sent items to IMAP Sent items folder.By default Outlook 2003 puts all of the Sent emails into the default PST folder “Sent Items”. In order to move them to the IMAP folder you have to create a rule (I am not going to describe that as it is really straightforward). If you want to avoid having a duplicate sent email in the Sent folder of the PST you have to go to Tools–>Options–>Preferences–>Email Options and deselect “Save copies of messages in Sent Items folder

 

 

Posted in Windows | Leave a comment

WordPress – Link pages to categories

As I started my blog, one of the first things I wanted to do was to find a way to categorize my posts under the header menu. In WordPress the header menu is by default populated from the “Pages” added from the admin interface. But a new “Page” is mainly a static page which you can associate with a post. WordPress’s way to categorize the posts is with “Categories”. So what I had to figure out was how to link a “Page ” with a “Category”. The solution came from a plugin called “Page Links To”. After I installed it I was able to redirect the “Page” to the link of the “Category”. So now when you click on the header menu a “Page”, lets say the Linux page you get all the posts under the category Linux (because I am redirecting the Linux “Page” to the Linux “Category”).

Posted in Web | Leave a comment