Vodafone(Ireland) blocking encrypted SMTP

I’m testing a 3G router at the moment and when I tried to send an email Thunderbird refused to do so  claiming my email server didn’t support the STARTTLS. As I was quite sure that it did, I took out wireshark and had a closer look. Here’s the dialog between Thunderbird and my mail server when using  my normal broadband line:

SMTP: S: 220 mail.blacknight.com ESMTP
SMTP: S: 250-mail.blacknight.com | 250-STARTTLS | 250-AUTH LOGIN CRAM-MD5 PLAIN | 250-AUTH=LOGIN CRAM-MD5 PLAIN | 250-PIPELINING | 250 8BITMIME
SMTP: S: 220 ready for tls
TLSv1: Client Hello

And here’s what it looks like after Vodafone’s treatment:

SMTP: S: 220 *************************
SMTP: S: 250-mail.blacknight.com | 250-XXXXXXXA | 250-AUTH LOGIN CRAM-MD5 PLAIN | 250-AUTH=LOGIN CRAM-MD5 PLAIN | 250-PIPELINING | 250 8BITMIME

Notice how they have removed the STARTTLS option. What the hell are they doing?  The same problem happens with other email providers (google, gmx) too. I contacted Vodafone but no-one there seems to be willing to provide an answer.
I suspect that it’s just another patronizing behavior of Vodafone. Same as blocking all incoming TCP connections and blocking all incoming traffic to UDP port 1025. Do they really expect me to send my emails unencrypted?

Similar problems seem to exist in Germany too.

Update 1:

Using TCP port 587 for SMTP as suggested in the comments by christoph is working fine. Looks like vodafone isn’t monitoring that port.

Update 2:

Came across another issue with Vodafone Ireland and SMTP. Apparently they don’t like it when an SMTP server doesn’t require authentication.  Vodafone forcefully closes such connection. Here’s an example when you use a normal broadband provider:

S: 220 xxxx.com ESMTP; Fri, 02 Jul 2010 10:53:28 +0100
C: EHLO 24alpha
S: 250-xxxx.com Hello 24alpha, pleased to meet you
S: 250-ETRN
S: 250 SIZE
C: MAIL FROM: <xxxx@xxxx.com>
S: 250 <xxxx@xxxx.com>, Sender ok
C: RCPT TO: <xxxx@xxxx.com>
S: 250 <xxxx@xxxx.com>, Recipient ok
S: 354 Enter mail, end with <CRLF>.<CRLF>

And here the same via Vodafone:

S: 220 ***********************************************************************
C: EHLO 24alpha
S: 250-xxxx.com Hello 24alpha, pleased to meet you
S: 250-ETRN
S: 250 SIZE
C: MAIL FROM: <xxxx@xxxx.com>
S: [TCP connection closed]

I understand the reason behind this. Basically Vodafone want to prevent spam from originating from their network. And an SMTP server without authentication is generally a bad idea.

Firefox 3.6 and Revenue’s ROS service

Tried to submit my VAT returns today and noticed that the Java applet failed to work.  I noticed a strange “‘invalid ‘in’ operand plugin” message in the Firefox’s error console. Turned out that I need a Java update on my box. I was running, updated it to and now the applet works again. Question: shouldn’t Firefox during the update check that all the criteria are fulfilled? The correct Java version is definitely something it should check if it relies on it so heavily.

xplanet and Windows XP

I always wanted to have xplanet running as a background process like I used to on Linux. Here’s how I did it:

  1. Download and install the Windows Server 2003 Resource Kit Tools
  2. Create the xplanet  service: ‘instsrv xplanet “C:\Program Files\Windows Resource Kits\Tools\srvany.exe”‘
  3. Modify the registry (using regedit) entry for the xplanet service:
    – go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\xplanet
    – add new key ‘Parameters’
    – add new string value in Parameters, ‘Application’, set it to: ‘C:\Program Files\xplanet-1.2.0\xplanet.exe’
    – add new string value in Parameters, ‘AppParameters’, set it to: ‘-fork -searchdir C:\”Program Files”\xplanet-1.2.0\xplanet -wait 600 -lat 51.89 -lon -8.49’ (that will set your point of view right over Cork)
  4. Make sure your service is set to start automatically, ‘services.msc /s’, …

Don’t forgot to improve xplanet by using the nice pictures from Visible Earth

A morse code trainer for the Nokia 6030 (and potentially other phones too)

A while ago I thought it would be nice to have morse code trainer on my mobile phone. I hoped that I then could use the time I spent commuting on the train to learn some morse code. So I had a look around and the only application that I could find was MobileMorse. Unfortunately, MobileMorse caused an exception on my Nokia 6030. So I decided to write my own morse code trainer. It is a very simple application, much simpler than MobileMorse but it seems to do the job on my phone at least. I also tested it quickly on a Sony Ericsson K790i and it seemed to work on it too. In theory it should work on any mobile phone that supports Java (CLDC-1.1, MIDP 2.0) – but as I learned quickly this isn’t the case as Java compatibility seems to vary between different phone models. I’m therefore also working on a version that uses Nokia’s Sound class to generate tones.

The program is intended for learning morse code using the Koch method. It therefore starts with two characters (level 1) and you can add additional characters as your proficiency improves – however not all signs of the international morse code are supported at the moment. I will add them in the next version.

I called the program BMorse (couldn’t come with a better name at the moment). If anyone else is interested in this program it can be download from the following address:


The .jar file can be found at http://peterhertting.gmxhome.de/BMorse.jar.

Please keep in mind that this is still work in progress! I would therefore be very interested in test results on other phones as well as suggestions for improvements etc.. I’d also appreciate if an experienced ham radio operator could provide me with some feedback regarding speed etc. I will also publish the code under the GPL soon.

Oh yes, don’t forget to use the headphones when you are trying the program. The speakers used in some phones are really crap.

Saving power on my laptop I

I’m using an Acer TravelMate 4672WLMi at home and I was never happy with the lifetime of the battery. About 2 hours is the most I get out of it. So I’m trying to tweak Ubuntu (just upgraded to 7.10) a bit to see what can be done. I got the inspiration from http://www.lesswatts.org/ – so full credit to those boys and girls!

The first thing I wanted to do is to reduce the power consumption of the wireless card. You usually do this by calling ‘iwpriv eth1 set_power 5’ to enable the power-saving mode. However, I wanted an easier way without having to run this command manually whenever I’m not connected to the mains.

So I had a look around in /etc to see if I could find anything that could help. Here I came across a directory called laptop-mode which belongs to a package of the same name. Here I found a subdirectory conf.d/wireless-ipw-power.conf. This file consists of only one line (apart from a few comments):


That looked exactly what I needed. I changed that value to 1 and restarted the laptop-mode by running:

sudo /etc/init.d/laptop-mode restart

Unfortunately that didn’t have any effect as iwconfig indicated that the power saving for the wireless card was still disabled. However, I very quickly noted by running ‘sudo laptop_mode’ that the laptop mode wasn’t enabled at all:

$ sudo laptop_mode
Laptop mode disabled, active.

After a quick look in the /etc/init.d/laptop-mode I learned that I had to enable the laptop mode by setting ENABLE_LAPTOP_MODE to true in /etc/default/acpi-support (read the warning in the associated comment as well!). After this was done and another call of

sudo /etc/init.d/laptop-mode restart

the power saving for the wireless card was enabled. Seems to save a ‘massive’ 50mA. Happy days!

Of course, that’s not the end of it and more options will need to be tweaked to save more power. Why is nothing easy with Linux 😉 ?

How to get gcc to interleave assembly output with original source code

Recently I wanted to demonstrate the effects of the ‘volatile’ keyword on compiler optimization to a former colleague. I therefore needed to show him the assembly code generated by gcc. This can be easily achieved by using ‘gcc -S test.c’ The resulting test.s file will then contain the assembly code, e.g.:

.file “loop.c”
.globl main
.type main, @function
leal 4(%esp), %ecx
andl $-16, %esp
pushl -4(%ecx)
pushl %ebp

This does the job but it’s not particularly easy to find your way around in the code (at least not for me) so I was looking for ways to improve the output. The first obvious choice was to use ‘-fverbose-asm’, e.g. ‘gcc -S -fverbose-asm test.c’:

leal 4(%esp), %ecx #,
andl $-16, %esp #,
pushl -4(%ecx) #
pushl %ebp #
movl %esp, %ebp #,
pushl %ecx #
subl $16, %esp #,
movl $6, -8(%ebp) #, dummy
jmp .L2 #
subl $1, -8(%ebp) #, dummy
cmpl $0, -8(%ebp) #, dummy
jg .L3 #,
addl $16, %esp #,
popl %ecx #
popl %ebp #
leal -4(%ecx), %esp #,

This adds a few comments but I wasn’t happy with it. With a bit of googling I found a better way of doing it: ‘gcc -c -g -Wa,-ahl=test.s test.c’. This produces the following output in test.s:

12 main:
13 .LFB2:
14 .file 1 “test.c”
1:test.c **** int main(void)
2:test.c **** {
15 .loc 1 2 0
16 0000 8D4C2404 leal 4(%esp), %ecx
17 .LCFI0:
18 0004 83E4F0 andl $-16, %esp
19 0007 FF71FC pushl -4(%ecx)
20 .LCFI1:
21 000a 55 pushl %ebp
22 .LCFI2:
23 000b 89E5 movl %esp, %ebp
24 .LCFI3:
25 000d 51 pushl %ecx
26 .LCFI4:
27 000e 83EC10 subl $16, %esp
28 .LCFI5:
3:test.c **** int dummy;
4:test.c **** for( dummy = 6; dummy > 0; dummy– );
29 .loc 1 4 0
30 0011 C745F806 movl $6, -8(%ebp)
30 000000
31 0018 EB04 jmp .L2
32 .L3:
33 001a 836DF801 subl $1, -8(%ebp)
34 .L2:
35 001e 837DF800 cmpl $0, -8(%ebp)
36 0022 7FF6 jg .L3
5:test.c **** }
37 .loc 1 5 0
38 0024 83C410 addl $16, %esp
39 0027 59 popl %ecx
40 0028 5D popl %ebp
41 0029 8D61FC leal -4(%ecx), %esp
42 002c C3 ret

That looks quite nice already and for example you can now clearly see where the loop starts and ends – great!

An alternative way is to use ‘objdump’. This method only works if you have compiled the code with debug information, e.g. ‘gcc -g test.c -o test.o’. You can use ‘objdump -dS test.o’ to get some nice looking assembly output:

08048344 <main>:
int main(void)
8048344: 8d 4c 24 04 lea 0x4(%esp),%ecx
8048348: 83 e4 f0 and $0xfffffff0,%esp
804834b: ff 71 fc pushl -0x4(%ecx)
804834e: 55 push %ebp
804834f: 89 e5 mov %esp,%ebp
8048351: 51 push %ecx
8048352: 83 ec 10 sub $0x10,%esp
int dummy;
for( dummy = 6; dummy > 0; dummy– );
8048355: c7 45 f8 06 00 00 00 movl $0x6,-0x8(%ebp)
804835c: eb 04 jmp 8048362 <main+0x1e>
804835e: 83 6d f8 01 subl $0x1,-0x8(%ebp)
8048362: 83 7d f8 00 cmpl $0x0,-0x8(%ebp)
8048366: 7f f6 jg 804835e <main+0x1a>
8048368: 83 c4 10 add $0x10,%esp
804836b: 59 pop %ecx
804836c: 5d pop %ebp
804836d: 8d 61 fc lea -0x4(%ecx),%esp
8048370: c3 ret

Note: if you declared ‘int dummy’ in the sample code as volatile the resulting assembly code would look like this:

08048344 <main>:
int main(void)
8048344: 8d 4c 24 04 lea 0x4(%esp),%ecx
8048348: 83 e4 f0 and $0xfffffff0,%esp
804834b: ff 71 fc pushl -0x4(%ecx)
804834e: 55 push %ebp
804834f: 89 e5 mov %esp,%ebp
8048351: 51 push %ecx
8048352: 83 ec 10 sub $0x10,%esp
int volatile dummy;
for( dummy = 6; dummy > 0; dummy– );
8048355: c7 45 f8 06 00 00 00 movl $0x6,-0x8(%ebp)
804835c: eb 09 jmp 8048367 <main+0x23>
804835e: 8b 45 f8 mov -0x8(%ebp),%eax
8048361: 83 e8 01 sub $0x1,%eax
8048364: 89 45 f8 mov %eax,-0x8(%ebp)
8048367: 8b 45 f8 mov -0x8(%ebp),%eax
804836a: 85 c0 test %eax,%eax
804836c: 7f f0 jg 804835e <main+0x1a>
804836e: 83 c4 10 add $0x10,%esp
8048371: 59 pop %ecx
8048372: 5d pop %ebp
8048373: 8d 61 fc lea -0x4(%ecx),%esp
8048376: c3 ret

BTW, here’s a good article about the use of volatile.

Windows Vista and Epson EPL-5900L

My first post and I’m ranting about Vista! I have been recently approached by my mother-in-law (who loves Vista – particularly the Sidebar) as her beloved laser printer wouldn’t work with Vista. Checking Epson’s web site for a Vista driver all I could find was a comment stating that this printer wasn’t supported on Vista. Ah, the joys of Vista! So, I thought why not try to install the latest XP driver on Vista. However, this didn’t work. While the driver seemed to have installed correctly when I tried to print anything all I got were weird error messages (“ebapi not found …”). Mhm, a different approach was needed and here’s how I finally succeeded (I can’t guarantee that this will work for anyone else):

  1. If you have installed the XP driver on Vista – remove it!
  2. Go to http://esupport.epson-europe.com/ and select, “Laser Printers”, “EPL-5900L” and “Windows XP”
  3. Go to “Drivers & Software” (here’s a link to that site: http://tinyurl.com/5td3ko) and download “Silent Driver (3.3.2fl)” (which is a .zip file)
  4. Extract the zip file to wherever you like on your hard drive
  5. In Vista, go to the Control Panel->Printers, select “Add a printer”.
  6. Then select “Local Printer”, choose “USB” as your local printer port and when asked to select the printer make and model select “Have Disk”
  7. Browse to the directory where you extracted the driver in step 4 and select the EPT0252E.INF file
  8. If Windows then tells you that it already found a driver for this printer go for the Overwrite option
  9. Voilà! All that’s left to do is to print the test page to make sure the printer is working correctly

Update: This procedure appears not to work for the 64bit version of Windows Vista.  I’m also getting reports that this procedure works for Windows 7 too. I have no access to Windows 7 and therefore can’t verify that. You have been warned.

Another blog the world doesn't need