Diary of a geek

January 2010
Mon Tue Wed Thu Fri Sat Sun
       
20

Andrew Pollock

Categories

Other people's blogs

Subscribe

RSS feed

Contact me

JavaScript required


Wednesday, 20 January 2010

Finding the maximum message size

This was born from a need to see how big a ZIP file I could send my accountant in Australia, and scratching the itch to write some code.

The fact that most SMTP servers talk Extended SMTP makes this relatively easy, and Python has some great modules for DNS and SMTP.

One gripe I do have is how long it takes the Python modules to mature. It's taken until Python 2.6 for smtplib.SMTP() to gain a timeout parameter, for example.

Anyway, I was able to write something nice and generic (it works for any domain) in around 100 lines, thanks in no small part to the DNS module, which makes getting a list of MX records stupidly easy.

$ ./maxmessagesize.py andrew.net.au
daedalus.andrew.net.au: -1
$ ./maxmessagesize.py pollock.id.au
ASPMX.L.GOOGLE.COM: 35,651,584
ALT1.ASPMX.L.GOOGLE.COM: 35,651,584
ALT2.ASPMX.L.GOOGLE.COM: 35,651,584
ASPMX2.GOOGLEMAIL.COM: 35,651,584
ASPMX3.GOOGLEMAIL.COM: 35,651,584
ASPMX4.GOOGLEMAIL.COM: 35,651,584
ASPMX5.GOOGLEMAIL.COM: 35,651,584
$ ./maxmessagesize.py debian.org
master.debian.org: 104,857,600
$ ./maxmessagesize.py cameronp.com
mail1.mysmarthost.com: 30,000,000
mail2.mysmarthost.com: 30,000,000
$ ./maxmessagesize.py ubuntu.com
mx.canonical.com: 62,914,560
$ ./maxmessagesize.py clug.org.au
mx.clug.org.au: 50,000,000
$ ./maxmessagesize.py linux.org.au
morton.linux.org.au: 52,428,800

It's good to see that in most cases of domains I tried, all of the MXes had the same maximum message size.

Source code is here

[23:51] [tech] [permalink]

Fetal MRI results

Yesterday we went back to Stanford for another ultrasound and a fetal MRI.

We had pretty much the same gang doing the ultrasound as two weeks ago, so that was a nice bit of continuity. A paediatric radiologist came in at the end to take a look. She was the most confident of anyone that everything was going to be okay. She thought she could see something resembling the cavum septum pellucidum on the ultrasound. I think the ultrasound report said it was an "unusual shape" or something like that.

After that, we got packed off for the fetal MRI. There was a bit of a wait, as there's only one MRI machine for the children's hospital, and the studies tend to take 30 to 45 minutes, but we eventually got in.

I got to sit in the room with Sarah while they did the MRI. I was hoping to be able to sit in the control room instead, so I could look over their shoulder and see how it was all done. We both got earplugs because the machine is pretty noisy. It's not the hammering sound that they seem to go for on TV, it's more various different pitches of a horn.

The radiologist told us she'd probably read the MRI later that night, as there'd be a bit of a backlog with the long weekend, and that we'd get a call today.

Sarah got impatient this afternoon and called her obstetrician, and he called her back shortly afterwards saying he'd spoken to the radiologist and everything was fine. Exact specifics are not known at this time, but we'll be quizzing the obstetrician at our next appointment in a couple of weeks.

Needless to say, we're both extremely relieved that everything is okay, and can scrub one thing off the list of things to have to worry about at the moment. Now we can just concentrate on trying to move house this weekend.

[22:51] [life] [permalink]