Posts for: #Linux

Email ports

A list of email-server relevant ports

For future reference ;)

SMTP

PortDescription
25SMTP relay; usually plain text, can be TLS enc.
2525Alternative to 25 with possible TLS enc.
465Implicit SSL, no longer accepted standard
587IANA reg. as secure SMTP, req. TLS conn.

POP3

PortDescription
110Default, no enc.
995Secure POP3 with TLS or SSL

IMAP

PortDescription
143Default, no enc.
993Secure IMAP with TLS or SSL
[Read more]

Banana Pi installation

Banana Pi in 2024?

Recently I needed a quick and easy way to mount an external disk with an ntfs file system and share it to the network.

So whatcha gonna do? Connect it to a server, mount it, create a samba share for it - done.

So I thought of my long forgotten Banana Pi M1 as it would an absolutely perfect little machine for the job. I am planning to turn it off most of the time, boot it up by wake-on-lan and auto-mount and share the external disk, which automatically goes into standby when nothing is happening with it. The perfect scenario.

[Read more]

Mount an external NTFS disk in FreeBSD / TrueNAS

When mounting an (external) NTFS disk in FreeBSD, especially in TrueNAS right here, with write permissions (777 actually) you would do the following, which can also be found in the FreeBSD manual

# list currently attachded disks
geom disk list
# load fusefs
kldload fusefs
# or install, if not installed - then load like shown above
pkg install fusefs-ntfs
# make your mount directory for your disk, e.g.
mkdir /mnt/usb
# show the partitions on the disk, decide which one to mount, e.g. the first, 'da0s1'
gpart show da0
# ...and actually mount it, use ntfs-3g instead of 'mount'
ntfs-3g /dev/da0s1 /mnt/usb/
# and/or add an fstab entry for automagic mounting after boot
# /dev/da0s1  /mnt/usb	ntfs mountprog=/usr/local/bin/ntfs-3g,noauto,rw  0 0
# and unmount if you are done
umount /mnt/usb
[Read more]

Hands Off Updating Docker Containers

In this article I want to paste a code snippet which is checking it’s filtered subfolders for docker-compose files and pulls and ups automagically.

Here it is!

#!/bin/bash

# our docker base folder
DOCKER_BASE_DIR="/home/user/docker"
# folders to exclude from udpate
DIRS_TO_EXCLUDE=("code" "snacklish" "nginx-proxy" "psono")
# docker-compose binary location
DC=$(which docker-compose)

cd ${DOCKER_BASE_DIR}
for D in *; do
    # if is directory and not excluded
    if ([ -d "${D}" ] && [[ ! " ${DIRS_TO_EXCLUDE[@]} " =~ " ${D} " ]]); then
        cd ${D}
        echo "I am in $(pwd)"
        if [ -f "./docker-compose.yaml" ]; then
            echo "I found a docker-compose.yaml, updating ..."
            ${DC} pull && ${DC} up -d && cd ..
        else
            echo "No docker-compose.yaml found, stepping back"
            cd ..
        fi
    fi
done

Oriented on Selenium acceptance tests, I have designed the output to be as readable and as debuggable as possible.

[Read more]