Code

Code snippets, tech howto’s and scripts

Bounce the macOS Terminal icon from a script

How to bounce the Terminal icon in the Dock by using a script command. The bounce is caused by the ASCII bell control code, number 7. By echoing the \a special character you send an alert to the terminal window.

Dynamic Node.js versions in Github Actions matrix

How to create a Github action workflow with a dynamically generated build matrix. For example to CI test Node.js packages without manually keeping up with the Node versions.

Plesk: Fix OCSP stapling warning for nginx

Problem nginx: [warn] “ssl_stapling” ignored, issuer certificate not found for certificate “/usr/local/psa/var/certificates/scwqKDI92” If you see a warning like this in your nginx logs it means that the certificate CA is not in the trust list. When you have Plesk installed the CA chains are being updated, but not included in the nginx config by default. …

Plesk: Fix OCSP stapling warning for nginx Read More »

Bind DNS: override RBL TTL

When you have spamfiltering using external blocklists you may quickly run out of credits because those lists set an absurd low TTL in the DNS responses. The common Bind nameserver does not allow you to set the minimum cache TTL and for good reasons, because normally you should never override that caching time out. It …

Bind DNS: override RBL TTL Read More »

Plesk: Enable SFTP access for additional FTP users

By default only the main user of a domain can SFTP into a domain. Plesk does allow to add FTP users but for some reason not for access over encrypted SSH. That makes the whole feature broken given today’s security standards that don’t allow plain FTP access anymore. This guide helps you to properly set up the new user for secure access over SFTP.

Optimize ccze log colorizer

Even though CCZE is very stable it is also very slow and may even look broken out of the box with the default configuration. Here I explain how to work around the two most important issues. You will love ccze for all your log colorizing.

Plesk: Add webmaster addresses to all domains

Here is a shell script that will iterate through all your Plesk domains to quickly add email addresses in bulk without going through each domain’s settings yourself. IntroScriptAutomation with events Intro This specific script adds a webmaster email address with standard aliases like postmaster@ and abuse@, but without an actual mailbox. The messages are forwarded …

Plesk: Add webmaster addresses to all domains Read More »

Plesk: System/cron mails are not DKIM signed

When you have enabled DKIM signing of outgoing mails on your Plesk server, you may have trouble delivering system messages to certain providers. Especially Outlook/Live and ProtonMail can send those messages straight to the spam folder.