ProtonMail : file “catch all” messages into their own folder

ProtonMail’s Pro and Visionary plans let you configure a “catch all” address. All emails sent to the domain will end up in that address’s account. However, they all end up in your account’s inbox unless you set up a filter to file them into a special folder as described below.

If you don’t know what a “catch all” is, please see ProtonMail’s official doc on the subject : https://protonmail.com/support/knowledge-base/catch-all/

  1. Create an address dedicated to catchall on you custom domain. (see ProtonMail doc) For example “catchall@domain.tld”.
  2. Set the new address to be the catchall address.
    Go to the settings for your account and to the “Domains” section. Click the “catch-all” checkbox next to the address you created.
  3. Create a folder for the caught messages. For example “catchall”.
  4. Add a sieve filter to file the messages.
    1. Go to the settings for you account and to the “Filters” section.
    2. Add a Sieve filter by clicking the “Add Sieve filter” button.
    3. Give you filter a name, then replace the code with the one provided below.
    4. Don’t forget to “replace catchall@mydomain.tld” with the actual email address you created earlier, and “myfolder” by the name of the actual folder you created.
    5. Save the filter.
require ["include", "environment", "variables", "relational", "comparator-i;ascii-numeric", "spamtest", "fileinto"];

# Generated: Do not run this script on spam messages
if allof (environment :matches "vnd.proton.spam-threshold" "*", 
spamtest :value "ge" :comparator "i;ascii-numeric" "${1}")
{
    return;
}

# File catchall messages into folder
if header:is "Delivered-To" "catchall@mydomain.tld" {
  fileinto "myfolder";
}

If you want to learn more about writing your Sieve filters scripts in ProtonMail, check out the docs.

ProtonMail : mark spam as read automatically

ProtonMail is a geat secure and private email provider. They offer end-to-end encryption and their servers are located in privacy-minded Switzerland. If you want to know more about them, head over to Wikipedia.

By default, ProtonMail is pretty good at detecting junk mail and filing it into the “Spam” folder, but it is not marked as “read”. If you’d rather have spam be marked as read automatically, here’s how to do it.

1. Login into your account and head over to the settings.

2. Choose “Filters”, then “Add Sieve Filter”

3. Type in a name for the filter (e.g. “Mark Spam as read”) and replace the contents of the “Sieve Script” field with the following code :

require ["include", "environment", "variables", "relational", "comparator-i;ascii-numeric", "spamtest", "imap4flags"];

if allof (environment :matches "vnd.proton.spam-threshold" "*", 
spamtest :value "ge" :comparator "i;ascii-numeric" "${1}")
{
  addflag "\\Seen";  
  return;
}

4. Click “Save”, and voilà!

If you want to learn more about writing your Sieve filters scripts in ProtonMail, check out the docs.

Capture sound card output with darkice on Ubuntu 20.04

Darkice is a utility which lets you capture audio from your desktop and stream it to an Icecast2 server.

On most current Linux distributions such as Ubuntu 20.04, the default configuration does not capture the audio from the sound card properly. Here’s what worked for me and once I knew what to do it was quite easy !

1- In your darkice.cfg file, set the input device to “default” :

[input]
device = default

2- Install the package pavucontrol-qt

sudo apt install pavucontrol-qt

3- Launch pavucontrol-qt and go to the “Recording” tab. You should see controls for a “ALSA plugin [darkice]” device, as in the screenshot below.

If you don’t see these controls, make sure darkice is running.

4- In the “from” dropdown box, select the sound device you want to capture from.

5- And voilà ! This should do it and you should now be able to hear your audio on your icecast stream.

WordPress : redirect all traffic to HTTPS

You got a certificate and configured your server/hosting to serve pages on HTTPS. You’re almost there !

Here is how to make sure that all visitors use HTTPS now.

1. Configure WordPress to generate HTTPS URLs

Go to your WordPress administration interface and choose “Settings” in the menu. Make sure that “WordPress address (URL)” and “Site address (URL)” begin with “https://”.
Save the changes.

This settings ensures WordPress generates HTTPS URLs when displaying links to your pages, blog posts embedded images, etc.

2. Redirect all traffic to HTTPS

We also want to make sure that all incoming traffic ends up using HTTPS. For this we need to edit the “.htaccess” file which can be found at the root directory of your WordPress installation.

If you do not know how to access the files on your server, please ask your provider !

Edit the file and add these lines at the beginning of the file, before the “## BEGIN WORDPRESS” line :

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]

Save the changes, and voilà!

Gnome Mines custom themes

This custom theme plays well with dark gtk themes and is easier to the eye!

Gnome Mines is a minesweeper clone bundled with the Gnome Desktop for GNU/Linux. While the game is addicting as always, the default themes can be a little hard on the eyes.

The problem with Gnome mines default themes

Gnome-Mines default appearance with a light gtk theme
Gnome-Mines default appearance with a dark GTK theme

In the screenshots above, the large border between the tiles can cause some people to experience visual artifacts due to a grid illusion. The default themes also use the window background color to fill the space between the tiles, so changing your desktop environment’s GTK theme can drastically change the appearance of your minefield!

Happily we can fix this easily with a custom theme.

A theme easier to the eye

Narrower gaps between the tiles
Gnome-Minefield colors do not change with GTK theme

I slightly tweaked the default theme to have narrower gaps between the tiles, thus greatly reducing the grid illusion effect. I also changed the colors to be independent from the GTK theme.

How to install this custom theme

  1. Download the files : smooth.zip
  2. Extract the zip file to your computer, for example in ~/.themes/gnome-mines
  3. In a terminal, execute the following command :
    gsettings set org.gnome.Mines theme '/path/to/folder/smooth/'
    Don’t forget to change the path to match the location of the theme files. The folder specified in the command should be the one containing the svg and css files.
  4. Start Gnome Mines, et voilà !

Please note: if you change the theme via the theme selector in Gnome Mines, you will have to execute the command above again to go back to the custom theme.