Sunday, January 30, 2011

Google Talk Video Chat with Amy & Children

While I would prefer to use Microsoft's Lync (Office Communicator) client, it isn't really practical for personal use, so Google Talk it is, even when I'm actually in Microsoft Building 40 out here in Redmond, using Microsoft's guest wireless, and there is a Lync Microsoft Certified Master class going on in the classroom next to me :).

Friday, January 21, 2011

Human SMTP Server in Microsoft Certified Master training

This was an exercise that I really enjoyed. Our instructor setup a listener on port 25 that would allow you to type SMTP commands as if we were the server. Keep in mind that we are in a room full of the top percent of e-mail system architects and engineers. So we all know the SMTP commands that the client sends, and well, the server is somewhat forgiving of typos. But since servers don't make typos, well, the client will just drop. Volunteers? Anyone, Anyone? After a while, I decided to give it a go. I was pretty sure I knew what I was doing, so I got up there and started typing.

I type: 220
Client: ehlo
I type: 250
Client: mail from:
I type: 250
Client: rcpt
I type: 250
Client: DATA
I type: 250
Client: !!crickets!! it was gone, obviously 250 wasn't the right response to the DATA command. Incidentally, it is 354. The good news is that I was close, I knew that when I was done sending data it would have looked for another 250, and it always ends with 221 after the QUIT command is issued.

It took the class a few tries to get it right, but it was a lot of fun, with the purpose of making sure we really are familiar not only with what the client is sending, but what the server is sending too, because when you are tracing a protocol log, it helps to just know it.

Thursday, January 13, 2011

Powershell VCards (text file splitting)

I ran into a problem today that I figured I'd share. The exported addressbook format for GroupWise wouldn't work with Outlook, even though it supported the VCard format, the GroupWise client exported the entire address book in a signle .VCF file, which Outlook didn't support.

While not a good solution, I decided to split up the .VCF file with a script and make multiple .VCF files that could be imported to Outlook.

$ifile = $args[0]

If($ifile -eq $NULL)
Write-Host Usage: .\vcfrw.ps1 filename.vcf
Write-Host Examp: .\vcfrw.ps1 h:\vcf\joe.vcf

Write-Host Prossessing GroupWise VCard File: $ifile

$i = 1
switch -regex -file $ifile
"^BEGIN:VCARD" {if($FString){$FString | out-file -Encoding "ASCII" _
"$ifile.$i.vcf"};$FString = $_;$i++}
"^(?!BEGIN:VCARD)" {$FString += "`r`n$_"}

Write-Host VCard Processing Complete
Write-Host Processed $i VCard entries

The biggest problem I had was with the out-file, my first runs generated .VCF files that looked valid, but Outlook would not read them. After a little searching I learned that out-file by default used Unicode format, and Outlook needed them to be ASCII. hence the -Encoding "ASCII" in the script.