iRedMail and Dovecot fulltext search

I already have quite a large mailbox and I started running into timeout issues when searching in Roundcube mail. AI gave me some instructions for installing the dovecot-fts-xapian plugin, but I kept encountering various errors:

Warning: FTS Xapian: missing configuration - Using default values
Warning: FTS Xapian: Memory too low (text) 'std::bad_alloc'

The problem was incomplete configuration, but the AI didn’t know what to do. I found the correct instructions on GitHub.

(...)
protocols = imap pop3 sieve lmtp

mail_plugins = (...) fts fts_xapian

plugin {
    fts = xapian
    fts_xapian = verbose=0

    fts_autoindex = yes
    fts_enforced = yes

    (...)
}

service indexer-worker {
    # Increase vsz_limit to 2GB or above.
    # Or 0 if you have rather large memory usable on your server, which is preferred for performance)
    vsz_limit = 2G
    # This one must be 0
    process_limit = 0
}
(...)

Streaming music from Nextcloud

My music library is something I listen to daily, mainly while working. Years ago, I started with ownCloud Music, but I struggled with rating songs and then filtering them into playlists. I tried various players, whether based on Ampache or Subsonic, but none of them fully suited me.

Eventually, I ended up using Ample, but I ran into memory issues in the browser — during long playback sessions, the browser would start to lag and had trouble handling memory.

In the end, I created my own fork of Ample.fm, where I reworked many parts and resolved the memory issues. Another challenge was having a player for iOS, since background playback via HTML5 doesn’t work very well there — after some time, iOS simply stops the playback. So I also built my own native iOS app that works as a wrapper around Ample.fm.

So my recommendation would be:

Upgrade Debian 10 to Debian 11

I use those steps on LXC virtual in Proxmox:

  1. Make sure all packages are upgraded: apt update && apt upgrade
  2. Backup container in Proxmox
  3. Edit release version: sed -i'.bak' 's/buster/bullseye/g' /etc/apt/sources.list
  4. Fix security distribution name: sed -i 's|bullseye/updates|bullseye-security|g' /etc/apt/sources.list
  5. Update other configuration files in /etc/apt/sources.list.d/ appropriately
  6. Update packages index: apt update
  7. Do minimal system upgrade: apt upgrade --without-new-pkgs
  8. Do full upgrade: apt full-upgrade
  9. Restart the system: reboot

tar

Backup

See Ubuntu Help for details.

# Full root file system backup
tar -cvpzf backup.tar.gz --exclude=/backup.tar.gz --one-file-system /

# Backup remote file system (SSH)
ssh root@srv.local -p 22 "tar -cvpz --one-file-system /" > srv-backup.tar.gz

# Restore
tar -xvpzf /path/to/backup.tar.gz -C /media/whatever --numeric-owner

Other useful commands

# Remove compression from tar.gz
gzip -dk archive.tar.gz

# Compress directory
tar -zcvf myfolder.tar.gz myfolder

# Read gzipped log
zcat error.log.2.gz

Logoff desktop shortcut for all users on Windows Server

$WshShell = New-Object -comObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut("$env:PUBLIC\Desktop\Logoff.lnk")
$Shortcut.TargetPath = "C:\Windows\System32\shutdown.exe"
$Shortcut.Arguments = "/l"
$Shortcut.IconLocation = "C:\Windows\System32\shell32.dll,44"
$Shortcut.Save()

ImageMagic

# Image from PDF
magick convert -density 300 -rotate 90 -compress lossless input.pdf[0] output.jpg

# Icon from multiple images
magick convert image1.png image2.png image3.png favicon.ico

# Create favicon.ico with multiple sizes
magick convert favicon.png -define icon:auto-resize=96,64,48,32,16 favicon.ico

# Convert multiple images to jpeg with reduces size
magick mogrify -path out -format jpg -quality 80 -resize "1200x1200>" *.heic

postfix

# Show current mail queue
mailq

# Send messages in queue
postqueue -f

# Delete message from queue
postsuper -d MSGID

# Print message from queue
postcat -q MSGID

# Show mail statistics
cat /var/log/mail.log | pflogsumm

# Rebuild aliases
newaliases

journalctl

# Follow postfix mail log with 40 records loaded on start
journalctl -f -u postfix@-.service -n 40

# Get one day old records
journalctl -u postfix@-.service --since "1 days ago"

# Get first 100 records since
journalctl --since "2026-03-27 07:00:00" --no-pager | head -100

du

# Find files / directories bigger than 1GB
du -a --threshold=1G ./

# Top 20 directories by size
du -a / --exclude=/proc --exclude=/sys --exclude=/dev --exclude=/lost+found | sort -n -r | head -n 20

# Get directory size recursively
du -hs ./