SCHAPPY — 3. September 2021, 12:07

Solved: opendmarc-import stops working after Debian buster upgrade

Issue: After upgrade to Debian buster opendmarc-import reports errors during import of the history file. Even a re-creation of the database schema did not solve the issue, requests table remains empty.

Reason: Debian buster bundles a beta version, which is using uninitialized variables, e.g. $request_id.

Solution: Please apply the attached patch file, which was derived from the latest git repository code of openmarc-import to solve the issue. Please also check that you use the lastest database schema. After patching, your imports should work like charm again.

cp /usr/sbin/opendmarc-import /tmp/opendmarc-import.sav
sudo patch /usr/bin/opendmarc-import 210820_opendmarc-debian-buster.patch


SCHAPPY — 22. January 2020, 9:43

Solved: /etc/cron.daily/spamassassin: Wide character in print at /usr/bin/sa-compile line 433

Issue: When using spamassassin 3.4.2 in combination with Heinlein filter rules, you might encounter once a day  messages from running the spamassassin cronjob as follows.
Wide character in print at /usr/bin/sa-compile line 433, <$fh> line 2757.
Wide character in print at /usr/bin/sa-compile line 433, <$fh> line 3260.

Reason: Some of the Heinlein rules in contain UTF-8 character, which are currently not handled /usr/bin/sa-compile command. You can find the rules at /var/lib/spamassassin/3.004002/spamassassin_heinlein-support_de/ for investigation. The warning is triggered by the fixup_re function in package Mail::SpamAssassin::Plugin::BodyRuleBaseExtractor, which replaces encoded and escaped utf-8 characters by their original character if the output stream is not utf-8 compatible.

Solution: Changing the output stream encoding to UTF-8 in sa-compile will prevent the warning, because UTF-8 characters outside of ASCII range can be be sent to the stream correctly. For your convenience,  I attached the patch file sa-compile.patch.

cp /usr/bin/sa-compile /tmp/
sudo patch /usr/bin/sa-compile sa-compile.patch

You can verify the successful patch, by running sa-compile as spamassassin user, e.g. debian-spamd. It should no longer output the warning.

SCHAPPY — 8. July 2019, 12:49

Solved: Debian 10 (buster): Upgrade MariaDB from version 10.1 to version 10.3

Issue: After upgrading Debian, you will have to remove the old version of MariaDB and install the new one (semi-manual). After installation of MariaDB 10.3 it fails to start and mysql.error log does not contain helpful hints.

/etc/init.d/mysql start
[....] Starting mysql (via systemctl): mysql.serviceJob for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.

Solution: The installation script of MariaDB assumes the systemd service to be disabled, but it might be active from older installation.

Try /etc/init.d/mysql status and investigate output. If it is similar to mine (as printed below), go on…

mariadb.service - MariaDB 10.3.15 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2019-07-08 14:37:46 CEST; 1min 25s ago
Docs: man:mysqld(8)
Process: 5002 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=127)
Main PID: 22611 (code=exited, status=0/SUCCESS)

Let us try to disable the old systemd service as follows:

sudo systemctl disable mysql
Synchronizing state of mysql.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable mysql
insserv: warning: current start runlevel(s) (empty) of script `mysql' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `mysql' overrides LSB defaults (0 1 6).
Removed /etc/systemd/system/
Removed /etc/systemd/system/mysqld.service.
Removed /etc/systemd/system/mysql.service.

Now try to start the service:
/etc/init.d/mysql start
[ ok ] Starting mysql (via systemctl): mysql.service.

SCHAPPY — 22. May 2019, 11:29

How to recruit good experts?

While investigating some HTTP header fields, I stumbled across the “X-hacker” containing a job posting. Inspiring idea.

SCHAPPY — 18. June 2018, 20:00

Generic alternative for WMF2EPS in Windows 10

With Windows 10 WMF2EPS was no longer working for me due to some strange errors installing the printer driver. Therefore, I came up with the following alternative using more or less native Windows essentials.

  1. Install any PS printer, e.g. Universal HP PS Driver, and name it “EPS printer”.
  2. Configure printer to print to file (menu port) and to use encapsulated PS (menu advanced)
  3. Print any file to your “EPS printer” and a save as box should occur to store your output, e.g. output.eps
  4. Use ps2eps with your output.eps to fix bounding box issues and have a optimized output.
SCHAPPY — 30. January 2018, 18:21

[SOLVED] Samsung TV channel list cannot be imported due to invalid country code (UExxD6xxx) 6 Series


Trying to import a channel list to a Samsung TV (re-imported) from other country. In my case, I tried to import the German channel list to a UE46D6540 non-German version. Copying the SCM file to an USB stick and trying to import it to the TV results in error message indicating that the corresponding country is invalid. However, in the country settings menu of Samsung TV I can only select some East European counties as well as OTHERS, but not Germany at all. Depending on the country version of your TV it might show up other countries, however not your preferred one in the channel settings.


Please find here a current German channel list (Berlin region) new_channel_list_UE46D6500_1101.scm for a D series TV last updates Jan 2018 for download. After downloading change the suffix to .scm, copy it to an USB stick and import it to your Samsung TV.

If you want to create your own, please follow the following steps.

    • Select OTHERS (OTH) as country in channel settings prior to continue as the remaining instructions build on this.
    • Download your current channel list for country OTHERS (A), e.g. channel_list_UE46D6500_1101.scm, from the TV to an USB stick.
    • Download your preferred channel list (B), e.g. samsung_1101.scm, either from another Samsung TV or from an online service, e.g. from
    • Copy both files to your Desktop and handle them as zipped archive files, e.g. rename either of the files from .scm to and unzip them
  • You should see a file directory as follows

  • The country information is stored in the CloneInfo file. Therefore, you have to copy your original CloneInfo from A to the directory of your desired channel list B.
  • Alternatively, you can also edit the existing CloneInfo using vim, you will find something like this: UED^@UE40D6200^@^@^@^...; the first three letters indicate the country code in inverse order, here it is UED -> DEU for Germany. You want to change it to HTO indicating OTHERS as we selected this as country at the beginning.
  • Now zip the content of the directory of B to new_samsung_1101.scm and copy the file to your USB stick and proceed to import it to your TV.

Finally, the TV will indicate a success notice and after rebooting the TV you should have your desired channel list in action. Hope this helps, have fun!

SCHAPPY — 30. November 2016, 17:24

RAM Disk for Mac OS X Sierra (10.12.) and High Sierra (10.13.)

As Apple announced that StartupItems are not longer supported, please find attached an updated version of the RamDisk script of Philipp Klaus making use of the launchctl.


  • Download the code and store it in a file, e.g. ~/
  • Make the file executable, e.g. chmod +x ~/
  • Execute the file to install the launch daemon (/Library/LaunchDaemons/de.schappy.ramdisk.plist) and the RamFS script (/usr/local/bin/


  • sudo launchctl unload -w /Library/LaunchDaemons/de.schappy.ramdisk.plist
  • Optional remove launch daemon and script (paths see above)

Code of


# +----------------------------------------------------------------------+
# | |
# | Set up Mac OS X >10.12 to store temp folders on RAM disk. |
# | |
# | By Matthieu Schapranow Nov 11, 2017 |
# | |
# | Originally by Ricardo Gameiro
# | Changes by Daniel Jenkins |
# |
# | and Philipp Klaus
# | |
# +----------------------------------------------------------------------+

cat < < "EOF" | sudo tee /usr/local/bin/ > /dev/null
# Create a RAM disk with same perms as mountpoint

RAMDisk() {
echo "Creating RamFS for $mntpt"
# Create the RAM disk.
dev=`hdik -drivekey system-image=yes -nomount ram://$rdsize`
# Successfull creation...
if [ $? -eq 0 ] ; then
# Create HFS on the RAM volume.
newfs_hfs $dev
# Store permissions from old mount point.
eval `/usr/bin/stat -s $mntpt`
# Mount the RAM disk to the target mount point.
mount -t hfs -o union -o nobrowse $dev $mntpt
# Restore permissions like they were on old volume.
chown $st_uid:$st_gid $mntpt
chmod $st_mode $mntpt

# Test for arguments.
if [ -z $1 ]; then
echo "Usage: $0 [start|stop|restart] "
exit 1

# Source the common setup functions for startup scripts
test -r /etc/rc.common || exit 1
. /etc/rc.common

StartService () {
ConsoleMessage "Starting RamFS disks..."
RAMDisk /private/tmp 512
RAMDisk /var/run 128
#RAMDisk /var/db 1024
#mkdir -m 1777 /var/db/mds
StopService () {
ConsoleMessage "Stopping RamFS disks, nothing will be done here..."
diskutil unmount /private/tmp /private/var/run
diskutil unmount /private/var/run

RestartService () {
ConsoleMessage "Restarting RamFS disks, nothing will be done here..."

RunService "$1"
sudo chown root:wheel /usr/local/bin/
sudo chmod u+x,g+x,o+x /usr/local/bin/

sudo launchctl unload -w /Library/LaunchDaemons/de.schappy.ramdisk.plist
cat < < EOF | sudo tee /Library/LaunchDaemons/de.schappy.ramdisk.plist > /dev/null
< ?xml version="1.0" encoding="UTF-8"?>
< !DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">



sudo chown root:wheel /Library/LaunchDaemons/de.schappy.ramdisk.plist
sudo chmod 644 /Library/LaunchDaemons/de.schappy.ramdisk.plist
sudo launchctl load -w /Library/LaunchDaemons/de.schappy.ramdisk.plist

SCHAPPY — 13. July 2015, 12:15

[Fixed] Photos from are not synced through iTunes

Issue: After migration from to in Mac OS X Yosemite 10.10.4, photos are no longer synced to mobile Apple devices, e.g. iPod, iPad, iPhone, through iTunes 12.2.0.


  1. Quit any running iTunes instances
  2. Open (look into /Applications/
  3. Quit iPhoto, which results in updating the photo library
  4. Open
  5. Preferences -> General: Click on the button “Use as System Photo Library” if highlighted
  6. Close
  7. Open iTunes and navigate to Sync Photos: the options to sync from and now appears in the drop-down menu as usual


SCHAPPY — 21. May 2015, 11:14

[FIXED] After dist-upgrade from wheezy to jessie php scripts are not executed anymore

Situation: I upgraded a debian distribution wheezy to jessie with no significant issues. After upgrading I experienced that some of the already installed and formerly working php scripts stopped working. Content of some included php scripts, e.g. wordpress configuration, were printed as HTML content instead of being evaluated.

Reason: The updated php.ini disables short open tags by default. Check your affected php files whether they use the long php open tags [code]<?php[/code] instead of (my preferred) short open tags [code]<?[/code].

Solution: Either you replace all short php open tags by long php open tags or you can enable the use of short php open tags system-wide. The latter was more comfortable in my case, as I do not know how many files would be affected. To do so, check the installed php.ini used by your apache installation (typically located at /etc/apache2/php.ini) for [code]short_open_tag = On[/code] and restart your apache server [code]apache2ctrl restart[/code].

SCHAPPY — 17. January 2014, 13:46

[FIXED] Google Drive Update Version 1.13.5782.0599 get stuck on Mac OSX Maverick 10.9.2

Google Drive Update Message on Mac OSX 10.9.2

Problem: Google Drive asks to perform a update. When clicking update there is no prompt or action.


  1. Quit running Google Drive processes
  2. Open and execute the following command (replace 10.9.2 by your currently running OSX version, you can find it in the “About this Mac” menu):
    /Applications/Google\\ Drive --overlays_enabled_finder_versions="10.9.2"
  3. Google Drive will launch and ask for permission to complete updates. Click the corresponding entry in the Google Drive menu when clicking its menu bar icon. If asked for your credentials, please enter them to finish the update process. Google Drive will automatically close
  4. Stop debug output by STRG+C in and feel free to close
  5. Next time you run Google Drive from the Applications folder no more warning will occur