PA17_bmat_6

Dokumentation

Elektronik

  • Schaltplan
  • PCB
  • Stückliste
  • CNY65 LED Vorwiderstand berechnung / validierung

Dimmer

Arduino NANO

ESP32

  • ESP-IDF
  • ESP Arduino
  • platformio

Arduino Libraries

  • Wire Library
  • Interrupt Handler
  • OLED Library
  • Thermopile Library
  • Shell Library
  • WebServer Library => nkolban

HTML Form

  • MIME type
  • Screenshots der HTTP Packete in Wireshark

HTML Form: application/x-www-form-urlencoded vs. multipart/form-data

C++ String Concatenation

Reference

std::stringbuf::str
std::stringstream::stringstream

Good

stackoverflow

C++ equivalent of StringBuffer/StringBuilder?
Please help me to understand the difference between streambuf, stringbuf and stringstream?
What exactly does stringstream do?
How to implement StringBuilder class which to be able to accept IO manipulators

Wikipedia

C++ string handling
Resource acquisition is initialization (RAII)
Automatic variable

ESP32.com

How to use strings in esp idf?
Using C++ std::stringstream and heap exceptions

Bad

A C++ StringBuilder Class, 14.09.2007
4350% Performance Improvement with the StringBuilder for C++!, 10.09.2013

qmail-qfilter: Filtern bevor es in die Queue kommt

$ cat /usr/local/vpopmail/etc/tcp.smtp
127.:allow,RELAYCLIENT=""
:allow,QMAILQUEUE="/var/qmail/bin/qmail-localfilter.sh",GREYLIST="Y"

$ cat /var/qmail/bin/qmail-localfilter.sh
#!/bin/sh
exec /usr/local/bin/qmail-qfilter ${SPAMC_BIN}/spamc ${SPAMC_FLAGS} -- ${QMAIL_LOCALFILTER_BIN}/qmail-localfilter.pl ${QMAIL_LOCALFILTER_FLAGS}

$ file /usr/local/bin/qmail-qfilter
/usr/local/bin/qmail-qfilter: ELF 64-bit LSB executable, x86-64, version 1 (OS), dynamically linked, interpreter /libexec/ld-elf.so.1, for OS x.y stripped

$ file /var/qmail/bin/qmail-localfilter.pl
/var/qmail/bin/qmail-localfilter.pl: a /usr/local/bin/perl script, ASCII text executable

qmail-qfilter, qmail-queue multi-filter front end
Installing qmail-qfilter


# [...]

$log_facility = "mail";
if($opt_s)
{
    $log_facility = $opt_s;
}

# [...]

# Begin by processing the mail header...
while(<>) {

  # [...]

  # Check for an "X-Spam-Flag: YES" line
  # If we find one, this piece of crap is busted.
  if (/^X-Spam-Flag: YES/oi) {
    $spam = 1;
    $opt_d and warn "DEBUG: Mail is spam!\n";
  }

  # [...]
}

#
# If this is spam, log that we have rejected it, (with the
# "from" and "to" lines if possible), include the reason why it
# was rejected, (if we have it), and exit with status code 31.
#
if ($spam) {
  setlogsock('unix');
  openlog('qmail-localfilter.pl','0',$log_facility);
  if ($have_from) {
    syslog('info',"Rejected spam $from $to");
  } else {
    if ($have_to) {
      syslog('info',"Rejected spam $to");
    } else {
    syslog('info',"Rejected spam.");
    }
  }
  if ($have_reason) {
    syslog('info',"$reason");
  }
  exit 31
}

# [...]