Python Multithreading ThreadPool with arguments

In Python3 it is actually very easy to create a fix number of worker threads and fetch a result as soon as it's available. The thread target in this case is a function which takes one argument. According to the multiprocessing documentation, the developers recommend to use the concurrent.futures module because of it's compatibility. I ... Weiterlesen

ClamAV Milter E-Mail notification

When running Postfix with clamav-milter you often configure the server to reject the email on SMTP time. It's possible to let the recipient know, that an email contained a virus and was rejected with the following configuration in /etc/clamav/clamav-milter.conf In order to generate the notification email I created a very simple Python script to compose ... Weiterlesen

Process Munin RRD files with Python

Today I wanted to process an Munin RRD file with Python, in order to create an Plotly chart. The result can be found here. The use-case doesn't really matter, it could also be an export to JSON or any other sort of post-processing. It also doesn't matter which Munin database is used, they all contain ... Weiterlesen

Linux/Python: Block countries with iptables

The amount of attacks against certain services running on my server raised from year to year. This isn't something unusual, it's quite normal for internet facing common application like SSH, Mailservers or WordPress. There are some countries which have some facts in common. I have no normal visitors from those countries, but get a lot ... Weiterlesen