Piero V.

IMAP downloader

Two weeks ago, I needed to mass-download a few IMAP mailboxes before migrating them to another provider.

Gist contains many scripts to do so, and I tried one of them, but it did not work as I wanted. I wanted to download all the IMAP folders, not only Inbox.

Therefore, I wrote my version of that script 😄️.

I used imapclient instead of the built-in imaplib because it is more Pythonic and handles all the tedious conversions between bytes, strings, and other types.

The center of the script is the process function. It connects to an IMAP server, queries the list of folders, and downloads all the messages from each one but trash and spam (but notice that the comparison is case-sensitive!).

client.fetch downloads all the messages you provide to it, which caused an OOM in my case. Therefore, I split the list with the message IDs into chunks. I had to write the batches function because I was running on Python 3.11. From Python 3.12, you can use itertools.batched instead. … [Leggi il resto]

FTTH TIM con OpenWrt e con Debian

Un mese fa, ho finalmente messo da parte il rame per la mia connessione a Internet per passare alla fibra ottica.

Come ad ogni passaggio, certe cose cambiano, altre rimangono le stesse.

La configurazione, grosso modo, è rimasta invariata. Fin dai tempi dell’ADSL Alice, TIM richiede l’uso del protocollo PPPoE, senza validare però username e password. Quelli che erano VPI 8 e VCI 35, sono diventati l’id VLAN 835 per FTTC e FTTH.

E proprio questo uso di VLAN rende un po’ più difficile la configurazione delle connessioni TIM.

Dopo la morte del mio secondo TD-W8970, ero passato ad un router generico con un modem in bridge connesso alla porta WAN. La VLAN veniva gestita dal modem, un Technicolor TG789vac v2 con firmware di iiNet.

Invece, con l’ONT fornitomi da TIM, un Sercomm FG1000R, la VLAN deve essere impostata nel router.

OpenWrt

Sul mio Cudy WR2100 mi è bastato modificare /etc/config/network in questo modo: … [Leggi il resto]

Il mio allacciamento a Fibercop

Nelle puntate precedenti…

8 mesi fa ho scritto come Fibercop stia realizzando una rete in fibra ottica usando gli stessi punti di riferimento della rete in rame di Tim. Stanno installando nelle strade degli “armadi riparti linea ottici” vicino agli “armadi riparti linea” esistenti. Da essi partono diversi cavi in fibra verso i vari “PTE” (punto terminazione edificio) posti in corrispondenza delle chiostrine del rame.

Io abito in una via circondata dai campi e la rete telefonica è stata realizzata in maggior parte in via aerea. Nella via ci sono 4 chiostrine, 3 facenti riferimento all’armadio 7 e una invece collegata ad un altro armadio. Del primo gruppo, le prime due sono state raggiunte dagli scavi il 9 febbraio e, verso fine marzo, sono state installate anche le scatole per i collegamenti della fibra. In corrispondenza della terza chiostrina, l’ultima di quel ramo di rete, non è stato fatto niente… e quella è proprio la chiostrina a cui io sono collegato.

Mentre aspettavo di vedere novità, mi sono iscritto al servizio di Fibercop per ricevere una email su quando la copertura risulti completa. … [Leggi il resto]

Torbutton has retired!

Once upon a time, the Tor Browser Bundle was an actual bundle. It included Firefox, the Tor daemon, and Torbutton, the extension to turn on and off the Tor mode in the browser.

This toggle model was not great and extremely confusing to some users. This and other problems led to the creation of Tor Browser: this article contains more details about this story.

From a technical point of view, Torbutton did not really go away. The visible button disappeared, but much of the related code remained.

Part of the state isolation code was not necessary anymore because Tor Browser always runs in private browsing mode or was dropped over the years thanks to Firefox improvements and the Tor Uplift initiative. However, the circuit display, the first-party domain circuit isolation, and other parts of the existing code were still needed. As a result, Torbutton continued to live for many years as a Tor Browser-only built-in extension on its separate repository and included in the browser with git submodules (even though the browser was non-functional without it). New patches and functionalities were written in the Firefox code that constitutes Tor Browser, and the Torbutton code was changed only to fix existing bugs or to keep it working in new versions of Firefox. … [Leggi il resto]

Alpine Linux on the Orange Pi Zero

Motivation

A few years ago, I bought an Orange Pi Zero to run a Telegram bot I use to open and close my garage door.

It worked very well for several years. Then, when Debian bookworm became stable, I decided to reinstall the system, and the trouble began.

After more than one month of frequent crashes, I first tried to upgrade the kernel. However, apt was unusable, and the system reinstallation was my only choice. So, I decided to also check other distributions out.

First, I tried with OpenWrt. It was a good setup, except I could not use GPIO through /dev/mem. This was a big problem because memory-GPIO is more versatile and performant.

So, I decided to also try Alpine Linux. Before this adventure, I had used this distribution only for containers, but I felt this could also be a case in which it can shine. But the effort it took me to get it working as I wanted reminded me of the old days 😅️. It also made me appreciate how easy setting up Debian is these days. … [Leggi il resto]