This blog is a place used for notes and writing about various technical problems and projects worked on. Quite often the posts will be incomplete and some are likely to remain incomplete forever.

Hopefully some of it may be of passing interest, or maybe provide some assistance.

Please leave a comment. Or if you feel generous, click on an ad or two

Jun 15

Outlook 2003 & 2007 when used with IMAP behave a little different when deleting emails than we are used to. Instead of moving the mails to a Trash folder, the mails are simply marked for deletion by using a strikethrough font. Most of us will prefer to not display these marked for deletion emails, as they clutter things up… Here’s how:

Outlook 2007: View -> Current View -> Hide Messages Marked for Deletion

Outlook 2003: View -> Arrange By -> Current View -> Hide Messages Marked for Deletion

This is done on a per folder basis.

Now these hidden emails marked for deletion, will hide there until purged.

Outlook 2003: Edit -> Purge Deleted Messages

This will purge the messages in the currently selected folder only.

In Outlook 2007, I believe there is a further Edit -> Purge command which will allow you purge all folders at once, and set up automatic purging if required.

Warning: Once an email is purged, it’s gone. There is no recovery possible.

 

Thankfully Outlook 2010 seems to have got it’s act together and just puts the damn things into a Trash folder like everybody expects.

 

 

 

 

Jun 11

For some strange reason, plesk does not seem to have a way for the administrator to reset an email users password. You need to ssh into the server and use a command line tool:

/usr/local/psa/bin/mail -u emailuser@yourdomain.com -passwd 'newpassword'

run

/usr/local/psa/bin/mail --help

to see some other things this command can do.

 

Jun 1

A client’s PC got infected with one of the fake antivirus trojans. I could not run MalWareBytes even in safe mode, so I took out the hard disk and scanned it on another computer. It found the following:

Files Infected:

h:\documents and settings\preferred customer\application data\Sun\Java\deployment\cache\6.0\49\51dc9431-3dfae1a3 (Trojan.FakeAlert) -> Quarantined and deleted successfully.

h:\documents and settings\preferred customer\local settings\application data\ibo.exe (Trojan.FakeAlert) -> Quarantined and deleted successfully.

However, when I put the disk back in the original computer, I still could not run MalWareBytes. The registry was still trying to insert the trojan’s code on running an exe file. No surprise here. This is a common trick.

Rather than go hunting the appropriate registry key down, I remembered a blog I had stumbled across a few days earlier, discussing .exe and .com files and their interchangeability:

What’s the difference between the COM and EXE extensions?

So I went to the folder where MalWareBytes files live, copied mbam.exe to mbam.com. Double click on the com file and it runs without interference by corrupt the registry key. MalWareBytes can then do it’s thing and clean up the registry for you.

I suspect that if I booted in safe mode, and tried to run mbam.com instead of mbam.exe, I might have been able to run the scan without having to remove the hard disk.

 

 

May 30

The problem: Outlook cannot open links contained in emails.

This was actually an Internet Explorer problem or more correctly a Google Chrome problem.

The user had installed and then uninstalled Google Chrome. But it appears Chrome doesn’t uninstall itself properly leaving the registry a bit messed up. Afterwards when you click on these links contained in emails, Internet Explorer doesn’t get called properly you get the error. I suspect http links clicked on from other places, outside of the web browser, were not working either, but I didn’t check.

I googled and tried a bunch of registry fixes to no avail. In the end, the fastest and simplest solution is to just remove and reinstall Internet Explorer. Then when you run it for the first time, it sets up all it’s registry stuff again and your good to go.

May 26

A client’s PC’s internet connection was behaving intermittently. Initially I thought it was the DNS servers, and I was blaming their provider UPS. I had, via telephone, talked the client through changing the DNS server and it started working. Then I remote accessed the PC  and started looking around.

I brought up a dos box and started checking DNS servers using nslookup. At first it seemed to confirm my suspicions about UPS’s DNS servers, but then even my new DNS server stopped working. Even pings to outside IP addresses were now failing. A little while later, it started working again, but now the UPS DNS servers were working as well. It seems only new connections were being blocked, as my remote access session was not interrupted.

I logged into their router it was a Cisco EPC2425. I had a look at the firewall logs. There I saw a lot of flood attempts originating from this PC to various outside addresses. I used “netstat -ano” to give me the process ID’s of processes with connecti0ns to the outside. I matched up one of the firewall log IP’s and got a process ID. Then I ran the task manager, enabled a Process ID column in the view and matched my process ID to bittorrent.

“netstat -ano” showed multiple connections to the outside from bittorrent & utorrent. I uninstalled them both and the problem was cured. Everybody’s DNS servers were working fine.

I didn’t investigate any further to see if I could configure things to work in harmony, I’m sure it is possible. But It seems that out of the box, the Cisco EPC2425 doesn’t like the way the bittorrent and utorrent work. In fact it probably doesn’t like the upload functions of all torrent software, and I don’t blame it.

May 17

Quite often I need to check the status of an email from someone to someone else to see if it got through my mail server OK.

This little shell script speeds up this process for me.

Read the rest of this entry »

May 16

You cannot select multiple folders in Outlook. This is a real pain when you are trying to clean up a messy email account.

But you can install a 3rd party app to do it. Pandali Folder Master for Outlook (http://pandali.com/pfm.html). They do a 30 day free trial. Hopefully you can clean it up within this time limit.

May 8

One of my clients use a VB.NET/MS SQL Server application which I built for them. They accidentally deleted a widget from their database. The application keeps track of about 200 widgets per year. These widgets are complex things whose key variable information is held in 8 seprerate tables.  This particular widget had 111 children and involved over 1900 seperate records across the 8 tables. The records are linked using sequential number primary keys. Restoring this record is not a trivial cut and paste job.

I had done something similar to this with a proper database before. Then I used mysqldump to export the data into a set of SQL INSERT statements. Next I cleaned up these leaving only the ones I wanted and then ran the SQL script which inserted the required records into the live database.

After a bit of looking around Microsoft SQL Server Database Publishing Wizard came to the rescue. It can basically take a snapshot of your database into an SQL script which you can then run against a different database.

I got it here

When installing “Microsoft SQL Server Database Publishing Wizard” It complained about some missing dependancies, but it also showed me where to get them.

Then I loaded up the backup database on my test system. Deleted all other widgets except the one I wanted. Then I checked the database to make sure the only records in the 8 tables were pertaining to the required widget. Then I ran  Microsoft SQL Server Database Publishing Wizard to generate the SQL script. Then I edited the script and removed any extraneous lines leaving only the INSERT statements. It looked something like 1900 lines of this:

INSERT [dbo].[WidgetChildQtys] ([id], [widget_child], [qty]) VALUES (14007, 5308, 3000)
INSERT [dbo].[WidgetChildQtys] ([id], [widget_child], [qty]) VALUES (14008, 5308, 5000)
INSERT [dbo].[WidgetChildQtys] ([id], [widget_child], [qty]) VALUES (14009, 5308, 10000)

When restoring a bunch of records like this, because the database has changed since they were removed, there is no guarantee that they will simply import correctly. It will be fine provided none of the primary keys you are importing have been hijacked by any new records in the meantime. I waited until I could shut down the application. Then I did a test on a copy before I restored to, and reinstated the live database.

May 3

I had a problem with new PCs with Windows 7 on not behaving with HP’s P4015N Laser printer. They could print one document fine, but then the printer remained locked and needed to be power cycled before it would accept another document.

A firmware upgrade from HP fixed it.

Go to www.hp.com. Browse to support. Enter the product name, Choose your operatring system. The firmware upgrade ios towards the bottom of the page.

I got mine  here

May 3

Believe it or not (lol), there is an incompatibility issue between Windows Small Business Server 2003 and Windows 7. Read the rest of this entry »

« Previous Entries Next Entries »