Brussels Airlines mails go to Spam folder

I understand that Brussels Airlines has more on its shoulders than properly configured SPF records and decent email content, but still, WTF?

From: Brussels Airlines To: Alexander Mikhailian Subject: Booking confirmation[-- Attachment #1 --][-- Type: text/plain, Encoding: 8bit, Size: 1.8K --]Spam detection software, running on the system "", hasidentified this incoming email as possible spam.  The original messagehas been attached to this so you can view it (if it isn't spam) or labelsimilar future email.  If you have any questions, seethe administrator of that system for details.Content preview:  Your reservation - A000000000 Booking confirmation Your booking   details Booking reference: YYYY Main contact: Mr Alexander Mikhailian E-mail:   XXXXXXXXX  Mobile: 32-0000000000000 [...]Content analysis details:   (7.1 points, 5.0 required) pts rule name              description---- ---------------------- -------------------------------------------------- 3.5 BAYES_99               BODY: Bayes spam probability is 99 to 100%                            [score: 1.0000] 0.7 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail) 0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was blocked.                            See                                               for more information.                            [URIs:] 0.2 BAYES_999              BODY: Bayes spam probability is 99.9 to 100%                            [score: 1.0000] 0.0 HTML_MESSAGE           BODY: HTML included in message 0.7 MIME_HTML_ONLY         BODY: Message only has text/html MIME parts 0.0 FILL_THIS_FORM         Fill in a form with personal information 2.0 FILL_THIS_FORM_LONG    Fill in a form with personal information

A programmer's joke

A CS student shows his lab assignment to the professor. The code works and even produces the correct output, but the professor mutters that the code is not OK:

— You have to choose variable names wisely. Names like i, j, foo and bar make your code unreadable. By next time, please use long, mnemonic variable names.

A few weeks later, the same student completes a new assignment and brings it to the professor. This time, his code is full of long_mnemonic_variable_i, long_mnemonic_variable_j, long_mneminic_variable_foo and long_mnemonic_variable_bar.

SWIFT vs. the progress

Just for the record and because I've been asked about this a couple of times, already:


  • SWIFT became redundant after Diffie-Hellman key exchange protocol was described in 1976.
  • Euroclear became redundant when blockchain technology came out in 2009.

Software Archeology with git

A couple of useful git commands for styding big git repositories:

Rank contributors by contributed lines of code in HEAD

git grep --cached -zIle '' |\     xargs -0n1 git blame -e |\    sed  -n 's/^.*(<\([a-zA-Z.]*\)@.*/\1/p' |\    sort|uniq -c|sort -rn >authors-by-line.txt

sort branches by last modified date in the remote repository

git for-each-ref --sort=-committerdate \    --format='%(committerdate:short)%(authorname)%(refname:short)' refs/remotes >branches-by-date.txt

How Lenovo, Dell, HP and Fujitsu fucked with their most lucrative clients for 1½ years

It's not a coincidence that notebook docking stations are being sold only with high-end laptops. My Dell e7740 costs over 2000 €. When I bought it in January 2014, I couldn't imagine I'll have trouble making it work under Linux. After all, it was all-intel, already well-supported hardware. The trouble came from a usually dumb piece of hardware: the docking station. I run two 1920x1200 screens in portrait mode, but this freaking docking station"intelligently" merged the two screens into a virtual 3840x1200 screen and presented just that to the notebook.

The bug-o-feature responsible for this is called Displayport Multi-Stream Transport and it was intended to drive multiple displays via one cable using daisy-chaining. When first docking stations with MST support appeared by end 2013, none was prepared for it. It took well over a year before MST support landed in mainline 3.17 kernel. And it will take another year until all major distributions move to 3.17 and past it.

Red Hat itself found it out only when they run into the problem, and it took 6 months before David Airlie came up with a patch to fix this hardware bug. Check out this talk for a good overview of the story.

The European Commission repeats the mistake of the '09 Microsoft deal

We've already seen it in 2009. The European Commission could have built an exemplary anti-trust case against Microsoft for forcing manufacturers to bundle its operating system with the computers. Instead, it targeted a smaller issue of tying the web browser to the operating system. Since then, Microsoft lost the browser war on technical grounds, and Internet Explorer became known as a tool to download Google Chrome on a fresh computer.

The only real impact of the 2009 Commission's decision on consumers was negative. A sudden drop in the quality of email rendering in Microsoft Outlook 2010 and all the later versions comes from the fact that Microsoft teared off the Internet Explorer's component from Microsoft Office and replaced it with a much older and less capable library developed in the early 80s and initially used to display RTF documents. So, whenever you see bulky fonts and ugly formatting in your Microsoft Outlook, don't blame the sender, blame the European Commission.

This old story repeats with Google. They took on an irrelevant issue of Google Shopping search results, instead of picking one of the well-publicized issues of:

* abuse of control over the Android ecosystem
* Gmail interoperability with small independent mail servers
* Gtalk and Google Hangouts interoperability with third-party XMPP servers
* Google Single Sign-On interoperability with regards to industry standards

…the list can go on and on.

Convert a git repository from submodules to subtrees

Git submodules and git subrees are well explained in the git-scm book.

Here's a small script that automatically converts the former to the later:

cat .gitmodules |while read ido  if [[ $i == \[submodule* ]]; then    mpath=$(echo $i | cut -d\" -f2)    read i; read i;    murl=$(echo $i|cut -d\  -f3)    mcommit=`eval "git submodule status ${mpath} |cut -d\  -f2"`    mname=$(basename $mpath)    echo -e "$name\t$mpath\t$murl\t$mcommit"    git submodule deinit $mpath    git rm -r --cached $mpath    rm -rf $mpath    git remote add $mname $murl    git fetch $mname    git branch _$mname $mcommit    git read-tree --prefix=$mpath/ -u _$mnamefidonegit rm .gitmodules

Notes on setting up Debian with ChromeOS kernel on a SD card plugged into Samsung ARM Chromebook

Two main sources of my inspiration were this post by Daniel P. Berrangé and this very detailed HOWTO on Debian User Forums.

There's also a great, albeit a bit stripped down rootfs from Vassilis Laganakos for those who don't want to bother using debootstrap.

Here's my script to run in root shell on ChromeOS to put the signed kernel onto the SD card:

echo "console=tty1 debug verbose root=/dev/mmcblk1p3 rootwait rw lsm.module_locking=0" > /tmp/configdd if=/dev/mmcblk0p2 of=/tmp/oldblobvbutil_kernel --repack /tmp/newkern --keyblock /usr/share/vboot/devkeys/kernel.keyblock --version 1 \  --signprivate /usr/share/vboot/devkeys/kernel_data_key.vbprivk --config=/tmp/config --oldblob /tmp/oldblobdd if=/tmp/newkern of=/dev/mmcblk1p1dd if=/tmp/newkern of=/dev/mmcblk1p2cgpt add -i 1 -S 1 -T 5 -P 10 -l KERN-A /dev/mmcblk1cgpt add -i 2 -S 1 -T 5 -P 5 -l KERN-B /dev/mmcblk1

Note the use of --oldblob option -- newer ChromeOS does now mount /boot anymore, but HOWTOs out there still suggest to point to the kernel using --vmlinuz . Also, lsm.module_locking=0 is important. Without it, you won't be able to load kernel modules in Debian.

A small firewall of China

There's been quite a few spam{bots,turks} lately passing through Drupal Captcha , reCAPTHA, Honeypot module… After a bit of research, I decided to block China from accessing my site. It turned out to be easy:

# install geoip filter into iptablesapt-get install xtables-addons-common# download the existing geoip database/usr/lib/xtables-addons/xt_geoip_dl# set up csv parser in perlapt-get install libtext-csv-xs-perl# create a directory for geoip filter's databasemkdir /usr/share/xt_geoip# build the database/usr/lib/xtables-addons/xt_geoip_build  -D /usr/share/xt_geoip  *.csv# load the geoip filter modulemodprobe xt_geoip# block Chinaiptables -A INPUT -m geoip --src-cc CN -j DROP


P.S. Next in sight is US. US an CH account for 97% of Drupal spam.